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
Next Next commit
Update terragrunt version
  • Loading branch information
ps-occrp committed Feb 20, 2025
commit 1cba2e7a4b44ad54cf1dbe8d63fca1838351c60f
10 changes: 5 additions & 5 deletions action.yml
Original file line number Diff line number Diff line change
@@ -72,7 +72,7 @@ inputs:
terragrunt-version:
description: Terragrunt version
required: false
default: v0.55.5
default: v0.73.7
opentofu-version:
description: OpenTofu version
required: false
@@ -272,7 +272,7 @@ runs:
format('{0}/cache', github.workspace) ||
inputs.terraform-cache-dir }}
echo "TF_PLUGIN_CACHE_DIR=$CACHE_DIR" >> $GITHUB_ENV
echo "TERRAGRUNT_PROVIDER_CACHE_DIR=$CACHE_DIR" >> $GITHUB_ENV
echo "TG_PROVIDER_CACHE_DIR=$CACHE_DIR" >> $GITHUB_ENV

- uses: actions/cache/restore@v4
id: restore_cache
@@ -400,7 +400,7 @@ runs:
INPUT_DRIFT_DETECTION_SLACK_NOTIFICATION_URL: ${{ inputs.drift-detection-slack-notification-url }}
NO_BACKEND: ${{ inputs.no-backend }}
DEBUG: 'true'
TERRAGRUNT_PROVIDER_CACHE: ${{ inputs.cache-dependencies == 'true' && 1 || 0 }}
TG_PROVIDER_CACHE: ${{ inputs.cache-dependencies == 'true' && 1 || 0 }}
DIGGER_RUN_SPEC: ${{inputs.digger-spec}}
run: |
if [[ ${{ inputs.ee }} == "true" ]]; then
@@ -439,7 +439,7 @@ runs:
INPUT_DIGGER_COMMAND: ${{ inputs.command }}
INPUT_DRIFT_DETECTION_SLACK_NOTIFICATION_URL: ${{ inputs.drift-detection-slack-notification-url }}
NO_BACKEND: ${{ inputs.no-backend }}
TERRAGRUNT_PROVIDER_CACHE: ${{ inputs.cache-dependencies == 'true' && 1 || 0 }}
TG_PROVIDER_CACHE: ${{ inputs.cache-dependencies == 'true' && 1 || 0 }}
DIGGER_RUN_SPEC: ${{inputs.digger-spec}}
id: digger
shell: bash
@@ -460,7 +460,7 @@ runs:
with:
path: $TF_PLUGIN_CACHE_DIR
key: digger-cache-${{ hashFiles('**/cache') }}

branding:
icon: globe
color: purple
13 changes: 7 additions & 6 deletions cli/pkg/digger/digger.go
Original file line number Diff line number Diff line change
@@ -3,6 +3,12 @@ package digger
import (
"errors"
"fmt"
"log"
"os"
"path"
"strings"
"time"

"github.com/diggerhq/digger/libs/backendapi"
"github.com/diggerhq/digger/libs/ci"
comment_updater "github.com/diggerhq/digger/libs/comment_utils/summary"
@@ -12,11 +18,6 @@ import (
"github.com/diggerhq/digger/libs/policy"
orchestrator "github.com/diggerhq/digger/libs/scheduler"
"github.com/diggerhq/digger/libs/storage"
"log"
"os"
"path"
"strings"
"time"

core_drift "github.com/diggerhq/digger/cli/pkg/core/drift"
"github.com/diggerhq/digger/cli/pkg/usage"
@@ -68,7 +69,7 @@ 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: [TERRAGRUNT_PROVIDER_CACHE_DIR=%v", os.Getenv("TERRAGRUNT_PROVIDER_CACHE_DIR"))
log.Printf("Info: [TG_PROVIDER_CACHE_DIR=%v", os.Getenv("TG_PROVIDER_CACHE_DIR"))

runStartedAt := time.Now()

6 changes: 3 additions & 3 deletions libs/execution/terragrunt.go
Original file line number Diff line number Diff line change
@@ -104,9 +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_NO_COLOR=true")
env = append(env, "TERRAGRUNT_NON_INTERACTIVE=true")
env = append(env, "TERRAGRUNT_FORWARD_TF_STDOUT=1")
env = append(env, "TG_NO_COLOR=true")
env = append(env, "TG_NON_INTERACTIVE=true")
env = append(env, "TG_TF_FORWARD_STDOUT=true")

for k, v := range envs {
env = append(env, fmt.Sprintf("%s=%s", k, v))