Migrating Terraform state paths to Terragrunt #753
Unanswered
JCapriotti
asked this question in
How do I
Replies: 1 comment 1 reply
|
Hi @JCapriotti please see: https://github.com/orgs/gruntwork-io/discussions/229 |
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Hello,
I am investigating Terragrunt by way of converting an existing Terraform structure. Everything is pretty straightforward, except for how to handle a change in the resource names in our remote state file.
For example, each of our existing environment TF folders references a module like this:
So in the existing TF state, all the resource names are prefixed with
module.api, e.g.module.api.aws_lb_listener_rule.services.When running
terragrunt planeverything is showing up as a destroy + create because of the module above. What wasmodule.api.aws_lb_listener_rule.servicesin the old Terraform is nowaws_lb_listener_rule.servicesin Terragrunt.I wasn't able to find a quick way or any guidance for how to handle this. To get past it, I put together a bunch of
state mvcommands like:Is there a better way to do this that I missed?
Thanks,
Jason
Tracked in ticket #110340
All reactions