You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While prototyping new Terraform configuration, users may not always be careful in choosing the right names and need to change them later. This is not always a straight-forward process, especially if there is existing state involved.
Typically they expect to begin with
resource"aws_instance""blablah" {
// ...
}
and end up with
resource"aws_instance""main" {
// ...
}
moved {
from=aws_instance.blablahto=aws_instance.main
}
Proposal
Provide code actions to rename stateful blocks and (optionally?) generate moved {} block
Rename resource
Rename data
Rename module
The text was updated successfully, but these errors were encountered:
@radeksimko I'm interesting on this renaming feature. Do you have a plan about how to modify the TF files? E.g. currently looks like the only officially supported library to use is the hclwrite, however, it looks quite limited, and has even no support for the new attribute nested object in protov6. Or is there any other existing library I've missed?
@magodo I no longer actively work on this repository/team.
I am aware though that the rest of the team maintaining it had some plans for making it easier to add code actions in general. I don't know when this might be worked on though. I imagine they'd want to lay down some foundations first before adding (more) individual code actions, partially to also avoid having every code action "invent solutions" for the exact problems you mentioned.
Hi @magodo, we have not planned out this feature yet. We often put up tickets with our current ideas about new features for comment/feedback without a set timeline to implement. At this time we do not have any ETA for you, are you looking to contribute to this extension?
Thank you @radeksimko and @jpogran for the quick replies! Re @jpogran, I'm not directly contributing to this project, but if there is anything out of what I'm gonna work on that is valuable to contribute back here, I'll definitely make a PR.
Background
While prototyping new Terraform configuration, users may not always be careful in choosing the right names and need to change them later. This is not always a straight-forward process, especially if there is existing state involved.
Typically they expect to begin with
and end up with
Proposal
moved {}
blockresource
data
module
The text was updated successfully, but these errors were encountered: