-
-
Notifications
You must be signed in to change notification settings - Fork 107
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
fix terraform clean bugs #870
Open
haitham911
wants to merge
13
commits into
main
Choose a base branch
from
DEV-2859
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+127
−33
Open
Changes from 11 commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
6832ddd
fix clean cmd
haitham911 0c90df5
feat --everything is the default behavior
haitham911 a2b820e
remove debug print
haitham911 1649cd9
Merge branch 'main' into DEV-2859
osterman 4a9bde6
Update website/docs/cli/commands/terraform/usage.mdx
osterman 755e5c6
Update website/docs/cli/commands/terraform/usage.mdx
osterman 13126b2
Apply suggestions from code review
osterman 7e2f054
Update internal/exec/help.go
osterman f4a81b3
Merge branch 'main' into DEV-2859
osterman 8d1292b
Merge branch 'main' into DEV-2859
haitham911 1acd1d0
remove --everything
haitham911 338d859
add integration test for terraform apply and terraform clean
haitham911 6735525
chang dev with prod
haitham911 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 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
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
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 | ||||
---|---|---|---|---|---|---|
|
@@ -59,11 +59,11 @@ HCL-based domain-specific language and its interpreter. Atmos works with [OpenTo | |||||
|
||||||
- `atmos terraform clean` command deletes the `.terraform` folder, `.terraform.lock.hcl` lock file, and the previously generated `planfile` | ||||||
and `varfile` for the specified component and stack. Use the `--skip-lock-file` flag to skip deleting the `.terraform.lock.hcl` file. | ||||||
Use the `--everything` flag to delete all the local Terraform state files and directories (including `terraform.tfstate.d`) for all components and stacks. | ||||||
Use the `--force` flag to bypass the safety confirmation prompt and force the deletion (use with caution). | ||||||
It deletes all local Terraform state files and directories (including `terraform.tfstate.d/`) for all components and stacks. | ||||||
The `--force` flag bypasses the safety confirmation prompt and forces the deletion. Use with caution. | ||||||
|
||||||
:::warning | ||||||
The `--everything` flag performs destructive operations that can lead to permanent state loss. Always ensure you have remote state configured in your components before proceeding. | ||||||
The `clean` performs destructive operations that can lead to permanent state loss. Always ensure you have remote state configured in your components before proceeding. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
::: | ||||||
|
||||||
- `atmos terraform workspace` command first runs `terraform init -reconfigure`, then `terraform workspace select`, and if the workspace was not | ||||||
|
@@ -113,16 +113,16 @@ atmos terraform destroy test/test-component-override -s tenant1-ue2-dev --redire | |||||
atmos terraform init test/test-component-override-3 -s tenant1-ue2-dev | ||||||
|
||||||
# Clean all components (with confirmation) | ||||||
atmos terraform clean --everything | ||||||
atmos terraform clean | ||||||
|
||||||
# Clean a specific component | ||||||
atmos terraform clean vpc --everything | ||||||
atmos terraform clean vpc | ||||||
|
||||||
# Clean a specific component in a stack | ||||||
atmos terraform clean vpc --stack dev --everything | ||||||
atmos terraform clean vpc --stack dev | ||||||
|
||||||
# Clean without confirmation prompt | ||||||
atmos terraform clean --everything --force | ||||||
atmos terraform clean --force | ||||||
atmos terraform clean test/test-component-override-3 -s tenant1-ue2-dev | ||||||
|
||||||
atmos terraform workspace test/test-component-override-3 -s tenant1-ue2-dev | ||||||
|
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
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.