Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package terragrunt for openSUSE:Factory checked in at 2022-11-16 15:42:51 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/terragrunt (Old) and /work/SRC/openSUSE:Factory/.terragrunt.new.1597 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "terragrunt" Wed Nov 16 15:42:51 2022 rev:17 rq:1035811 version:0.40.2 Changes: -------- --- /work/SRC/openSUSE:Factory/terragrunt/terragrunt.changes 2022-10-18 12:46:01.629864065 +0200 +++ /work/SRC/openSUSE:Factory/.terragrunt.new.1597/terragrunt.changes 2022-11-16 15:43:02.047760120 +0100 @@ -1,0 +2,21 @@ +Tue Nov 15 09:53:01 UTC 2022 - ka...@b1-systems.de + +- Update to version 0.40.2: + * Bump `golang.org/x/text` and `golang.org/x/net` (#2341) + * #2331 - fix(docs): Fixes azs in the quick start example (#2340) + +------------------------------------------------------------------- +Tue Nov 15 09:49:04 UTC 2022 - ka...@b1-systems.de + +- Update to version 0.40.1: + * fix: protect sops cache from multiple parallel writes (#2352) + +------------------------------------------------------------------- +Tue Nov 15 09:44:02 UTC 2022 - ka...@b1-systems.de + +- Update to version 0.40.0: + * Add support for Terraform 1.3 (#2308) + * Fix installation of goimports (#2339) + * fix: modified single quotes to back quotes. (#2310) + +------------------------------------------------------------------- Old: ---- terragrunt-0.39.2.tar.gz New: ---- terragrunt-0.40.2.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ terragrunt.spec ++++++ --- /var/tmp/diff_new_pack.iHvjsv/_old 2022-11-16 15:43:02.879763135 +0100 +++ /var/tmp/diff_new_pack.iHvjsv/_new 2022-11-16 15:43:02.883763150 +0100 @@ -19,7 +19,7 @@ %define __arch_install_post export NO_BRP_STRIP_DEBUG=true Name: terragrunt -Version: 0.39.2 +Version: 0.40.2 Release: 0 Summary: Thin wrapper for Terraform for working with multiple Terraform modules License: MIT ++++++ _service ++++++ --- /var/tmp/diff_new_pack.iHvjsv/_old 2022-11-16 15:43:02.915763266 +0100 +++ /var/tmp/diff_new_pack.iHvjsv/_new 2022-11-16 15:43:02.919763281 +0100 @@ -3,7 +3,7 @@ <param name="url">https://github.com/gruntwork-io/terragrunt</param> <param name="scm">git</param> <param name="exclude">.git</param> - <param name="revision">v0.39.2</param> + <param name="revision">v0.40.2</param> <param name="versionformat">@PARENT_TAG@</param> <param name="changesgenerate">enable</param> <param name="versionrewrite-pattern">v(.*)</param> @@ -16,7 +16,7 @@ <param name="compression">gz</param> </service> <service name="go_modules" mode="disabled"> - <param name="archive">terragrunt-0.39.2.tar.gz</param> + <param name="archive">terragrunt-0.40.2.tar.gz</param> </service> </services> ++++++ _servicedata ++++++ --- /var/tmp/diff_new_pack.iHvjsv/_old 2022-11-16 15:43:02.935763338 +0100 +++ /var/tmp/diff_new_pack.iHvjsv/_new 2022-11-16 15:43:02.939763354 +0100 @@ -1,6 +1,6 @@ <servicedata> <service name="tar_scm"> <param name="url">https://github.com/gruntwork-io/terragrunt</param> - <param name="changesrevision">331dcc17f5b4947b4edad4e6f296699ac36ca0f8</param></service></servicedata> + <param name="changesrevision">a6e194810c9a678895188cd6bbd8629cb328f637</param></service></servicedata> (No newline at EOF) ++++++ terragrunt-0.39.2.tar.gz -> terragrunt-0.40.2.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/terragrunt-0.39.2/.circleci/config.yml new/terragrunt-0.40.2/.circleci/config.yml --- old/terragrunt-0.39.2/.circleci/config.yml 2022-10-18 02:52:19.000000000 +0200 +++ new/terragrunt-0.40.2/.circleci/config.yml 2022-11-10 15:31:20.000000000 +0100 @@ -4,7 +4,7 @@ defaults: &defaults docker: - - image: 087285199408.dkr.ecr.us-east-1.amazonaws.com/circle-ci-test-image-base:go1.17-tf1.2-tg37.4-pck1.8 + - image: 087285199408.dkr.ecr.us-east-1.amazonaws.com/circle-ci-test-image-base:go1.17-tf1.3-tg39.1-pck1.8-ci50.7 version: 2.1 jobs: @@ -46,7 +46,7 @@ # transitive dependencies that are being pulled in which released new versions that are no longer compatible # with any python < 3.6. pip3 install pre-commit==1.21.0 cfgv==2.0.1 zipp==1.1.0 - go get golang.org/x/tools/cmd/goimports + go install golang.org/x/tools/cmd/goimports@latest export GOPATH=~/go/bin && export PATH=$PATH:$GOPATH pre-commit install pre-commit run --all-files diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/terragrunt-0.39.2/_ci/install-terraform.ps1 new/terragrunt-0.40.2/_ci/install-terraform.ps1 --- old/terragrunt-0.39.2/_ci/install-terraform.ps1 2022-10-18 02:52:19.000000000 +0200 +++ new/terragrunt-0.40.2/_ci/install-terraform.ps1 2022-11-10 15:31:20.000000000 +0100 @@ -8,8 +8,8 @@ Remove-Item $TerraformInstallPath -Recurse } # Download terraform and unpack it -$terraformURI = "https://releases.hashicorp.com/terraform/1.0.4/terraform_1.0.4_windows_amd64.zip" -$output = "terraform.1.0.4.zip" +$terraformURI = "https://releases.hashicorp.com/terraform/1.3.2/terraform_1.3.2_windows_amd64.zip" +$output = "terraform.1.3.2.zip" $ProgressPreference = "SilentlyContinue" Invoke-WebRequest -Uri $terraformURI -OutFile $output New-Item -ItemType "directory" -Path $TerraformTmpPath diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/terragrunt-0.39.2/config/config_helpers.go new/terragrunt-0.40.2/config/config_helpers.go --- old/terragrunt-0.39.2/config/config_helpers.go 2022-10-18 02:52:19.000000000 +0200 +++ new/terragrunt-0.40.2/config/config_helpers.go 2022-11-10 15:31:20.000000000 +0100 @@ -142,6 +142,13 @@ "get_terragrunt_source_cli_flag": wrapVoidToStringAsFuncImpl(getTerragruntSourceCliFlag, extensions.TrackInclude, terragruntOptions), } + // Map with HCL functions introduced in Terraform after v0.15.3, since upgrade to a later version is not supported + // https://github.com/gruntwork-io/terragrunt/blob/master/go.mod#L22 + terraformCompatibilityFunctions := map[string]function.Function{ + "startswith": wrapStringSliceToBoolAsFuncImpl(startsWith, extensions.TrackInclude, terragruntOptions), + "endswith": wrapStringSliceToBoolAsFuncImpl(endsWith, extensions.TrackInclude, terragruntOptions), + } + functions := map[string]function.Function{} for k, v := range tfscope.Functions() { functions[k] = v @@ -149,6 +156,9 @@ for k, v := range terragruntFunctions { functions[k] = v } + for k, v := range terraformCompatibilityFunctions { + functions[k] = v + } ctx := &hcl.EvalContext{ Functions: functions, @@ -633,14 +643,14 @@ } // -// A map that caches the results of a decrypt operation via sops. Each decryption +// A cache of the results of a decrypt operation via sops. Each decryption // operation can take several seconds, so this cache speeds up terragrunt executions // where the same sops files are referenced multiple times. // -// The keys are the canonical paths to the encrypted files, and the values are the +// The cache keys are the canonical paths to the encrypted files, and the values are the // plain-text result of the decrypt operation. // -var sopsCache = make(map[string]string) +var sopsCache = NewStringCache() // decrypts and returns sops encrypted utf-8 yaml or json data as a string func sopsDecryptFile(params []string, trackInclude *TrackInclude, terragruntOptions *options.TerragruntOptions) (string, error) { @@ -663,7 +673,7 @@ return "", errors.WithStackTrace(err) } - if val, ok := sopsCache[canonicalSourceFile]; ok { + if val, ok := sopsCache.Get(canonicalSourceFile); ok { return val, nil } @@ -674,7 +684,7 @@ if utf8.Valid(rawData) { value := string(rawData) - sopsCache[canonicalSourceFile] = value + sopsCache.Put(canonicalSourceFile, value) return value, nil } @@ -741,6 +751,36 @@ return &imported, nil } +// startsWith Implementation of Terraform's startsWith function +func startsWith(args []string, trackInclude *TrackInclude, terragruntOptions *options.TerragruntOptions) (bool, error) { + if len(args) == 0 { + return false, errors.WithStackTrace(EmptyStringNotAllowed("parameter to the startswith function")) + } + str := args[0] + prefix := args[1] + + if strings.HasPrefix(str, prefix) { + return true, nil + } + + return false, nil +} + +// endsWith Implementation of Terraform's endsWith function +func endsWith(args []string, trackInclude *TrackInclude, terragruntOptions *options.TerragruntOptions) (bool, error) { + if len(args) == 0 { + return false, errors.WithStackTrace(EmptyStringNotAllowed("parameter to the endswith function")) + } + str := args[0] + suffix := args[1] + + if strings.HasSuffix(str, suffix) { + return true, nil + } + + return false, nil +} + // Custom error types type WrongNumberOfParams struct { Func string diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/terragrunt-0.39.2/config/config_helpers_test.go new/terragrunt-0.40.2/config/config_helpers_test.go --- old/terragrunt-0.39.2/config/config_helpers_test.go 2022-10-18 02:52:19.000000000 +0200 +++ new/terragrunt-0.40.2/config/config_helpers_test.go 2022-11-10 15:31:20.000000000 +0100 @@ -969,6 +969,64 @@ } } +func TestStartsWith(t *testing.T) { + t.Parallel() + + testCases := []struct { + config *options.TerragruntOptions + args []string + value bool + }{ + {terragruntOptionsForTest(t, ""), []string{"hello world", "hello"}, true}, + {terragruntOptionsForTest(t, ""), []string{"hello world", "world"}, false}, + {terragruntOptionsForTest(t, ""), []string{"hello world", ""}, true}, + {terragruntOptionsForTest(t, ""), []string{"hello world", " "}, false}, + {terragruntOptionsForTest(t, ""), []string{"", ""}, true}, + {terragruntOptionsForTest(t, ""), []string{"", " "}, false}, + {terragruntOptionsForTest(t, ""), []string{" ", ""}, true}, + {terragruntOptionsForTest(t, ""), []string{"", "hello"}, false}, + {terragruntOptionsForTest(t, ""), []string{" ", "hello"}, false}, + } + + for id, testCase := range testCases { + testCase := testCase + t.Run(fmt.Sprintf("%v %v", id, testCase.args), func(t *testing.T) { + actual, err := startsWith(testCase.args, nil, testCase.config) + assert.NoError(t, err) + assert.Equal(t, testCase.value, actual) + }) + } +} + +func TestEndsWith(t *testing.T) { + t.Parallel() + + testCases := []struct { + config *options.TerragruntOptions + args []string + value bool + }{ + {terragruntOptionsForTest(t, ""), []string{"hello world", "world"}, true}, + {terragruntOptionsForTest(t, ""), []string{"hello world", "hello"}, false}, + {terragruntOptionsForTest(t, ""), []string{"hello world", ""}, true}, + {terragruntOptionsForTest(t, ""), []string{"hello world", " "}, false}, + {terragruntOptionsForTest(t, ""), []string{"", ""}, true}, + {terragruntOptionsForTest(t, ""), []string{"", " "}, false}, + {terragruntOptionsForTest(t, ""), []string{" ", ""}, true}, + {terragruntOptionsForTest(t, ""), []string{"", "hello"}, false}, + {terragruntOptionsForTest(t, ""), []string{" ", "hello"}, false}, + } + + for id, testCase := range testCases { + testCase := testCase + t.Run(fmt.Sprintf("%v %v", id, testCase.args), func(t *testing.T) { + actual, err := endsWith(testCase.args, nil, testCase.config) + assert.NoError(t, err) + assert.Equal(t, testCase.value, actual) + }) + } +} + func mockConfigWithSource(sourceUrl string) *TerragruntConfig { cfg := TerragruntConfig{IsPartial: true} cfg.Terraform = &TerraformConfig{Source: &sourceUrl} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/terragrunt-0.39.2/config/cty_helpers.go new/terragrunt-0.40.2/config/cty_helpers.go --- old/terragrunt-0.39.2/config/cty_helpers.go 2022-10-18 02:52:19.000000000 +0200 +++ new/terragrunt-0.40.2/config/cty_helpers.go 2022-11-10 15:31:20.000000000 +0100 @@ -38,6 +38,28 @@ }) } +func wrapStringSliceToBoolAsFuncImpl( + toWrap func(params []string, trackInclude *TrackInclude, terragruntOptions *options.TerragruntOptions) (bool, error), + trackInclude *TrackInclude, + terragruntOptions *options.TerragruntOptions, +) function.Function { + return function.New(&function.Spec{ + VarParam: &function.Parameter{Type: cty.String}, + Type: function.StaticReturnType(cty.Bool), + Impl: func(args []cty.Value, retType cty.Type) (cty.Value, error) { + params, err := ctySliceToStringSlice(args) + if err != nil { + return cty.BoolVal(false), err + } + out, err := toWrap(params, trackInclude, terragruntOptions) + if err != nil { + return cty.BoolVal(false), err + } + return cty.BoolVal(out), nil + }, + }) +} + // Create a cty Function that takes no input parameters and returns as output a string. The implementation of the // function calls the given toWrap function, passing it the given include and terragruntOptions. func wrapVoidToStringAsFuncImpl( diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/terragrunt-0.39.2/docs/_docs/01_getting-started/quick-start.md new/terragrunt-0.40.2/docs/_docs/01_getting-started/quick-start.md --- old/terragrunt-0.39.2/docs/_docs/01_getting-started/quick-start.md 2022-10-18 02:52:19.000000000 +0200 +++ new/terragrunt-0.40.2/docs/_docs/01_getting-started/quick-start.md 2022-11-10 15:31:20.000000000 +0100 @@ -65,7 +65,7 @@ name = "my-vpc" cidr = "10.0.0.0/16" - azs = ["eu-west-1a", "eu-west-1b", "eu-west-1c"] + azs = ["us-east-1a", "us-east-1b", "us-east-1c"] private_subnets = ["10.0.1.0/24", "10.0.2.0/24", "10.0.3.0/24"] public_subnets = ["10.0.101.0/24", "10.0.102.0/24", "10.0.103.0/24"] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/terragrunt-0.39.2/docs/_docs/01_getting-started/supported-terraform-versions.md new/terragrunt-0.40.2/docs/_docs/01_getting-started/supported-terraform-versions.md --- old/terragrunt-0.39.2/docs/_docs/01_getting-started/supported-terraform-versions.md 2022-10-18 02:52:19.000000000 +0200 +++ new/terragrunt-0.40.2/docs/_docs/01_getting-started/supported-terraform-versions.md 2022-11-10 15:31:20.000000000 +0100 @@ -15,6 +15,7 @@ | Terraform Version | Terragrunt Version | |-------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------| +| 1.3.x | >= [0.40.0](https://github.com/gruntwork-io/terragrunt/releases/tag/v0.40.0) | | 1.2.x | >= [0.38.0](https://github.com/gruntwork-io/terragrunt/releases/tag/v0.38.0) | | 1.1.x | >= [0.36.0](https://github.com/gruntwork-io/terragrunt/releases/tag/v0.36.0) | | 1.0.x | >= [0.31.0](https://github.com/gruntwork-io/terragrunt/releases/tag/v0.31.0) | diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/terragrunt-0.39.2/docs/_docs/04_reference/cli-options.md new/terragrunt-0.40.2/docs/_docs/04_reference/cli-options.md --- old/terragrunt-0.39.2/docs/_docs/04_reference/cli-options.md 2022-10-18 02:52:19.000000000 +0200 +++ new/terragrunt-0.40.2/docs/_docs/04_reference/cli-options.md 2022-11-10 15:31:20.000000000 +0100 @@ -58,7 +58,7 @@ ### run-all -Runs the provided terraform command against a 'stack', where a 'stack' is a +Runs the provided terraform command against a `stack`, where a `stack` is a tree of terragrunt modules. The command will recursively find terragrunt modules in the current directory tree and run the terraform command in dependency order (unless the command is destroy, in which case the command is @@ -96,7 +96,7 @@ **DEPRECATED: Use `run-all plan` instead.** -Display the plans of a 'stack' by running 'terragrunt plan' in each subfolder. Make sure to read [Execute Terraform +Display the plans of a `stack` by running `terragrunt plan` in each subfolder. Make sure to read [Execute Terraform commands on multiple modules at once](/docs/features/execute-terraform-commands-on-multiple-modules-at-once/) for context. @@ -122,7 +122,7 @@ **DEPRECATED: Use `run-all apply` instead.** -Apply a 'stack' by running 'terragrunt apply' in each subfolder. Make sure to read [Execute Terraform +Apply a `stack` by running `terragrunt apply` in each subfolder. Make sure to read [Execute Terraform commands on multiple modules at once](/docs/features/execute-terraform-commands-on-multiple-modules-at-once/) for context. @@ -146,7 +146,7 @@ **DEPRECATED: Use `run-all output` instead.** -Display the outputs of a 'stack' by running 'terragrunt output' in each subfolder. Make sure to read [Execute Terraform +Display the outputs of a `stack` by running `terragrunt output` in each subfolder. Make sure to read [Execute Terraform commands on multiple modules at once](/docs/features/execute-terraform-commands-on-multiple-modules-at-once/) for context. @@ -171,7 +171,7 @@ **DEPRECATED: Use `run-all destroy` instead.** -Destroy a 'stack' by running 'terragrunt destroy' in each subfolder. Make sure to read [Execute Terraform +Destroy a `stack` by running `terragrunt destroy` in each subfolder. Make sure to read [Execute Terraform commands on multiple modules at once](/docs/features/execute-terraform-commands-on-multiple-modules-at-once/) for context. @@ -195,7 +195,7 @@ **DEPRECATED: Use `run-all validate` instead.** -Validate 'stack' by running 'terragrunt validate' in each subfolder. Make sure to read [Execute Terraform +Validate `stack` by running `terragrunt validate` in each subfolder. Make sure to read [Execute Terraform commands on multiple modules at once](/docs/features/execute-terraform-commands-on-multiple-modules-at-once/) for context. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/terragrunt-0.39.2/go.mod new/terragrunt-0.40.2/go.mod --- old/terragrunt-0.39.2/go.mod 2022-10-18 02:52:19.000000000 +0200 +++ new/terragrunt-0.40.2/go.mod 2022-11-10 15:31:20.000000000 +0100 @@ -30,10 +30,10 @@ github.com/urfave/cli v1.22.3 github.com/zclconf/go-cty v1.8.3 go.mozilla.org/sops/v3 v3.7.2 - golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2 + golang.org/x/crypto v0.0.0-20210921155107-089bfa567519 golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f - golang.org/x/sync v0.0.0-20210220032951-036812b2e83c - golang.org/x/sys v0.0.0-20220517195934-5e4e11fc645e + golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4 + golang.org/x/sys v0.1.0 google.golang.org/api v0.54.0 ) @@ -111,9 +111,9 @@ github.com/zclconf/go-cty-yaml v1.0.2 // indirect go.mozilla.org/gopgagent v0.0.0-20170926210634-4d7ea76ff71a // indirect go.opencensus.io v0.23.0 // indirect - golang.org/x/net v0.0.0-20210813160813-60bc85c4be6d // indirect - golang.org/x/term v0.0.0-20201210144234-2321bbc49cbf // indirect - golang.org/x/text v0.3.7 // indirect + golang.org/x/net v0.1.0 // indirect + golang.org/x/term v0.1.0 // indirect + golang.org/x/text v0.4.0 // indirect golang.org/x/time v0.0.0-20200630173020-3af7569d3a1e // indirect google.golang.org/appengine v1.6.7 // indirect google.golang.org/genproto v0.0.0-20210821163610-241b8fcbd6c8 // indirect diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/terragrunt-0.39.2/go.sum new/terragrunt-0.40.2/go.sum --- old/terragrunt-0.39.2/go.sum 2022-10-18 02:52:19.000000000 +0200 +++ new/terragrunt-0.40.2/go.sum 2022-11-10 15:31:20.000000000 +0100 @@ -901,6 +901,7 @@ github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= +github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= github.com/zclconf/go-cty v1.0.0/go.mod h1:xnAOWiHeOqg2nWS62VtQ7pbOu17FtxJNW8RLEih+O3s= github.com/zclconf/go-cty v1.1.0/go.mod h1:xnAOWiHeOqg2nWS62VtQ7pbOu17FtxJNW8RLEih+O3s= github.com/zclconf/go-cty v1.2.0/go.mod h1:hOPWgoHbaTUnI5k4D2ld+GRpFJSCe6bCM7m1q/N4PQ8= @@ -955,8 +956,9 @@ golang.org/x/crypto v0.0.0-20201016220609-9e8e0b390897/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= golang.org/x/crypto v0.0.0-20210220033148-5ea612d1eb83/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= -golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2 h1:It14KIkyBFYkHkwZ7k45minvA9aorojkyjGk9KJ5B/w= golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= +golang.org/x/crypto v0.0.0-20210921155107-089bfa567519 h1:7I4JAnoQBe7ZtJcBaYHi5UtiO8tQHbUSXxL+pnGRANg= +golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190125153040-c74c464bbbf2/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= @@ -994,6 +996,7 @@ golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/net v0.0.0-20170114055629-f2499483f923/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180530234432-1e491301e022/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -1049,8 +1052,9 @@ golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210614182718-04defd469f4e/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20210813160813-60bc85c4be6d h1:LO7XpTYMwTqxjLcGWPijK3vRXg1aWdlNOVOHRq45d7c= -golang.org/x/net v0.0.0-20210813160813-60bc85c4be6d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.1.0 h1:hZ/3BUoy5aId7sCpA/Tc5lt8DkFgdVS2onTpJsZ/fl0= +golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -1078,8 +1082,9 @@ golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20210220032951-036812b2e83c h1:5KslGYwFpkhGh+Q16bwMP3cOontH8FOep7tGV86Y7SQ= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4 h1:uVc8UZUe6tr40fFVnUP5Oj+veunVezqYl9z7DYw9xzw= +golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20170830134202-bb24a47a89ea/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -1153,18 +1158,24 @@ golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210514084401-e8d321eab015/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210603125802-9665404d3644/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210906170528-6f6e22806c34/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211116061358-0a5406a5449c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220517195934-5e4e11fc645e h1:w36l2Uw3dRan1K3TyXriXvY+6T56GNmlKGcqiQUJDfM= golang.org/x/sys v0.0.0-20220517195934-5e4e11fc645e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.1.0 h1:kunALQeHf1/185U1i0GOB/fy1IPRDDpuoOOqRReG57U= +golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/term v0.0.0-20201210144234-2321bbc49cbf h1:MZ2shdL+ZM/XzY3ZGOnh4Nlpnxz5GSOhOmtHo3iPU6M= golang.org/x/term v0.0.0-20201210144234-2321bbc49cbf/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= +golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.1.0 h1:g6Z6vPFA9dYBAF7DWcH6sCcOntplXsDKcliusYijMlw= +golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/text v0.0.0-20160726164857-2910a502d2bf/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -1175,8 +1186,9 @@ golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/text v0.4.0 h1:BrVqGRd7+k1DiOgtnFvAkoQEWQvBc25ouMJM6429SFg= +golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -1250,6 +1262,7 @@ golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.4/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/terragrunt-0.39.2/test/fixture-endswith/main.tf new/terragrunt-0.40.2/test/fixture-endswith/main.tf --- old/terragrunt-0.39.2/test/fixture-endswith/main.tf 1970-01-01 01:00:00.000000000 +0100 +++ new/terragrunt-0.40.2/test/fixture-endswith/main.tf 2022-11-10 15:31:20.000000000 +0100 @@ -0,0 +1,73 @@ +variable "endswith1" { + type = bool +} + +variable "endswith2" { + type = bool +} + +variable "endswith3" { + type = bool +} + +variable "endswith4" { + type = bool +} + +variable "endswith5" { + type = bool +} + +variable "endswith6" { + type = bool +} + +variable "endswith7" { + type = bool +} + +variable "endswith8" { + type = bool +} + +variable "endswith9" { + type = bool +} + +output "endswith1" { + value = var.endswith1 +} + +output "endswith2" { + value = var.endswith2 +} + +output "endswith3" { + value = var.endswith3 +} + +output "endswith4" { + value = var.endswith4 +} + +output "endswith5" { + value = var.endswith5 +} + +output "endswith6" { + value = var.endswith6 +} + +output "endswith7" { + value = var.endswith7 +} + +output "endswith8" { + value = var.endswith8 +} + +output "endswith9" { + value = var.endswith9 +} + + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/terragrunt-0.39.2/test/fixture-endswith/terragrunt.hcl new/terragrunt-0.40.2/test/fixture-endswith/terragrunt.hcl --- old/terragrunt-0.39.2/test/fixture-endswith/terragrunt.hcl 1970-01-01 01:00:00.000000000 +0100 +++ new/terragrunt-0.40.2/test/fixture-endswith/terragrunt.hcl 2022-11-10 15:31:20.000000000 +0100 @@ -0,0 +1,11 @@ +inputs = { + endswith1 = endswith("hello world", "world") + endswith2 = endswith("hello world", "hello") + endswith3 = endswith("hello world", "") + endswith4 = endswith("hello world", " ") + endswith5 = endswith("", "") + endswith6 = endswith("", " ") + endswith7 = endswith(" ", "") + endswith8 = endswith("", "hello") + endswith9 = endswith(" ", "hello") +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/terragrunt-0.39.2/test/fixture-startswith/main.tf new/terragrunt-0.40.2/test/fixture-startswith/main.tf --- old/terragrunt-0.39.2/test/fixture-startswith/main.tf 1970-01-01 01:00:00.000000000 +0100 +++ new/terragrunt-0.40.2/test/fixture-startswith/main.tf 2022-11-10 15:31:20.000000000 +0100 @@ -0,0 +1,73 @@ +variable "startswith1" { + type = bool +} + +variable "startswith2" { + type = bool +} + +variable "startswith3" { + type = bool +} + +variable "startswith4" { + type = bool +} + +variable "startswith5" { + type = bool +} + +variable "startswith6" { + type = bool +} + +variable "startswith7" { + type = bool +} + +variable "startswith8" { + type = bool +} + +variable "startswith9" { + type = bool +} + +output "startswith1" { + value = var.startswith1 +} + +output "startswith2" { + value = var.startswith2 +} + +output "startswith3" { + value = var.startswith3 +} + +output "startswith4" { + value = var.startswith4 +} + +output "startswith5" { + value = var.startswith5 +} + +output "startswith6" { + value = var.startswith6 +} + +output "startswith7" { + value = var.startswith7 +} + +output "startswith8" { + value = var.startswith8 +} + +output "startswith9" { + value = var.startswith9 +} + + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/terragrunt-0.39.2/test/fixture-startswith/terragrunt.hcl new/terragrunt-0.40.2/test/fixture-startswith/terragrunt.hcl --- old/terragrunt-0.39.2/test/fixture-startswith/terragrunt.hcl 1970-01-01 01:00:00.000000000 +0100 +++ new/terragrunt-0.40.2/test/fixture-startswith/terragrunt.hcl 2022-11-10 15:31:20.000000000 +0100 @@ -0,0 +1,11 @@ +inputs = { + startswith1 = startswith("hello world", "hello") + startswith2 = startswith("hello world", "world") + startswith3 = startswith("hello world", "") + startswith4 = startswith("hello world", " ") + startswith5 = startswith("", "") + startswith6 = startswith("", " ") + startswith7 = startswith(" ", "") + startswith8 = startswith("", "hello") + startswith9 = startswith(" ", "hello") +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/terragrunt-0.39.2/test/integration_test.go new/terragrunt-0.40.2/test/integration_test.go --- old/terragrunt-0.39.2/test/integration_test.go 2022-10-18 02:52:19.000000000 +0200 +++ new/terragrunt-0.40.2/test/integration_test.go 2022-11-10 15:31:20.000000000 +0100 @@ -131,6 +131,8 @@ TEST_FIXTURE_BROKEN_DEPENDENCY = "fixture-broken-dependency" TEST_FIXTURE_RENDER_JSON_METADATA = "fixture-render-json-metadata" TEST_FIXTURE_RENDER_JSON_MOCK_OUTPUTS = "fixture-render-json-mock-outputs" + TEST_FIXTURE_STARTSWITH = "fixture-startswith" + TEST_FIXTURE_ENDSWITH = "fixture-endswith" TERRAFORM_BINARY = "terraform" TERRAFORM_FOLDER = ".terraform" TERRAFORM_STATE = "terraform.tfstate" @@ -5021,3 +5023,76 @@ assert.Contains(t, output, "Usage: terragrunt render-json [OPTIONS]") assert.Contains(t, output, "--with-metadata") } + +func TestStartsWith(t *testing.T) { + t.Parallel() + + cleanupTerraformFolder(t, TEST_FIXTURE_STARTSWITH) + tmpEnvPath := copyEnvironment(t, TEST_FIXTURE_STARTSWITH) + rootPath := util.JoinPath(tmpEnvPath, TEST_FIXTURE_STARTSWITH) + + runTerragrunt(t, fmt.Sprintf("terragrunt apply-all --terragrunt-non-interactive --terragrunt-working-dir %s", rootPath)) + + // verify expected outputs are not empty + stdout := bytes.Buffer{} + stderr := bytes.Buffer{} + + require.NoError( + t, + runTerragruntCommand(t, fmt.Sprintf("terragrunt output -no-color -json --terragrunt-non-interactive --terragrunt-working-dir %s", rootPath), &stdout, &stderr), + ) + + outputs := map[string]TerraformOutput{} + + require.NoError(t, json.Unmarshal([]byte(stdout.String()), &outputs)) + + validateBoolOutput(t, outputs, "startswith1", true) + validateBoolOutput(t, outputs, "startswith2", false) + validateBoolOutput(t, outputs, "startswith3", true) + validateBoolOutput(t, outputs, "startswith4", false) + validateBoolOutput(t, outputs, "startswith5", true) + validateBoolOutput(t, outputs, "startswith6", false) + validateBoolOutput(t, outputs, "startswith7", true) + validateBoolOutput(t, outputs, "startswith8", false) + validateBoolOutput(t, outputs, "startswith9", false) +} + +func TestEndsWith(t *testing.T) { + t.Parallel() + + cleanupTerraformFolder(t, TEST_FIXTURE_ENDSWITH) + tmpEnvPath := copyEnvironment(t, TEST_FIXTURE_ENDSWITH) + rootPath := util.JoinPath(tmpEnvPath, TEST_FIXTURE_ENDSWITH) + + runTerragrunt(t, fmt.Sprintf("terragrunt apply-all --terragrunt-non-interactive --terragrunt-working-dir %s", rootPath)) + + // verify expected outputs are not empty + stdout := bytes.Buffer{} + stderr := bytes.Buffer{} + + require.NoError( + t, + runTerragruntCommand(t, fmt.Sprintf("terragrunt output -no-color -json --terragrunt-non-interactive --terragrunt-working-dir %s", rootPath), &stdout, &stderr), + ) + + outputs := map[string]TerraformOutput{} + + require.NoError(t, json.Unmarshal([]byte(stdout.String()), &outputs)) + + validateBoolOutput(t, outputs, "endswith1", true) + validateBoolOutput(t, outputs, "endswith2", false) + validateBoolOutput(t, outputs, "endswith3", true) + validateBoolOutput(t, outputs, "endswith4", false) + validateBoolOutput(t, outputs, "endswith5", true) + validateBoolOutput(t, outputs, "endswith6", false) + validateBoolOutput(t, outputs, "endswith7", true) + validateBoolOutput(t, outputs, "endswith8", false) + validateBoolOutput(t, outputs, "endswith9", false) +} + +func validateBoolOutput(t *testing.T, outputs map[string]TerraformOutput, key string, value bool) { + t.Helper() + output, hasPlatform := outputs[key] + require.Truef(t, hasPlatform, "Expected output %s to be defined", key) + require.Equalf(t, output.Value, value, "Expected output %s to be %t", key, value) +} ++++++ vendor.tar.gz ++++++ /work/SRC/openSUSE:Factory/terragrunt/vendor.tar.gz /work/SRC/openSUSE:Factory/.terragrunt.new.1597/vendor.tar.gz differ: char 5, line 1