Hi there! I’m having trouble creating a AWS S3 buc...
# aws
s
Hi there! I’m having trouble creating a AWS S3 bucket with a name without a suffix created by Pulumi. Here is my code to create a bucket:
Copy code
import pulumi_aws as aws

bucket = aws.s3.BucketV2(
    "my-bucket-name",
    tags={
        "Client": "my-client-name,
        "Environment": "my-stack-name",
    },
)
b_acl = aws.s3.BucketAclV2("my-bucket-name", bucket=bucket.id, acl="private")
However, the name of the bucket created seems to be “`my-bucket-name-5d70fd9`” instead of “`my-bucket-name"`. I tried adding
resource_name
as a argument to
aws.s3.BucketV2
, like the doc suggests, but in that case I got the error
__init__() got multiple values for argument 'resource_name'
. Any idea?
b
@steep-lamp-20408 the naming property for s3 buckets is “bucket=name” - try that
💯 1
🙌 1
s
Indeed! Thanks @billowy-army-68599! Should I tag someone about the documentation fixes needs? It seems to be contradictory to the page doc here: https://www.pulumi.com/registry/packages/aws/api-docs/s3/bucketv2/
b
@steep-lamp-20408 yes, filing an issue in github.com/pulumi/docs would be appreciate
🙌 1
s
Will do!