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

feat: Updating docs for run/exec #3734

Merged
merged 11 commits into from
Jan 7, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
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
21 changes: 17 additions & 4 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@ env: &env
environment:
GRUNTWORK_INSTALLER_VERSION: v0.0.39
MODULE_CI_VERSION: v0.57.0
TOFU_ENGINE_VERSION: "v0.0.9"
OPENTOFU_VERSION: "1.8.8"
TERRAFORM_VERSION: "1.9.7"
TFLINT_VERSION: "0.47.0"
TOFU_ENGINE_VERSION: "v0.0.11"

defaults: &defaults
docker:
Expand All @@ -20,7 +23,6 @@ install_terraform_latest: &install_terraform_latest
command: |
pushd .
cd /tmp
export TERRAFORM_VERSION=1.9.7
curl -L "https://releases.hashicorp.com/terraform/${TERRAFORM_VERSION}/terraform_${TERRAFORM_VERSION}_linux_amd64.zip" -o terraform.zip
unzip -o terraform.zip
sudo install -m 0755 terraform /usr/local/bin/terraform
Expand All @@ -34,7 +36,7 @@ install_tofu: &install_tofu
command: |
pushd .
cd /tmp
curl -L "https://github.com/opentofu/opentofu/releases/download/v1.8.3/tofu_1.8.3_linux_amd64.zip" -o tofu.zip
curl -L "https://github.com/opentofu/opentofu/releases/download/v${OPENTOFU_VERSION}/tofu_${OPENTOFU_VERSION}_linux_amd64.zip" -o tofu.zip
unzip -o tofu.zip
sudo install -m 0755 tofu /usr/local/bin/tofu
rm -rf tofu
Expand All @@ -49,7 +51,7 @@ install_tflint: &install_tflint
command: |
pushd .
cd /tmp
curl -L "https://github.com/terraform-linters/tflint/releases/download/v0.47.0/tflint_linux_amd64.zip" -o tflint.zip
curl -L "https://github.com/terraform-linters/tflint/releases/download/v${TFLINT_VERSION}/tflint_linux_amd64.zip" -o tflint.zip
unzip -o tflint.zip
sudo install -m 0755 tflint /usr/local/bin/tflint
rm -rf tflint
Expand Down Expand Up @@ -151,6 +153,7 @@ jobs:
executor:
name: win/default
size: "large"
<<: *env
steps:
- checkout
- run:
Expand All @@ -172,6 +175,7 @@ jobs:
executor:
name: win/default
size: "large"
<<: *env
steps:
- checkout
- run:
Expand All @@ -197,6 +201,7 @@ jobs:
# performance penalty.
unit_test:
<<: *defaults
<<: *env
steps:
- checkout
# Run pre-commit hooks and fail the build if any hook finds required changes.
Expand Down Expand Up @@ -237,6 +242,7 @@ jobs:
integration_test_terraform_1_5:
resource_class: xlarge
<<: *defaults
<<: *env
steps:
- checkout
- run:
Expand All @@ -255,6 +261,7 @@ jobs:
integration_test_terraform_with_provider_cache:
resource_class: xlarge
<<: *defaults
<<: *env
steps:
- checkout
- run:
Expand All @@ -275,6 +282,7 @@ jobs:
integration_test_terraform_latest:
resource_class: xlarge
<<: *defaults
<<: *env
steps:
- checkout
- run:
Expand All @@ -295,6 +303,7 @@ jobs:
integration_test_tofu:
resource_class: xlarge
<<: *defaults
<<: *env
steps:
- checkout
- run:
Expand All @@ -317,6 +326,7 @@ jobs:
integration_test_tofu_with_provider_cache:
resource_class: xlarge
<<: *defaults
<<: *env
steps:
- checkout
- run:
Expand Down Expand Up @@ -494,6 +504,7 @@ jobs:
strict_lint:
resource_class: medium
<<: *defaults
<<: *env
steps:
- checkout
# The `run-strict-lint` target requires the `main` ref for comparison.
Expand All @@ -508,6 +519,7 @@ jobs:
integration_test_tflint:
resource_class: large
<<: *defaults
<<: *env
steps:
- checkout
- run:
Expand All @@ -528,6 +540,7 @@ jobs:
race_test:
resource_class: medium
<<: *defaults
<<: *env
steps:
- checkout
- run:
Expand Down
5 changes: 3 additions & 2 deletions _ci/install-opentofu.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,15 @@ OpenTofuInstallPath = "C:\Program Files\tofu\tofu.exe"
$OpenTofuTmpPath = "C:\OpenTofutmp"
$OpenTofuTmpBinaryPath = "C:\OpenTofutmp\tofu.exe"
$OpenTofuPath = "C:\Program Files\tofu"
$OpenTofuVersion = $Env:OPENTOFU_VERSION
# Remove any old OpenTofu installation, if present
if (Test-Path -Path $OpenTofuInstallPath)
{
Remove-Item $OpenTofuInstallPath -Recurse
}
# Download OpenTofu and unpack it
$OpenTofuURI = "https://github.com/opentofu/opentofu/releases/download/v1.8.3/tofu_1.8.3_windows_amd64.zip"
$output = "tofu_1.8.3_windows_amd64.zip"
$OpenTofuURI = "https://github.com/opentofu/opentofu/releases/download/v$OpenTofuVersion/tofu_${OpenTofuVersion}_windows_amd64.zip"
$output = "tofu_${OpenTofuVersion}_windows_amd64.zip"
$ProgressPreference = "SilentlyContinue"
Invoke-WebRequest -Uri $OpenTofuURI -OutFile $output
New-Item -ItemType "directory" -Path $OpenTofuTmpPath
Expand Down
3 changes: 2 additions & 1 deletion _ci/install-terraform.ps1
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Install terraform using Chocolatey
choco install terraform --version 1.9.7 -y
$TerraformVersion = $Env:TERRAFORM_VERSION
choco install terraform --version $TerraformVersion -y
# Verify installation
Get-Command terraform
terraform version
5 changes: 2 additions & 3 deletions config/config_partial.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ import (
"path/filepath"

"github.com/gruntwork-io/terragrunt/internal/strict"

clone "github.com/huandu/go-clone"
"github.com/huandu/go-clone"

"github.com/gruntwork-io/terragrunt/internal/cache"

Expand Down Expand Up @@ -290,7 +289,7 @@ func PartialParseConfigFile(ctx *ParsingContext, configPath string, include *Inc
func TerragruntConfigFromPartialConfig(ctx *ParsingContext, file *hclparse.File, includeFromChild *IncludeConfig) (*TerragruntConfig, error) {
var cacheKey = fmt.Sprintf("%#v-%#v-%#v-%#v", file.ConfigPath, file.Content(), includeFromChild, ctx.PartialParseDecodeList)

terragruntConfigCache := cache.ContextCache[*TerragruntConfig](ctx, RunCmdCacheContextKey)
terragruntConfigCache := cache.ContextCache[*TerragruntConfig](ctx, TerragruntConfigCacheContextKey)
if ctx.TerragruntOptions.UsePartialParseConfigCache {
if config, found := terragruntConfigCache.Get(ctx, cacheKey); found {
ctx.TerragruntOptions.Logger.Debugf("Cache hit for '%s' (partial parsing), decodeList: '%v'.", ctx.TerragruntOptions.TerragruntConfigPath, ctx.PartialParseDecodeList)
Expand Down
Loading