Add vault example
ADD
secrets-provider/vault/.gitignore
+/bin/
+/node_modules/
+Pulumi.*.yaml

ADD
secrets-provider/vault/Pulumi.yaml
+name: pulumi-vault-kms
+runtime: nodejs
+description: Minimal config which shows how Vault encryption support works

ADD
secrets-provider/vault/index.ts
+import * as pulumi from "@pulumi/pulumi";
+import * as aws from "@pulumi/aws";
+import * as awsx from "@pulumi/awsx";
+import { secret } from "@pulumi/pulumi";
+
+// Import config
+const config = new pulumi.Config();
+
+// Make the bucketName configurable
+const bucketName = config.require('bucketName');
+const secretValue = config.requireSecret('secretValue');
+
+// Create a private bucket
+const bucket = new aws.s3.Bucket("bucket", {
+ bucket: bucketName,
+ acl: "private",
+});
+
+// Create an object from the secret value
+const superSecretObject = new aws.s3.BucketObject("secret", {
+ bucket: bucket.id,
+ key: "secret",
+ content: secretValue,
+})
+
+// Export the name of the bucket and the secretValue
+export const bucketId = bucket.id;
+export const secretId = secretValue;

ADD
secrets-provider/vault/package.json
+{
+ "name": "pulumi-aws-kmstest",
+ "devDependencies": {
+ "@types/node": "^8.0.0"
+ },
+ "dependencies": {
+ "@pulumi/pulumi": "^2.0.0",
+ "@pulumi/aws": "^2.0.0",
+ "@pulumi/awsx": "^0.18.10"
+ }
+}

ADD
secrets-provider/vault/tsconfig.json
+{
+ "compilerOptions": {
+ "strict": true,
+ "outDir": "bin",
+ "target": "es2016",
+ "module": "commonjs",
+ "moduleResolution": "node",
+ "sourceMap": true,
+ "experimentalDecorators": true,
+ "pretty": true,
+ "noFallthroughCasesInSwitch": true,
+ "noImplicitReturns": true,
+ "forceConsistentCasingInFileNames": true
+ },
+ "files": [
+ "index.ts"
+ ]
+}

Add vault example