-
-
Notifications
You must be signed in to change notification settings - Fork 134
Terraform/OpenTofu Multi-Component Commands (Filtered/Bulk Operations) #1327
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
Merged
Conversation
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
…affected-all # Conflicts: # internal/exec/describe_affected.go
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.
Actionable comments posted: 2
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
cmd/errors_test.go
(1 hunks)internal/exec/atlantis_generate_repo_config.go
(0 hunks)internal/exec/atlantis_generate_repo_config_test.go
(1 hunks)
💤 Files with no reviewable changes (1)
- internal/exec/atlantis_generate_repo_config.go
🧰 Additional context used
📓 Path-based instructions (1)
`cmd/*.go`: Implement each Cobra command in a separate file under the cmd/ directory.
cmd/*.go
: Implement each Cobra command in a separate file under the cmd/ directory.
cmd/errors_test.go
⏰ Context from checks skipped due to timeout of 90000ms (6)
- GitHub Check: website-deploy-preview
- GitHub Check: Lint (golangci)
- GitHub Check: Analyze (go)
- GitHub Check: Build (ubuntu-latest, linux)
- GitHub Check: Build (windows-latest, windows)
- GitHub Check: Summary
osterman
approved these changes
Jun 25, 2025
osterman
approved these changes
Jun 25, 2025
This was referenced Jul 16, 2025
This was referenced Jul 28, 2025
Merged
This was referenced Sep 5, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
what
atmos terraform plan/apply/deploy --all
atmos terraform plan/apply/deploy --all --stack <stack>
atmos terraform plan/apply/deploy --affected
atmos terraform plan/apply/deploy --affected --stack <stack>
atmos terraform plan/apply/deploy --affected --include-dependents
atmos terraform plan/apply/deploy --affected --stack <stack> --include-dependents
atmos terraform plan/apply/deploy --components <component1>,<component2>
atmos terraform plan/apply/deploy --components <component1>,<component2> --stack <stack>
atmos terraform plan/apply/deploy --query <yq-expression>
atmos terraform plan/apply/deploy --query <yq-expression> --stack <stack>
why
description
Atmos Terraform/OpenTofu commands fall into two categories:
Single-Component: Run Terraform for one component at a time
Multi-Component (Filtered/Bulk): Run Terraform across multiple components using stack names, selectors, or change detection
Single-Component Commands Usage
Multi-Component Commands (Bulk Operations) Usage
Multi-Component Commands (Bulk Operations) Examples
Let's assume that we have the following Atmos stack manifests in the
prod
andnonprod
stacks,with dependencies between the components:
Let's run the following Multi-Component commands in
dry-run
mode and review the output to understand what each command executes:Summary by CodeRabbit
Summary by CodeRabbit
New Features
--affected
and--all
flags to Terraform commands for selective or full-stack operations.--components
,--query
, and--include-dependents
for precise targeting of components and their dependencies.--repo-path
,--ref
,--sha
,--clone-target-ref
,--ssh-key
,--ssh-key-password
) to identify affected components based on code changes.--dry-run
mode to simulate Terraform commands without applying changes.describe affected
command with deprecation handling for--verbose
.clean
,workspace
,import
,plan
,deploy
, andapply
commands with new flags and behaviors.--verbose
flag deprecation with warning and log level adjustment.Bug Fixes
Documentation
Chores
Tests