https://pulumi.com logo
Title
h

hundreds-kite-52072

05/28/2021, 11:34 AM
What is required for the id parameter of the aws.s3.Bucket.get function. The documentation says "The unique provider ID of the resource to lookup." which is at best ambiguous. What exactly is it expecting?
b

brave-planet-10645

05/28/2021, 12:08 PM
In the case of S3 buckets, it's just the name of the bucket. Not to be confused the `name`parameter of that method which is the name you're giving the result of that method in the stack
So if I had a bucket that was named
piers-bucket
then I'd call it with
const bucket = aws.s3.Bucket.get("my-bucket", "piers-bucket");
And then in the stack the reference to it would be a called
my-bucket
👍 1
h

hundreds-kite-52072

05/28/2021, 4:17 PM
Thanks @brave-planet-10645
g

great-sunset-355

06/21/2021, 8:03 AM
@brave-planet-10645 This took me some time to understand as well. I noticed that in Azure it uses UUID, I think it would be probably be good and more intuitive for AWS resources to use
arn
b

brave-planet-10645

06/21/2021, 8:11 AM
This would be a massive breaking change that I'm pretty sure we won't be doing right now. Also, the AWS SDK runs off bucket name (see here for an example) and we'd probably want to align with that going forward.