sparse-intern-71089
02/03/2023, 12:32 PMminiature-musician-31262
02/03/2023, 6:50 PMimport * as aws from "@pulumi/aws";
const bucket = new aws.s3.Bucket("my-bucket");
bucket.id.apply(async id => {
const lookedUpBucket = await aws.s3.getBucket({
bucket: id,
});
console.log(lookedUpBucket.arn);
});
However it’s somewhat unusual to do this within the scope of a single program, since after creating the resource, you already have a handle to it by name — e.g., as bucket
or bucket.id
. So might be good to hear a bit more about your use case if this doesn’t work for you.polite-summer-58169
02/06/2023, 10:17 AMListStorageAccountKeys.InvokeAsync()
to fetch the keys and then store those in a keyvault. The problem is that the InvokeAsync call requires args that has the resource group name as a string (Output<string> not accepted). To solve this we used resourcegroup.GetResourceName() to get the name of the resource group. However, this crashes in the preview. Maybe .Apply() is the trick then instead of GetResourceName? We have a couple of other places in the code where we do InvokeAsync() as well and it would've been really nice to be able to provide dependencies for these methods.No matter how you like to participate in developer communities, Pulumi wants to meet you there. If you want to meet other Pulumi users to share use-cases and best practices, contribute code or documentation, see us at an event, or just tell a story about something cool you did with Pulumi, you are part of our community.
Powered by