https://pulumi.com logo
#general
Title
# general
s

straight-jordan-23612

04/10/2019, 2:07 AM
question for the team, I know the default behavior on s3 buckets is to prefix with a unique id, but I need a static bucket name for S3 is there a way to do this? I have tried setting the arn in the bucketArgs but it still created a new bucket.
b

big-piano-35669

04/10/2019, 2:10 AM
For most resources, you can specify a
name
argument to override the default auto-naming. For buckets, it's (unfortunately) inconsistent, but you can accomplish this by specifying a
bucket
argument. So, for example:
Copy code
let buck = new aws.s3.Bucket("foo", {
    bucket: "foo-exactly",
    // other args, as usual...
});
The resulting name will be
foo-exactly
. The auto-naming is to ensure it's easier to stand up multiple stacks side-by-side without any naming conflicts, but completely understood that sometimes you need the exact name.
s

straight-jordan-23612

04/10/2019, 2:11 AM
thanks Joe btw we should catch up soon. Today went well with my boss
🙌 1
b

big-piano-35669

04/10/2019, 2:11 AM
Excellent to hear! Would love to. I'll shoot you a mail.
s

straight-jordan-23612

04/10/2019, 2:11 AM
yes please do. We have next steps.
💯 1