-
Notifications
You must be signed in to change notification settings - Fork 24
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
tfautomv fails to find move for aws_sqs_queue #53
Comments
Thank you for opening this issue! Indeed, the best way to improve tfautomv is through studying cases such as yours. The current way attribute comparison works is by flattening them into a map with no nesting. Since a single rule can only concern a single attribute — eg. a single tag — there is currently no way to tell tfautomv to ignore all tags. This makes me think that it would be nice to have some form of wildcard to match a subset of attributes. Something like You mentioned another interesting idea: ignoring all attributes except a single one — the resource's ID, in essence. This could be a new rule and should be fairly straightforward to implement. Something like I am currently in the process of rewriting tfautomv's internals in order to find moves spanning different working directories. Once that is done, which should be soon, then I will gladly discuss implementing the two features detailed above. Starting work on them beforehand would yield too many conflicts, so I don't think it's worth it. In the mean time, I would like to know what you think of these feature ideas. Do you think they would solve your problem? Do you see any ways we could improve these ideas, or any pitfalls we should avoid? |
Hello! I like this project and would like to give some data to help improve it. There's a scenario where I'd like to be able to use
tfautomv
.Here I have tried to refactor a resource to use a
for_each
. The correct move command is thisIt seems like
tfautomv
should be able to pick this up because the queue has the same name in each.edit: Running the analysis shows the mismatch failed due to changes to the tags. I see in the README I can ignore changes to certain attributes, but it would be nice to have a way of running that identified a move based only on the "primary" attribute of a resource. In this case, two queues with the same name is desirable whereas changes to tags is part of the refactor.
I see the above even when running
tfautomv -terraform-bin=terragrunt -ignore="everything:aws_sqs_queue:tags_all" -ignore="everything:aws_sqs_queue:tags"
The text was updated successfully, but these errors were encountered: