-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: wrong relative path in terragrunt files (#860)
* fix: wrong relative path in terragrunt files * don't reference self * trailing newline * don't let reference self
- Loading branch information
1 parent
28c230f
commit 0b3bf29
Showing
47 changed files
with
72 additions
and
109 deletions.
There are no files selected for viewing
20 changes: 15 additions & 5 deletions
20
templates/templates/component/terraform/terragrunt.hcl.tmpl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,21 @@ | ||
{{ $outer := . }} | ||
{{ $outer := . -}} | ||
|
||
dependencies { | ||
paths = [ | ||
{{ range $component, $backend := .ComponentBackends -}} | ||
{{ if ne $component $outer.Name}} "../{{$component}}", | ||
{{ if avail "Env" . -}} | ||
{{ if eq .Env "accounts" -}} | ||
{{ range $name, $backend := .AccountBackends -}} | ||
{{- if ne $name $outer.Name }} "../{{$name}}", | ||
{{ end -}} | ||
{{- end -}} | ||
{{- else if eq .Env "" -}} | ||
{{- else -}} | ||
{{- range $component, $backend := .ComponentBackends -}} | ||
{{- if ne $component $outer.Name }} "../{{$component}}", | ||
{{ end -}} | ||
{{- end -}} | ||
{{- range $name, $backend := .AccountBackends}} "../../../accounts/{{$name}}", | ||
{{ end -}} | ||
{{ range $name, $backend := .AccountBackends}} "../../../accounts/{{$name}}", | ||
{{ end }} ] | ||
{{- end -}} | ||
{{- end }} ] | ||
} |
3 changes: 0 additions & 3 deletions
3
testdata/auth0_provider_yaml/terraform/accounts/foo/terragrunt.hcl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,4 @@ | ||
|
||
|
||
dependencies { | ||
paths = [ | ||
"../../../accounts/foo", | ||
] | ||
} |
2 changes: 0 additions & 2 deletions
2
testdata/auth0_provider_yaml/terraform/envs/bar/bam/terragrunt.hcl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
|
||
|
||
dependencies { | ||
paths = [ | ||
"../../../accounts/foo", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
|
||
|
||
dependencies { | ||
paths = [ | ||
] | ||
|
3 changes: 0 additions & 3 deletions
3
testdata/bless_provider_yaml/terraform/accounts/foo/terragrunt.hcl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,4 @@ | ||
|
||
|
||
dependencies { | ||
paths = [ | ||
"../../../accounts/foo", | ||
] | ||
} |
2 changes: 0 additions & 2 deletions
2
testdata/bless_provider_yaml/terraform/envs/bar/bam/terragrunt.hcl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
|
||
|
||
dependencies { | ||
paths = [ | ||
"../../../accounts/foo", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
|
||
|
||
dependencies { | ||
paths = [ | ||
] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
|
||
|
||
dependencies { | ||
paths = [ | ||
] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
|
||
|
||
dependencies { | ||
paths = [ | ||
] | ||
|
3 changes: 0 additions & 3 deletions
3
testdata/github_provider_yaml/terraform/accounts/foo/terragrunt.hcl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,4 @@ | ||
|
||
|
||
dependencies { | ||
paths = [ | ||
"../../../accounts/foo", | ||
] | ||
} |
2 changes: 0 additions & 2 deletions
2
testdata/github_provider_yaml/terraform/envs/bar/bam/terragrunt.hcl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
|
||
|
||
dependencies { | ||
paths = [ | ||
"../../../accounts/foo", | ||
|
2 changes: 0 additions & 2 deletions
2
testdata/github_provider_yaml/terraform/global/terragrunt.hcl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
|
||
|
||
dependencies { | ||
paths = [ | ||
] | ||
|
3 changes: 0 additions & 3 deletions
3
testdata/okta_provider_yaml/terraform/accounts/foo/terragrunt.hcl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,4 @@ | ||
|
||
|
||
dependencies { | ||
paths = [ | ||
"../../../accounts/foo", | ||
] | ||
} |
2 changes: 0 additions & 2 deletions
2
testdata/okta_provider_yaml/terraform/envs/bar/bam/terragrunt.hcl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
|
||
|
||
dependencies { | ||
paths = [ | ||
"../../../accounts/foo", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
|
||
|
||
dependencies { | ||
paths = [ | ||
] | ||
|
3 changes: 0 additions & 3 deletions
3
testdata/remote_backend_yaml/terraform/accounts/acct1/terragrunt.hcl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,4 @@ | ||
|
||
|
||
dependencies { | ||
paths = [ | ||
"../../../accounts/acct1", | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
|
||
|
||
dependencies { | ||
paths = [ | ||
] | ||
|
3 changes: 0 additions & 3 deletions
3
testdata/snowflake_provider_yaml/terraform/accounts/foo/terragrunt.hcl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,4 @@ | ||
|
||
|
||
dependencies { | ||
paths = [ | ||
"../../../accounts/foo", | ||
] | ||
} |
2 changes: 0 additions & 2 deletions
2
testdata/snowflake_provider_yaml/terraform/envs/bar/bam/terragrunt.hcl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
|
||
|
||
dependencies { | ||
paths = [ | ||
"../../../accounts/foo", | ||
|
2 changes: 0 additions & 2 deletions
2
testdata/snowflake_provider_yaml/terraform/global/terragrunt.hcl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
|
||
|
||
dependencies { | ||
paths = [ | ||
] | ||
|
3 changes: 0 additions & 3 deletions
3
testdata/tfe_config/terraform/accounts/account/terragrunt.hcl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,4 @@ | ||
|
||
|
||
dependencies { | ||
paths = [ | ||
"../../../accounts/account", | ||
] | ||
} |
2 changes: 0 additions & 2 deletions
2
testdata/tfe_config/terraform/envs/staging/comp1/terragrunt.hcl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
|
||
|
||
dependencies { | ||
paths = [ | ||
"../../../accounts/account", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
|
||
|
||
dependencies { | ||
paths = [ | ||
] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
|
||
|
||
dependencies { | ||
paths = [ | ||
] | ||
|
3 changes: 0 additions & 3 deletions
3
testdata/tfe_provider_yaml/terraform/accounts/foo/terragrunt.hcl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,4 @@ | ||
|
||
|
||
dependencies { | ||
paths = [ | ||
"../../../accounts/foo", | ||
] | ||
} |
2 changes: 0 additions & 2 deletions
2
testdata/tfe_provider_yaml/terraform/envs/bar/bam/terragrunt.hcl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
|
||
|
||
dependencies { | ||
paths = [ | ||
"../../../accounts/foo", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
|
||
|
||
dependencies { | ||
paths = [ | ||
] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,5 @@ | ||
|
||
|
||
dependencies { | ||
paths = [ | ||
"../../../accounts/bar", | ||
"../../../accounts/foo", | ||
"../foo", | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
|
||
|
||
dependencies { | ||
paths = [ | ||
] | ||
|
2 changes: 0 additions & 2 deletions
2
testdata/v2_full_yaml/terraform/envs/prod/datadog/terragrunt.hcl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
|
||
|
||
dependencies { | ||
paths = [ | ||
"../hero", | ||
|
2 changes: 0 additions & 2 deletions
2
testdata/v2_full_yaml/terraform/envs/prod/hero/terragrunt.hcl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
|
||
|
||
dependencies { | ||
paths = [ | ||
] | ||
|
2 changes: 0 additions & 2 deletions
2
testdata/v2_full_yaml/terraform/envs/prod/okta/terragrunt.hcl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
|
||
|
||
dependencies { | ||
paths = [ | ||
"../datadog", | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
5 changes: 3 additions & 2 deletions
5
testdata/v2_full_yaml/terraform/envs/prod/sentry/terragrunt.hcl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,8 @@ | ||
|
||
|
||
dependencies { | ||
paths = [ | ||
"../hero", | ||
"../okta", | ||
"../../../accounts/bar", | ||
"../../../accounts/foo", | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
|
||
|
||
dependencies { | ||
paths = [ | ||
"../datadog", | ||
|
2 changes: 0 additions & 2 deletions
2
testdata/v2_full_yaml/terraform/envs/staging/comp1/terragrunt.hcl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
|
||
|
||
dependencies { | ||
paths = [ | ||
"../comp2", | ||
|
2 changes: 0 additions & 2 deletions
2
testdata/v2_full_yaml/terraform/envs/staging/comp2/terragrunt.hcl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
|
||
|
||
dependencies { | ||
paths = [ | ||
"../comp1", | ||
|
2 changes: 0 additions & 2 deletions
2
testdata/v2_full_yaml/terraform/envs/staging/vpc/terragrunt.hcl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
|
||
|
||
dependencies { | ||
paths = [ | ||
"../comp1", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
|
||
|
||
dependencies { | ||
paths = [ | ||
] | ||
|
2 changes: 0 additions & 2 deletions
2
testdata/v2_minimal_valid_yaml/terraform/global/terragrunt.hcl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
|
||
|
||
dependencies { | ||
paths = [ | ||
] | ||
|
5 changes: 1 addition & 4 deletions
5
testdata/v2_no_aws_provider_yaml/terraform/accounts/bar/terragrunt.hcl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,5 @@ | ||
|
||
|
||
dependencies { | ||
paths = [ | ||
"../../../accounts/bar", | ||
"../../../accounts/foo", | ||
"../foo", | ||
] | ||
} |
5 changes: 1 addition & 4 deletions
5
testdata/v2_no_aws_provider_yaml/terraform/accounts/foo/terragrunt.hcl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,5 @@ | ||
|
||
|
||
dependencies { | ||
paths = [ | ||
"../../../accounts/bar", | ||
"../../../accounts/foo", | ||
"../bar", | ||
] | ||
} |
2 changes: 0 additions & 2 deletions
2
testdata/v2_no_aws_provider_yaml/terraform/envs/staging/comp1/terragrunt.hcl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
|
||
|
||
dependencies { | ||
paths = [ | ||
"../comp2", | ||
|
2 changes: 0 additions & 2 deletions
2
testdata/v2_no_aws_provider_yaml/terraform/envs/staging/comp2/terragrunt.hcl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
|
||
|
||
dependencies { | ||
paths = [ | ||
"../comp1", | ||
|
Oops, something went wrong.