This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as pulumi from "@pulumi/pulumi"; | |
import * as random from "@pulumi/random"; | |
const username = new random.RandomString("my-string", { | |
length: 16, | |
special: true, | |
}, { | |
// RandomString has an output of 'result' where the string actually is stored | |
additionalSecretOutputs: ["result"] | |
}); | |
export const secret = username.result; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
▶ pulumi up --yes --skip-preview | |
Updating (dev): | |
Type Name Status | |
+ pulumi:pulumi:Stack secrets-dev created | |
+ └─ random:index:RandomString my-string created | |
Outputs: | |
secret: "[secret]" | |
Resources: | |
+ 2 created | |
Duration: 8s | |
Permalink: https://app.pulumi.com/stack72/secrets/dev/updates/1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment