Skip to content

Please allow atlantis to bypass if Terragrunt marked 'skip = true' for a TG resources #5874

@patrickdung

Description

@patrickdung

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request. Searching for pre-existing feature requests helps us consolidate datapoints for identical requirements into a single place, thank you!
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment.

Overview of the Issue

In the gitlab-runner Terragrunt (TG) file, we have
skip=true
We don't want any changes (e.g AMI changes) on the GitLab runner at this moment.
Atlantis detected there is a change of the terragrunt.hcl file and consider there is a change.
But in this case, when TG process it, it recognize skip = true is configured.
TG exits but Atlantis did not cosider the apply is complete.
This will make the whole task not being completed.
That part/terragrunt file is pending to complete forever and the auto MR by Atlantis will not happen.

Going to run terragrunt init.
PWD is /atlantis/repos/patrick.dung/tg-infra-project2-dev/70/project2-dev_non-prod_eu-central-1_non-prod_gitlab-runner/project2-dev/non-prod/eu-central-1/non-prod/gitlab-runner
REPO_REL_DIR is project2-dev/non-prod/eu-central-1/non-prod/gitlab-runner
Running terragrunt init in /atlantis/repos/patrick.dung/tg-infra-project2-dev/70/project2-dev_non-prod_eu-central-1_non-prod_gitlab-runner/project2-dev/non-prod/eu-central-1/non-prod/gitlab-runner -c1
08:05:49.032 WARN   The `TERRAGRUNT_FETCH_DEPENDENCY_OUTPUT_FROM_STATE` environment variable is deprecated and will be removed in a future version of Terragrunt. Use `TG_DEPENDENCY_FETCH_OUTPUT_FROM_STATE=true` instead.
08:05:49.033 WARN   The `TERRAGRUNT_PROVIDER_CACHE_DIR` environment variable is deprecated and will be removed in a future version of Terragrunt. Use `TG_PROVIDER_CACHE_DIR=/atlantis/plugin-cache` instead.
08:05:49.045 INFO   Terragrunt Cache server is listening on 127.0.0.1:40989
08:05:49.047 WARN   Using `terragrunt.hcl` as the root of Terragrunt configurations is an anti-pattern, and no longer recommended. In a future version of Terragrunt, this will result in an error. You are advised to use a differently named file like `root.hcl` instead. For more information, see https://terragrunt.gruntwork.io/docs/migrate/migrating-from-root-terragrunt-hcl
08:05:49.054 INFO   Start Terragrunt Cache server
08:05:49.760 INFO   Skipping terragrunt module ./terragrunt.hcl due to skip = true.
08:05:49.760 INFO   Shutting down Terragrunt Cache server...
08:05:49.760 INFO   Terragrunt Cache server stopped

Going to run plan.
PWD is /atlantis/repos/patrick.dung/tg-infra-project2-dev/70/project2-dev_non-prod_eu-central-1_non-prod_gitlab-runner/project2-dev/non-prod/eu-central-1/non-prod/gitlab-runner
REPO_REL_DIR is project2-dev/non-prod/eu-central-1/non-prod/gitlab-runner
08:05:50.046 WARN   The `TERRAGRUNT_FETCH_DEPENDENCY_OUTPUT_FROM_STATE` environment variable is deprecated and will be removed in a future version of Terragrunt. Use `TG_DEPENDENCY_FETCH_OUTPUT_FROM_STATE=true` instead.
08:05:50.049 WARN   The `TERRAGRUNT_PROVIDER_CACHE_DIR` environment variable is deprecated and will be removed in a future version of Terragrunt. Use `TG_PROVIDER_CACHE_DIR=/atlantis/plugin-cache` instead.
08:05:50.060 INFO   Terragrunt Cache server is listening on 127.0.0.1:33887
08:05:50.061 WARN   Using `terragrunt.hcl` as the root of Terragrunt configurations is an anti-pattern, and no longer recommended. In a future version of Terragrunt, this will result in an error. You are advised to use a differently named file like `root.hcl` instead. For more information, see https://terragrunt.gruntwork.io/docs/migrate/migrating-from-root-terragrunt-hcl
08:05:50.065 INFO   Start Terragrunt Cache server
08:05:50.859 INFO   Skipping terragrunt module ./terragrunt.hcl due to skip = true.
08:05:50.859 INFO   Shutting down Terragrunt Cache server...
08:05:50.859 INFO   Terragrunt Cache server stopped
08:05:51.144 WARN   The `TERRAGRUNT_FETCH_DEPENDENCY_OUTPUT_FROM_STATE` environment variable is deprecated and will be removed in a future version of Terragrunt. Use `TG_DEPENDENCY_FETCH_OUTPUT_FROM_STATE=true` instead.
08:05:51.145 WARN   The `TERRAGRUNT_PROVIDER_CACHE_DIR` environment variable is deprecated and will be removed in a future version of Terragrunt. Use `TG_PROVIDER_CACHE_DIR=/atlantis/plugin-cache` instead.
08:05:51.157 INFO   Terragrunt Cache server is listening on 127.0.0.1:44329
08:05:51.163 WARN   Using `terragrunt.hcl` as the root of Terragrunt configurations is an anti-pattern, and no longer recommended. In a future version of Terragrunt, this will result in an error. You are advised to use a differently named file like `root.hcl` instead. For more information, see https://terragrunt.gruntwork.io/docs/migrate/migrating-from-root-terragrunt-hcl
08:05:51.179 INFO   Start Terragrunt Cache server
08:05:51.942 INFO   Skipping terragrunt module ./terragrunt.hcl due to skip = true.
08:05:51.942 INFO   Shutting down Terragrunt Cache server...
08:05:51.942 INFO   Terragrunt Cache server stopped

Searching for .tfplan files in /atlantis/repos/patrick.dung/tg-infra-project2-dev/70/project2-dev_non-prod_eu-central-1_non-prod_gitlab-runner/project2-dev/non-prod/eu-central-1/non-prod/gitlab-runner
---
Finished summarizing the plan file.

Reproduction Steps

Create TG resource and set 'skip = true' for it

Logs

Environment details

Additional Context

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingfeatureNew functionality/enhancement

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions