-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
terragrunt and policy checking not working #1562
Comments
Also hitting this, exact same issue. |
The following workflow step (here as json) should resolve the issue: {
"run": "terragrunt show -no-color -json \"$PLANFILE\" > \"${PLANFILE/%.tfplan/.json}\""
} Just add the step after your terragrunt apply. Beware, that the show filename must contain the project name, if you are using them in your config. Refer to GetShowResultFileName() @lkysow Maybe adding the result file name to the run step environment, e.g. as SHOWFILE or SHOWRESULT, would simplify the terragrunt use case!? |
@mhennecke How does #1611 close this issue? This issue is about getting the in built policy checking working when using something like Terragrunt in a custom workflow. You can already shell out for conftest if things are in a custom workflow:
|
Sure, this will work as well. But instead of running conftest with a So even without #1611, the following should work for you: policy_check:
steps:
- run: terragrunt show -no-color -json "$PLANFILE" > "${PLANFILE/%.tfplan/.json}
- policy_check |
This policy set in
/etc/atlantis/repos.yaml
appears to be failing since a terraform show w/o knowledge of the backend fails. We are using terragrunt.
In the log we see:
The specific error is not shown in atlantis log however I believe it's because we need terragrunt to run the show sub command, not terraform:
which will fail due to our terragrunt abstraction of the terraform backend.
I believe the following occurs:
When running terragrunt, this issue does not occur:
Is there a way to run policy checking when using terragrunt or are we going to need to shell out to a script to do this?
The text was updated successfully, but these errors were encountered: