-
-
Notifications
You must be signed in to change notification settings - Fork 975
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
Hacky attempt at AWS Provider patching to help users work around Terraform bug #1326
Conversation
I got the patching code working, but there's a bit of an issue: Terraform downloads modules into
|
Due to Go's randomized sort order, it keeps switching order in the resulting code, making testing painful
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Implementation LGTM, although it's a bit scary to be relying on an internal representation/api.
Update: I decided to bite the bullet and parse the Note that I wanted to document this command somewhere, so I updated the CLI docs to include all Terragrunt commands, and not just options. Therefore, as a side effect, this PR also fixes #1306. I've updated the description of this PR as well, and I believe it's now ready for review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Pick up lots of bug fixes
Can I haz one more review plz? 😄 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updates LGTM
Thanks for the review! Merging now. |
This PR adds an
aws-provider-patch
command that can be used to override attributes in nestedprovider
blocks. This is an attempt at a hacky workaround for a Terraform bug whereimport
does not work if you are using any modules that haveprovider
blocks nested in within them. With this PR, users could run:And Terragrunt will:
terraform init
to download the code for all your modules into.terraform/modules
..terraform/modules
, find AWSprovider
blocks, and hard-code theregion
paramto
eu-west-1
for each one.Once you do this, you'll hopefully be able to run
import
on that module. After that, you can delete the modified.terraform/modules
and go back to normal.Note that I wanted to document this command somewhere, so I updated the CLI docs to include all Terragrunt commands, and not just options. Therefore, as a side effect, this PR also fixes #1306.