Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs - Provide instructions for correcting resource dependencies during aws.s3.Bucket -> aws.s3.BucketV2 migration #5131

Open
fabien-github opened this issue Jan 20, 2025 · 3 comments
Labels
awaiting-feedback Blocked on input from the author impact/usability Something that impacts users' ability to use the product easily and intuitively kind/question Questions about existing features

Comments

@fabien-github
Copy link

File: themes/default/content//registry/packages/aws/how-to-guides/bucketv2-migration

Hi,

during the migration between aws.s3.Bucket to aws.s3.BucketV2, i was stuck by dependencies during the removal of the bucket state :

pulumi state delete "urn:pulumi:dev::sandbox::aws:s3/bucket:Bucket::testing1234567-bucket"
warning: This command will edit your stack's state directly. Confirm? Yes

error: urn:pulumi:dev::sandbox::aws:s3/bucket:Bucket::testing1234567-bucket can't be safely deleted because the following resources depend on it:
 * "testing-role-policy" (urn:pulumi:dev::sandbox::aws:iam/policy:Policy::testing-role-policy)
 * "test"          (urn:pulumi:dev::sandbox::aws:iam/rolePolicyAttachment:RolePolicyAttachment::test)

--target-dependents option removes child, so i don't think it will be wanted by users.

I'm not sure what is the best way to fix that without editing the state file.

I don't know how you want to handle this case in the documentation. I think it's going to be pretty widespread.

@pulumi-bot pulumi-bot added the needs-triage Needs attention from the triage team label Jan 20, 2025
@fabien-github
Copy link
Author

Related to this : #4470

@mjeffryes
Copy link
Member

@fabien-github I think you're running into this issue: BucketV2 to Bucket aliasing is no longer working· pulumi-aws/4471 Unfortunately, it does require some state edits right now to migrate Bucket resources to BucketV2. We'll reevaluate prioritizing a fix there.

@mjeffryes mjeffryes added awaiting-feedback Blocked on input from the author kind/question Questions about existing features impact/usability Something that impacts users' ability to use the product easily and intuitively and removed needs-triage Needs attention from the triage team labels Jan 23, 2025
@mjeffryes mjeffryes transferred this issue from pulumi/registry Jan 23, 2025
@corymhall
Copy link
Contributor

@fabien-github do you have an example program showing the old bucket and those dependent resources I can use to walk through this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting-feedback Blocked on input from the author impact/usability Something that impacts users' ability to use the product easily and intuitively kind/question Questions about existing features
Projects
None yet
Development

No branches or pull requests

4 participants