In my original stack, i have a resource like this, which creates a bucket called "foo-data-56abebe":
aws.s3.Bucket(
"foo-data",
)
In order to import this resource in another stack, i have to set the
bucket
value and use the ARN for the import ID. After a successful import, i can remove the ARN, but not the
bucket
value:
aws.s3.Bucket(
"foo-data",
bucket="foo-data-56abebe",
)
If i remove
bucket="foo-data-56abebe"
for this already-imported resource, Pulumi wants to do a
replace. But i don't want the bucket name hard-coded, so i can use this project to spin up other stacks.
It seems using aliases doesn't handle the bucket value. So how do i get this new stack to know that "foo-data-56abebe" is the bucket name auto-generated from the "foo-data" name, like the original stack did?