Repository navigation
fix(terragrunt): harden native errors, imports, and saved plans #3582
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
Open
Erik Osterman (Cloud Posse) (osterman)
wants to merge
105
commits into
feat/terragrunt-native-compatibility
from
feat/terragrunt-native-hardening
+17,521
−1,978
Open
Changes from all commits
Commits
Show all changes
105 commits
Select commit
Hold shift + click to select a range
eeb5290
fix(terragrunt): harden errors, imports, saved plans, sources, and af…
osterman f13d366
feat(terragrunt): deep-merge stack configuration over imported units
osterman f5d7b99
refactor(plugin): split configuration discovery and watch filtering i…
osterman 54547e4
fix(provisioner): digest the local source stamp with a non-cryptograp…
osterman b0f867e
fix(terragrunt): reject missing local modules during discovery withou…
osterman fe3f540
fix(configuration): keep generated-file ownership and masking consistent
osterman f8156d1
fix(provisioner): keep local-source stamps current for every workdir
osterman 7ebc4f8
fix(configuration): redact both module URIs in the source-override error
osterman ed31e1f
fix(stacks): apply overrides to imported units and report import sett…
osterman f1e8a7d
fix(plugin): keep unsafe diagnostic details debuggable and mask locat…
osterman d9bccff
fix(configuration): keep a failed unit's file watched for affected se…
osterman 7a2c9c2
fix(configuration): reject watched paths whose parent directory links…
osterman 9e81b30
fix(terragrunt): watch computed hook scripts and report patterns that…
osterman f0486b0
fix(configuration): name the characters a provider import path cannot…
osterman 0f53710
docs(terragrunt): qualify diagnostic positions and correct the remote…
osterman 3b45439
fix(affected): sort each component type across the whole stack
osterman 5e8c44a
fix(provisioner): warn about default-branch Git sources and name the …
osterman e0f6683
fix(terraform): keep sensitive generated files out of the saved-plan …
osterman 4a2b51e
fix(configuration): report stale generated files that cannot be removed
osterman 8fe92ad
fix(configuration): keep generated-file records consistent when a bat…
osterman 301ab3c
test(terragrunt): assert the out-of-scope dependency discovery response
osterman 59cebd8
fix(terragrunt): keep discovering the siblings of a failed generated …
osterman 137ac19
fix(terragrunt): resolve watched reads and hook scripts from their ow…
osterman c9534bb
fix(terragrunt): mark generated backend files sensitive
osterman e3e2eb3
fix(terragrunt): name the remedy for iam_web_identity_token
osterman 47f7fcc
test(terragrunt): prove bulk pre-flight runs no engine command
osterman d9d6d91
fix(terraform): recognize detailed exit codes from every Terraform form
osterman 8d98d2c
fix(terraform): keep the reviewed plan when its apply fails
osterman eb71eea
fix(provisioner): stamp explicit pulls before copying and report miss…
osterman 7397a92
fix(affected): resolve BASE policy inventory imports in their own che…
osterman 14f73b3
docs(terragrunt): correct the tool-pinning guidance for imported units
osterman af9111d
fix(terragrunt): redact all generated content from saved plans
osterman 1093162
fix(terragrunt): hide evaluated dependency targets in diagnostics
osterman 28e1950
fix(source): stamp copied directory symlink targets
osterman f2ee89b
fix(exec): reject provider imports during static loads
osterman c191756
Merge Terragrunt compatibility fixes into native hardening
osterman c65d923
fix(terraform): bind successful detailed-exitcode plans
osterman 3a2de15
fix(terragrunt): reject unverified generated backend identities
osterman 2b7f8aa
fix(terraform): remove recorded host backend on provider takeover
osterman 18a6426
fix(terragrunt): preserve explicit lock generation policies
osterman 98276e7
fix(source): detect local content changes with unchanged metadata
osterman a86d587
fix(configuration): preserve import identity and session cancellation
osterman 660088f
fix(affected): coordinate cleanup and isolate watch cache builds
osterman 398c00e
fix(terragrunt): propagate inventory cancellation
osterman 2da94bc
fix(terragrunt): deduplicate output dependency ordering edges
osterman 479978a
test(terragrunt): cover validation boundaries and settings repair
osterman 6b215de
fix(terraform): avoid retrying successful detailed plans
osterman 3d32d96
fix(terraform): verify retained generated backend files
osterman e848025
fix(terraform): clean up implicitly selected saved plans
osterman 8397d28
fix(source): reject ambiguous legacy workdir refreshes
osterman 388e551
fix(terragrunt): defer execution values until preparation
osterman 1056d35
fix(terragrunt): isolate imports read during stack validation
osterman 09c8b19
fix: preserve YAML precedence across nested unit imports
osterman 4898386
fix: reject unit backend overrides before normalization
osterman d66e2be
fix(vendor): track CanCopySymlink performance
osterman f83c6ea
refactor(configuration): own unit override projection
osterman 487a400
fix(terragrunt): watch extra_arguments var files within the file limit
osterman fa9f63f
test(plugin): lock structured InvalidArgument diagnostics to the safe…
osterman c267ecb
fix(configuration): keep generated-file records valid across failed w…
osterman 28ed954
fix(configuration): restrict backends only for provider-owned components
osterman 9dcaf4d
Merge published L5 head d79bbcb886 into feat/terragrunt-native-hardening
osterman 78c3dd1
fix(configuration): report import and source conflicts and failures p…
osterman 94d6a69
fix(terragrunt): validate effective hooks and keep source read failures
osterman c4dacd6
fix(configuration): own backend policy and keep unowned files unrecorded
osterman 05c00e1
fix(terraform): classify backend and retained-file failures
osterman 790c166
fix(git): own the worktree signal lifecycle and keep received signals
osterman 16eaf28
fix(source): reject every absent legacy Terraform file
osterman 7353858
test(terragrunt): run deferred-effect commands without a platform shell
osterman 5b25673
test(terragrunt): fold backend generation tests into the backend tests
osterman 718b8e3
Merge L5 plugin package authentication into L6
osterman df46296
fix(terraform): avoid revalidating redacted saved-plan inputs
osterman a157686
fix(terragrunt): harden saved-plan retry, overlay and provider prepar…
osterman b43b70b
refactor(terraform): bring layer files within lint complexity and len…
osterman c785c8c
Merge remote-tracking branch 'origin/feat/terragrunt-native-compatibi…
osterman a525be6
Merge remote-tracking branch 'origin/feat/terragrunt-native-compatibi…
osterman 8593f8c
test: move three new tests up one layer to stay within the review fil…
osterman 6e3a33d
Merge feat/terragrunt-native-compatibility into feat/terragrunt-nativ…
osterman 723532e
fix(terragrunt): keep the unit overlay copy inside the unit directory
osterman 6bd86a3
fix: remove a data race in the source refresh lock warning and skip a…
osterman 176d99b
Merge branch 'feat/terragrunt-native-compatibility' into feat/terragr…
osterman 958e6d0
fix(configuration): wrap source preflight failures and keep revision …
osterman 3031fdb
fix(terragrunt): order include overrides by declaration, validate rem…
osterman 38fc3b1
fix(configuration): keep ownership and verification of generated file…
osterman 05bad01
fix(terragrunt): accept local module sources that select a subdirecto…
osterman 2c9b551
Merge branch 'feat/terragrunt-native-compatibility' into feat/terragr…
osterman b5e5195
Merge branch 'feat/terragrunt-native-compatibility' into feat/terragr…
osterman a71c64c
Merge branch 'feat/terragrunt-native-compatibility' into feat/terragr…
osterman 4851d79
fix(terragrunt): resolve directory config reads and follow includes i…
osterman db7faa5
fix(terragrunt): check local `//` module sources for existence during…
osterman d8aa027
fix(terraform): validate the execution environment for plan output fl…
osterman e3a4bcf
test(source): skip local stamp symlink tests when symlinks are unavai…
osterman aba18a1
fix(terraform): accept removed sensitive files when restoring a revie…
osterman 27a350e
fix(plugin): compare prepared dependency state across separate imports
osterman e7c64a1
Merge remote-tracking branch 'origin/feat/terragrunt-native-compatibi…
osterman 69300a5
test(terragrunt): keep the relative local module inside the test's ow…
osterman 2f8f1d1
Merge remote-tracking branch 'origin/feat/terragrunt-native-compatibi…
osterman d22e53c
Merge remote-tracking branch 'origin/feat/terragrunt-native-compatibi…
osterman 1b78158
Merge remote-tracking branch 'origin/feat/terragrunt-native-compatibi…
osterman bdfa890
fix(terragrunt): preserve scoped watches and reviewed plan inputs
osterman 1d96dd4
merge: integrate signed L5 destroy environment protection
osterman 3f371e6
refactor(terragrunt): simplify discovery and execution source inspection
osterman 7320cfd
merge: integrate signed L5 provider lint fixes
osterman 7bf9827
Merge L5 main integration into Terragrunt hardening
osterman e2d2dc5
Merge L5 quality consolidation and group provider diagnostics
osterman 48e2589
fix(terragrunt): integrate predecessor repairs and finish L6 lint
osterman File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| # Development profile: runs the Terragrunt plugin from a local build instead of a published release. | ||
| # | ||
| # export ATMOS_TERRAGRUNT_PLUGIN_PATH=/path/to/atmos/plugins/terragrunt | ||
| # export ATMOS_PROFILE=dev | ||
| # | ||
| # A package with `path` is not fetched, locked, or signature-checked, and Atmos warns once per run. | ||
| # Once the plugin is published, declare `source` and `version` under plugins.packages.terragrunt in | ||
| # atmos.yaml and drop this profile. | ||
| plugins: | ||
| packages: | ||
| terragrunt: | ||
| path: !env ATMOS_TERRAGRUNT_PLUGIN_PATH |
This file contains hidden or 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 |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| package exec | ||
|
|
||
| import ( | ||
| "github.com/cloudposse/atmos/pkg/component/configuration" | ||
| "github.com/cloudposse/atmos/pkg/schema" | ||
| ) | ||
|
|
||
| // importConfigurationComponents routes configured provider schemes before YAML or | ||
| // remote-source resolution. The provider's units come back as a manifest fragment that | ||
| // joins the importing manifest, so they are components of the importing stack. | ||
| func importConfigurationComponents(config *schema.AtmosConfiguration, uri string, declaration *schema.StackImport, loadOptions *StackLoadOptions) (map[string]any, bool, error) { | ||
| return configuration.ImportComponents(config, uri, declaration, loadOptions != nil && loadOptions.StaticOnly) | ||
| } | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Move provider-import rules to the configuration adapter.
This change keeps provider import validation and unit override projection in
internal/exec. Move those rules and their unit tests topkg/plugin/adapter/configuration. Keep stack-load orchestration and an integration test ininternal/exec.As per path instructions: “Treat internal/exec as a legacy package that we are actively downsizing” and “Move the corresponding unit tests with the implementation.”
Source: Path instructions