-
Notifications
You must be signed in to change notification settings - Fork 590
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
hclwrite: Add RenameAttribute on Body #506
base: main
Are you sure you want to change the base?
Conversation
Hi @raymyers! Thanks for working on this. I agree that this seems like a valuable thing for A hypothetical What do you think? 🤔 |
This makes sense, I've renamed Thanks for reviewing! |
04ad5d1
to
b9b4a14
Compare
Looks like CI has some linux-only failures in |
@apparentlymart Would you be able to approve the workflow to run the build? |
Hi @raymyers @apparentlymart, Thank you for working on this! Is there anything I can help move this forward? I have another use case. Upgrading Terraform AWS provider v3 to v4 requires renaming some attributes. I’m currently removing an old attribute and adding a new one, which causes a loss of comments. |
Adding the ability to change the name of an attribute already set on a block body. This can be used to automate renaming of terraform
locals
.Without this, the only obvious approach is to remove the current attribute and add a new one, but this loses the order and comments which isn't desirable.
Usage
UPDATE