import * as pulumi from "@pulumi/pulumi"; import *...
# getting-started
h
import * as pulumi from "@pulumi/pulumi"; import * as gcp from "@pulumi/gcp"; const auto_expire = new gcp.storage.Bucket("auto-expire", { name: "no-public-access-bucket", location: "US", forceDestroy: true, publicAccessPrevention: "enforced", }); The first time I did pulumi up it created a bucket and when I again run pulumi up with a completely different bucket name instead of creating new bucket it rename the previously created bucket what am I missing here?
m
Pulumi identifies the resources via their resource name, which in your case is "auto-expire". So if you change the name of the bucket, Pulumi detects that your resource "auto-expire" is now a bucket with the new name, and thus renames your existing bucket to the new name.