fix: Rename all the --terragrunt- flags#4203
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
📝 WalkthroughWalkthroughThis change is a comprehensive update across the codebase and documentation to standardize and simplify Terragrunt CLI flag names and environment variables. Legacy flags prefixed with Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant CLI
participant FlagsParser
participant AppLogic
User->>CLI: Run terragrunt command with new flags (e.g., --non-interactive, --log-level)
CLI->>FlagsParser: Parse CLI arguments
FlagsParser->>AppLogic: Provide parsed flags (new names)
AppLogic->>AppLogic: Execute logic using new flag/environment variable names
AppLogic-->>User: Output results
Possibly related PRs
Suggested reviewers
📜 Recent review detailsConfiguration used: .coderabbit.yaml 📒 Files selected for processing (8)
✅ Files skipped from review due to trivial changes (2)
🚧 Files skipped from review as they are similar to previous changes (6)
⏰ Context from checks skipped due to timeout of 90000ms (1)
✨ Finishing Touches
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
bc131fb to
b45d20c
Compare
34fda8a to
26396a2
Compare
| helpers.CopyTerragruntConfigAndFillPlaceholders(t, rootTerragruntConfigPath, rootTerragruntConfigPath, s3BucketName, lockTableName, helpers.TerraformRemoteStateS3Region) | ||
|
|
||
| helpers.RunTerragrunt(t, "terragrunt apply-all --terragrunt-log-level trace --terragrunt-non-interactive --terragrunt-working-dir "+rootPath) | ||
| helpers.RunTerragrunt(t, "terragrunt apply-all --log-level trace --non-interactive --working-dir "+rootPath) |
There was a problem hiding this comment.
TODO: Replace this.
| environmentPath := fmt.Sprintf("%s/%s/env1", tmpEnvPath, testFixtureOutputAll) | ||
|
|
||
| helpers.RunTerragrunt(t, "terragrunt apply-all --terragrunt-non-interactive --terragrunt-working-dir "+environmentPath) | ||
| helpers.RunTerragrunt(t, "terragrunt apply-all --non-interactive --working-dir "+environmentPath) |
There was a problem hiding this comment.
- TODO: Replace this.
| environmentPath := fmt.Sprintf("%s/%s/env1", tmpEnvPath, testFixtureOutputAll) | ||
|
|
||
| helpers.RunTerragrunt(t, "terragrunt apply-all --terragrunt-non-interactive --terragrunt-working-dir "+environmentPath) | ||
| helpers.RunTerragrunt(t, "terragrunt apply-all --non-interactive --working-dir "+environmentPath) |
|
|
||
| helpers.RunTerragrunt(t, "terragrunt apply-all --terragrunt-non-interactive --terragrunt-working-dir "+mgmtEnvironmentPath) | ||
| helpers.RunTerragrunt(t, "terragrunt apply-all --terragrunt-non-interactive --terragrunt-working-dir "+stageEnvironmentPath) | ||
| helpers.RunTerragrunt(t, "terragrunt apply-all --non-interactive --working-dir "+mgmtEnvironmentPath) |
There was a problem hiding this comment.
- TODO: Replace these
| rootPath := util.JoinPath(tmpEnvPath, testFixtureAwsAccountAlias) | ||
|
|
||
| helpers.RunTerragrunt(t, "terragrunt apply-all --terragrunt-non-interactive --terragrunt-working-dir "+rootPath) | ||
| helpers.RunTerragrunt(t, "terragrunt apply-all --non-interactive --working-dir "+rootPath) |
There was a problem hiding this comment.
- TODO: Replace these.
| rootPath := util.JoinPath(tmpEnvPath, testFixtureAwsGetCallerIdentity) | ||
|
|
||
| helpers.RunTerragrunt(t, "terragrunt apply-all --terragrunt-non-interactive --terragrunt-working-dir "+rootPath) | ||
| helpers.RunTerragrunt(t, "terragrunt apply-all --non-interactive --working-dir "+rootPath) |
There was a problem hiding this comment.
- TODO: Replace these.
| stderr bytes.Buffer | ||
| ) | ||
| helpers.RunTerragruntRedirectOutput(t, "terragrunt output-all --terragrunt-non-interactive --terragrunt-working-dir "+environmentPath, &stdout, &stderr) | ||
| helpers.RunTerragruntRedirectOutput(t, "terragrunt output-all --non-interactive --working-dir "+environmentPath, &stdout, &stderr) |
There was a problem hiding this comment.
- TODO: Replace this.
| environmentPath := fmt.Sprintf("%s/%s/env1", tmpEnvPath, testFixtureOutputAll) | ||
|
|
||
| helpers.RunTerragrunt(t, "terragrunt validate-all --terragrunt-non-interactive --terragrunt-working-dir "+environmentPath) | ||
| helpers.RunTerragrunt(t, "terragrunt validate-all --non-interactive --working-dir "+environmentPath) |
There was a problem hiding this comment.
- TODO: Replace this.
| helpers.CopyTerragruntConfigAndFillPlaceholders(t, rootTerragruntConfigPath, rootTerragruntConfigPath, s3BucketName, lockTableName, helpers.TerraformRemoteStateS3Region) | ||
|
|
||
| helpers.RunTerragrunt(t, "terragrunt apply-all --terragrunt-non-interactive --terragrunt-working-dir "+rootPath) | ||
| helpers.RunTerragrunt(t, "terragrunt apply-all --non-interactive --working-dir "+rootPath) |
There was a problem hiding this comment.
- TODO: Replace this.
| err := helpers.RunTerragruntCommand( | ||
| t, | ||
| "terragrunt apply-all --terragrunt-source-update --terragrunt-non-interactive --terragrunt-working-dir "+rootPath, | ||
| "terragrunt apply-all --source-update --non-interactive --working-dir "+rootPath, |
There was a problem hiding this comment.
- TODO: Replace this.
yhakbar
left a comment
There was a problem hiding this comment.
This looks good. Please ignore the TODOs. Are the --terragrunt- prefix removals of HCL functions just something I missed?
Description
Goes through all the legacy
--terragrunt-flags and renames them to remove theterragrunt-prefix.TODOs
Read the Gruntwork contribution guidelines.
Release Notes (draft)
Updated all docs and tests to use non-prefixed flags.
Summary by CodeRabbit
--terragrunt-iam-role→--iam-role,TERRAGRUNT_IAM_ROLE→TG_IAM_ROLE).