Skip to content
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

Update terragrunt version #1884

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Add support for backward compatibility
  • Loading branch information
ps-occrp committed Feb 21, 2025
commit 8e3fda5df99587cb5aa9d10be6e53d93b7071b3c
3 changes: 3 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
@@ -273,6 +273,7 @@ runs:
inputs.terraform-cache-dir }}
echo "TF_PLUGIN_CACHE_DIR=$CACHE_DIR" >> $GITHUB_ENV
echo "TG_PROVIDER_CACHE_DIR=$CACHE_DIR" >> $GITHUB_ENV
echo "TERRAGRUNT_PROVIDER_CACHE_DIR=$CACHE_DIR" >> $GITHUB_ENV

- uses: actions/cache/restore@v4
id: restore_cache
@@ -401,6 +402,7 @@ runs:
NO_BACKEND: ${{ inputs.no-backend }}
DEBUG: 'true'
TG_PROVIDER_CACHE: ${{ inputs.cache-dependencies == 'true' && 1 || 0 }}
TERRAGRUNT_PROVIDER_CACHE: ${{ inputs.cache-dependencies == 'true' && 1 || 0 }}
DIGGER_RUN_SPEC: ${{inputs.digger-spec}}
run: |
if [[ ${{ inputs.ee }} == "true" ]]; then
@@ -440,6 +442,7 @@ runs:
INPUT_DRIFT_DETECTION_SLACK_NOTIFICATION_URL: ${{ inputs.drift-detection-slack-notification-url }}
NO_BACKEND: ${{ inputs.no-backend }}
TG_PROVIDER_CACHE: ${{ inputs.cache-dependencies == 'true' && 1 || 0 }}
TERRAGRUNT_PROVIDER_CACHE: ${{ inputs.cache-dependencies == 'true' && 1 || 0 }}
DIGGER_RUN_SPEC: ${{inputs.digger-spec}}
id: digger
shell: bash
3 changes: 2 additions & 1 deletion cli/pkg/digger/digger.go
Original file line number Diff line number Diff line change
@@ -69,7 +69,8 @@ func RunJobs(jobs []orchestrator.Job, prService ci.PullRequestService, orgServic
defer reporter.Flush()

log.Printf("Info: [TF_PLUGIN_CACHE_DIR=%v] ", os.Getenv("TF_PLUGIN_CACHE_DIR"))
log.Printf("Info: [TG_PROVIDER_CACHE_DIR=%v]", os.Getenv("TG_PROVIDER_CACHE_DIR"))
log.Printf("Info: [TG_PROVIDER_CACHE_DIR=%v] ", os.Getenv("TG_PROVIDER_CACHE_DIR"))
log.Printf("Info: [TERRAGRUNT_PROVIDER_CACHE_DIR=%v] ", os.Getenv("TERRAGRUNT_PROVIDER_CACHE_DIR"))

runStartedAt := time.Now()

3 changes: 3 additions & 0 deletions libs/execution/terragrunt.go
Original file line number Diff line number Diff line change
@@ -104,6 +104,9 @@ func (terragrunt Terragrunt) runTerragruntCommand(command string, printOutputToS
env := os.Environ()
env = append(env, "TF_CLI_ARGS=-no-color")
env = append(env, "TF_IN_AUTOMATION=true")
env = append(env, "TERRAGRUNT_FORWARD_TF_STDOUT=1")
env = append(env, "TERRAGRUNT_NO_COLOR=true")
env = append(env, "TERRAGRUNT_NON_INTERACTIVE=true")
env = append(env, "TG_NO_COLOR=true")
env = append(env, "TG_NON_INTERACTIVE=true")
env = append(env, "TG_TF_FORWARD_STDOUT=true")