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

Design state-move resource rename refactoring #1091

Closed
danieldreier opened this issue Sep 28, 2021 · 3 comments
Closed

Design state-move resource rename refactoring #1091

danieldreier opened this issue Sep 28, 2021 · 3 comments
Labels
core-parity Better experience in Terraform Core than CDKTF enhancement New feature or request needs-research priority/important-longterm Medium priority, to be worked on within the following 1-2 business quarters. size/large estimated < 1 month

Comments

@danieldreier
Copy link
Contributor

Terraform Core is actively working on an improvement that will make it easier to refactor HCL code. It will add dummy resources that are pointers to a new resource. For example, if you refactor a resource into a module, you put this dummy resource into the old location pointing to the new location. When the Terraform plan is evaluated, Terraform Core will rename the resources in state, avoiding the need to script a bunch of terraform state mv commands.

The purpose of this ticket is to track the need to coordinate and design matching CDK for Terraform support, and to track the need to design a similar refactoring user experience that allows users to refactor code without needing to manually adjust state afterward. This issue should be resolved when the desired UX is planned and ticketed out into engineering-ready work.

I'm initially putting this on the 0.9 milestone to ensure that we check in with Core, but the delivery date isn't guaranteed so it's not a firm commitment.

@danieldreier danieldreier added enhancement New feature or request needs-research core-parity Better experience in Terraform Core than CDKTF labels Sep 28, 2021
@danieldreier danieldreier added this to the 0.9 (tentative) milestone Sep 28, 2021
@jsteinich
Copy link
Collaborator

The AWS CDK has very basic renaming capabilities: https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_core.Stack.html#renamewbrlogicalwbridoldid-newid

@DanielMSchmidt DanielMSchmidt added needs-priority Issue has not yet been prioritized; this will prompt team review size/large estimated < 1 month labels Dec 6, 2021
@DanielMSchmidt DanielMSchmidt added priority/important-longterm Medium priority, to be worked on within the following 1-2 business quarters. and removed needs-priority Issue has not yet been prioritized; this will prompt team review labels Feb 8, 2022
@schersh schersh removed this from the 0.11 (tentative) milestone Mar 24, 2022
@rhatri rhatri closed this as not planned Won't fix, can't repro, duplicate, stale Jul 13, 2023
@xiehan
Copy link
Member

xiehan commented Jul 13, 2023

Duplicate of #1292 / #219

@github-actions
Copy link
Contributor

I'm going to lock this issue because it has been closed for 30 days. This helps our maintainers find and focus on the active issues. If you've found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 13, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
core-parity Better experience in Terraform Core than CDKTF enhancement New feature or request needs-research priority/important-longterm Medium priority, to be worked on within the following 1-2 business quarters. size/large estimated < 1 month
Projects
None yet
Development

No branches or pull requests

7 participants