Setup AWS Secrets manager
Demo showing how to set up AWS secrets manager
This example lives in the pulumi/examples repository. Check out just this directory to use it:
git clone --filter=blob:none --sparse https://github.com/pulumi/examples pulumi-examplesgit -C pulumi-examples sparse-checkout set aws-ts-secrets-managercd pulumi-examples/aws-ts-secrets-managerA simple program that creates an AWS secret and a version under AWS Secrets Manager
Deploying and running the program#
-
Create a new stack:
Terminal window pulumi stack init dev -
Set the AWS region:
$ pulumi config set aws:region us-east-1 -
Restore NPM modules via
npm installoryarn install. -
Run
pulumi upto preview and deploy changes:$ pulumi upPreviewing update (dev)...Updating (dev)View Live: https://app.pulumi.com/acmecorp/aws-secrets-manager/dev/updates/1Type Name Status+ pulumi:pulumi:Stack aws-secrets-manager-dev created+ ├─ aws:secretsmanager:Secret secretContainer created+ └─ aws:secretsmanager:SecretVersion secret createdOutputs:secretContainerId: "arn:aws:secretsmanager:us-east-1:xxxxxxxx:secret:secretContainer-369b7ea-Wrt9Ba"Resources:+ 3 createdDuration: 8s
Clean up#
-
Run
pulumi destroyto tear down all resources. -
To delete the stack itself, run
pulumi stack rm. Note that this command deletes all deployment history from the Pulumi console.