Repository navigation
Conversation
|
@leg100 @UMMAN2005 Following up on #145. This is the flag change split out and reworked, plus a fix for workspace commands:
The The same Terragrunt 1.x change still affects pug's format and taint/untaint actions, and module dependency loading ( |
|
also, just want to say @leg100 that I absolutely love pug, I have used it for all of my terragrunt work for years both at work and in personal projects, and I recommend it to anybody who will listen. Criminally under-appreciated and makes large terragrunt projects a joy to work with. Keep up the good work! |
Terragrunt 1.x no longer recognises --terragrunt-non-interactive and passes it through to terraform, which fails with "flag provided but not defined". Its replacement, --non-interactive, is not recognised by older terragrunt versions. Instead set non-interactive mode, and forwarding of terraform stdout, via environment variables, using both the TG_ names introduced by terragrunt's CLI redesign and the older TERRAGRUNT_ names. Terragrunt 1.x also no longer forwards unknown commands such as "workspace" to terraform, so pug found no workspaces. Workspace commands are now invoked as `terragrunt run -- workspace ...`.
7c20a8d to
ff90242
Compare
|
so, I was trying to make it backwards compatible with the ENV var approach (which is how this is handled elsewhere anyways so it is still justified) but without the So I guess the question of how backwards compatible you want to be needs answering otherwise some sort of version checking logic would be required to tailor functionality...doable but could be a bit sloppy. Thoughts? |
|
Just checking in so I don't forget again. |
|
@leg100 any thoughts on this? Just checking in again so I don't miss replies to the PR again. |
Fixes two terragrunt 1.x incompatibilities in terragrunt mode:
Non-interactive flag. Terragrunt 1.x no longer recognises
--terragrunt-non-interactiveand passes it through to terraform, which fails withflag provided but not defined: -terragrunt-non-interactive. Its replacement,--non-interactive, isn't recognised by older versions, so options are now set via env vars, using both the newTG_and oldTERRAGRUNT_names so it remains backwards compatible:TG_NON_INTERACTIVE/TERRAGRUNT_NON_INTERACTIVETG_TF_FORWARD_STDOUT/TERRAGRUNT_FORWARD_TF_STDOUT(1.x no longer reads the latter)Workspace commands. Terragrunt 1.x no longer forwards unknown commands to terraform, so
workspace listetc. fail and pug finds no workspaces. These are now invoked asterragrunt run -- workspace ....Env vars tested against terragrunt v0.55.0, v0.72.0 and v1.1.4; pug tested end-to-end against a terragrunt 1.1.4 project.
Split out from #145.