many-yacht-69481
02/03/2023, 12:01 AMconst awsSecret = new aws.secretsmanager.Secret("blah");
const createdSecret = aws.secretsmanager.getSecret({name:"blah"})
I also noticed that pulumi adds a short UUID to the end on the secret that’s being created (eg: blah-3hg4557) , could that be the reason by any chance ? and the names no longer match ?miniature-musician-31262
02/03/2023, 12:09 AMawsSecret
essentially is the secret you just created; the lookup shouldn’t be necessary. You should be able to reference the secret’s properties (awsSecret.name
, etc.) as resource “outputs” throughout your program: https://www.pulumi.com/docs/intro/concepts/inputs-outputs/
The extra characters tacked onto the end are the result of “auto-naming”, a feature of Pulumi that’s discussed in more detail here: https://www.pulumi.com/docs/intro/concepts/resources/names/#autonaminggetSecret
are useful for fetching resources created by other means — e.g., manually in the AWS console, by some other IaC tool, etc. https://www.pulumi.com/docs/intro/concepts/resources/get/many-yacht-69481
02/03/2023, 12:40 AMlittle-cartoon-10569
02/03/2023, 12:41 AMpulumi refresh
.pulumi refresh
is needed to get Pulumi to fetch values from AWS.