Hey, quckie question, i’m trying to create a s3 bu...
# general
b
Hey, quckie question, i’m trying to create a s3 bucket with a specific name. any reason why pulumi add a has at the end of the bucket?
b
add
{name : "name-i-want"}
{arn: "arn:aws:s3:::name-i-want"}
as a second argument
b
i add the
bucket
params in the
BucketArgs
lol this add pulumi at the end lol
g
This is due to the auto-naming functionality in Pulumi - https://www.pulumi.com/docs/reference/programming-model/#autonaming. Setting
bucket
will override this functionality and use the exact value you specify.
b
so what should be the way to do it?
g
The auto-naming functionality is helpful for resources that require unique names and you will be replacing at times during deployments. If you don't want this, you can specify a static name like this:
Copy code
const bucket = new aws.s3.Bucket("my-bucket", {
    bucket: "my-bucket",
});
b
@gentle-diamond-70147, do you think it is worth auto-enabling "deleteBeforeUpdate" for resources with overridden id?
g
Do you mean
deleteBeforeReplace
? I believe we're doing exactly that with https://github.com/pulumi/pulumi-terraform/issues/383.
b
nice! it was just merged 🙂 I can remove reduntant options from our code now
b
and do you know if it’s possible to get the aws region?