sparse-intern-71089
05/05/2020, 8:10 AMlimited-rainbow-51650
05/05/2020, 8:13 AMBy usinghttps://www.pulumi.com/blog/managing-secrets-with-pulumi/#output-and-secrets(JavaScript) orpulumi.secret
(Python) to take an existing value and wrap it up in anpulumi.Output.secret
which is marked as a secret.Output
nutritious-judge-27316
05/05/2020, 8:45 AMbroad-dog-22463
05/05/2020, 12:02 PMbroad-dog-22463
05/05/2020, 12:02 PMvar secret = new RandomPassword("my-random-password", new RandomPasswordArgs
{
Length = 30,
Special = true,
},
new CustomResourceOptions
{
AdditionalSecretOutputs = new List<string>
{
"result"
}
});
broad-dog-22463
05/05/2020, 12:02 PMhallowed-rain-9096
05/05/2020, 1:33 PMhallowed-rain-9096
05/05/2020, 1:36 PMvar secret = new RandomPassword("my-random-password",
new RandomPasswordArgs
{
Length = 30,
Special = true,
},
new CustomResourceOptions<RandomPassword>()
.AddSecretOutput(x => x.Result)
);
Compiler errors are better than runtime errors if you misspell something 😉broad-dog-22463
05/05/2020, 1:40 PMhallowed-rain-9096
05/05/2020, 1:49 PMbroad-dog-22463
05/05/2020, 1:49 PMbroad-dog-22463
05/05/2020, 1:49 PMbroad-dog-22463
05/05/2020, 1:49 PMnew CustomResourceOptions<RandomPassword>() // specify generic for strong typing
.AddSecretOutput(x => x.Result) // specify output via expression; typos yield compiler errors
);
broad-dog-22463
05/05/2020, 1:50 PMhallowed-rain-9096
05/05/2020, 1:51 PMbroad-dog-22463
05/05/2020, 1:51 PMvar secret = new RandomPassword("my-random-password",
new RandomPasswordArgs
{
Length = 30,
Special = true,
},
new CustomResourceOptions
{
new AdditionalSecretOutputs<RandomPassword>()
.AddOutput(x => x.Result
}
hallowed-rain-9096
05/05/2020, 1:54 PMAdditionalSecretOutputs<ResourceTypeOne>
into the CustomResourceOptions
of a resource of type ResourceTypeTwo
nutritious-judge-27316
05/05/2020, 1:54 PM