diff --git a/examples/bucket-py/requirements.txt b/examples/bucket-py/requirements.txt index 557b513b475..e032db624ae 100644 --- a/examples/bucket-py/requirements.txt +++ b/examples/bucket-py/requirements.txt @@ -1,2 +1,2 @@ pulumi>=3.0.0,<4.0.0 -pulumi_aws>=5.0.0,<6.0.0 +pulumi_aws>=6.0.0,<7.0.0 diff --git a/examples/examples_py_test.go b/examples/examples_py_test.go index 2731d09dec0..293a6a0ad72 100644 --- a/examples/examples_py_test.go +++ b/examples/examples_py_test.go @@ -25,7 +25,6 @@ func TestAccBucketPy(t *testing.T) { func TestAccWebserverPy(t *testing.T) { for _, dir := range []string{"webserver-py", "webserver-py-old"} { t.Run(dir, func(t *testing.T) { - test := getPythonBaseOptions(t). With(integration.ProgramTestOptions{ Dir: filepath.Join(getCwd(t), dir), @@ -59,6 +58,15 @@ func TestAccFifoSqsQueuePy(t *testing.T) { integration.ProgramTest(t, &test) } +func TestSecretManagerPy(t *testing.T) { + test := getPythonBaseOptions(t). + With(integration.ProgramTestOptions{ + Dir: filepath.Join(getCwd(t), "secretmanager"), + }) + + integration.ProgramTest(t, &test) +} + func getPythonBaseOptions(t *testing.T) integration.ProgramTestOptions { envRegion := getEnvRegion(t) base := getBaseOptions() diff --git a/examples/secretmanager/Pulumi.yaml b/examples/secretmanager/Pulumi.yaml new file mode 100644 index 00000000000..d67e2653e9c --- /dev/null +++ b/examples/secretmanager/Pulumi.yaml @@ -0,0 +1,3 @@ +name: secretmanager-py +runtime: python +description: A simple example of using the Secret Manager APIs using Python. diff --git a/examples/secretmanager/__main__.py b/examples/secretmanager/__main__.py new file mode 100644 index 00000000000..c2d6d4dc591 --- /dev/null +++ b/examples/secretmanager/__main__.py @@ -0,0 +1,24 @@ +import json +from pulumi_aws.secretsmanager import Secret, SecretVersion + +# Create an AWS Secret for RDS +rds_secret = Secret("db", + description="RDS Database secret", + kms_key_id="alias/aws/secretsmanager", # default KMS key +) + +# Define the secret value +secret_string = json.dumps({ + "username": "username", + "password": "password", + "engine": "mysql", + "host": "", + "port": 3306, + "dbname": "", +}) + +# Create a secret version in AWS Secrets Manager with the secret value +rds_secret_version = SecretVersion("version", + secret_id=rds_secret.id, + secret_string=secret_string, +) diff --git a/examples/secretmanager/requirements.txt b/examples/secretmanager/requirements.txt new file mode 100644 index 00000000000..e032db624ae --- /dev/null +++ b/examples/secretmanager/requirements.txt @@ -0,0 +1,2 @@ +pulumi>=3.0.0,<4.0.0 +pulumi_aws>=6.0.0,<7.0.0 diff --git a/examples/sqs-fifo-queue/python/requirements.txt b/examples/sqs-fifo-queue/python/requirements.txt index 557b513b475..e032db624ae 100644 --- a/examples/sqs-fifo-queue/python/requirements.txt +++ b/examples/sqs-fifo-queue/python/requirements.txt @@ -1,2 +1,2 @@ pulumi>=3.0.0,<4.0.0 -pulumi_aws>=5.0.0,<6.0.0 +pulumi_aws>=6.0.0,<7.0.0 diff --git a/examples/webserver-py-old/requirements.txt b/examples/webserver-py-old/requirements.txt index 557b513b475..e032db624ae 100644 --- a/examples/webserver-py-old/requirements.txt +++ b/examples/webserver-py-old/requirements.txt @@ -1,2 +1,2 @@ pulumi>=3.0.0,<4.0.0 -pulumi_aws>=5.0.0,<6.0.0 +pulumi_aws>=6.0.0,<7.0.0 diff --git a/examples/webserver-py/requirements.txt b/examples/webserver-py/requirements.txt index 557b513b475..e032db624ae 100644 --- a/examples/webserver-py/requirements.txt +++ b/examples/webserver-py/requirements.txt @@ -1,2 +1,2 @@ pulumi>=3.0.0,<4.0.0 -pulumi_aws>=5.0.0,<6.0.0 +pulumi_aws>=6.0.0,<7.0.0