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

Consider building tooling to simplify migrating from Bucket to BucketV2 #4470

Open
t0yv0 opened this issue Sep 18, 2024 · 1 comment
Open
Labels
kind/enhancement Improvements or new features

Comments

@t0yv0
Copy link
Member

t0yv0 commented Sep 18, 2024

Migrating from Bucket to BucketV2 in Pulumi without losing data is becoming more difficult than it used to be in 2022 due to continued evolution and schema drift. Consider building support to make it more seamless to support users that need to perform the migration.

Technically there are a couple of things that could be done:

  1. To overcome schema drift some code could be built to parse Bucket states into BucketV2 schema and automatically migrate them; this seems to be something that worked in 2022 but is not entirely seamless now as the schema of BucketV2 evolved separately. This would help users to simply rename Bucket to BucketV2 without moving deprecated inputs like serverSideEncryptionConfiguration to side-by-side resources and do a pulumi up.

  2. Actually supporting moving deprecated inputs to side-by-side resources is a lot more involved since by default Pulumi does not correlate the states properly and will not send the prior Bucket's state to the new BucketServerSideEncryptionConfiguration resource. Document migrating aws.s3.Bucket to aws.s3.BucketV2 registry#5444 outlines manual steps but with some work it may be possible to partially automate them in a tool, possibly involving some form of automated import or refresh.

  3. If nothing is done to simplify this scenario, migrating without losing data is still possible. We're finalizing a guide on how to do this.

Your feedback helps Pulumi team prioritize, please upvote this issue if you are affected by the migration and would like to see improved automated tooling support.

References:

@pulumi-bot pulumi-bot added the needs-triage Needs attention from the triage team label Sep 18, 2024
@mjeffryes mjeffryes added kind/enhancement Improvements or new features and removed needs-triage Needs attention from the triage team labels Sep 18, 2024
@georgberky
Copy link

georgberky commented Sep 19, 2024

Thank you for raising this, highly appreciated. I favor stability and the possibility to migrate forward over almost everything else when it comes to infrastructure-as-code tools.

I wouldn't mind having to change the code a bit, e.g. moving from lifecycleRules to their own objects, as long as Pulumi picks up that the bucket is in the desired state already.

Losing data is totally unacceptable though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement Improvements or new features
Projects
None yet
Development

No branches or pull requests

4 participants