Hello i am trying to creatre s3 bucket using pulu...
# typescript
r
Hello i am trying to creatre s3 bucket using pulumi typescript
Copy code
const accessLogsBucket = new aws.s3.Bucket(`${project}-access-logs`);
const BucketPublicAccessBlock = new aws.s3.BucketPublicAccessBlock("BucketPublicAccessBlock", {
  bucket: accessLogsBucket.id,
  blockPublicAcls: true,
  blockPublicPolicy: true,
});
bucket gets created but its gets id attached to it like this dev-access-logs-cf9291d how to stop getting that id for bucket name
s
Copy code
aws.s3.Bucket(`${project}-access-logs`,{bucket:`${project}-access-logs`});
otherwise it will use the pulumi resource name and append a random string at the end
1
this goes for all resources that can be given a name
b
https://www.pulumi.com/docs/intro/concepts/resources/#autonaming we strongly recommend not disabling autonaming
(although in the case of s3 buckets it might be necessary)\
r
i am facing new issue so when i am random string fro bucket name when i try to destroy the resource is not deleted only when there is random string resource is being deleted
b
can you show me the output from your destroy?
r
destroy out put is not showing s3 resource in it
b
Can you describe the process you’re going through? You’ll need to run a pulumi up after your change your code
r
I think the issue is bucket is not empty thats why its not destroyed when i deleted dirrectory in bucket its working normal