Releases: cloudposse/github-action-atmos-terraform-apply
v6.0.0
Add skip-plandiff option and fix workspace variable usage @jamengual (#89)
This pull request adds support for skipping plan diff validation in the `action.yml` workflow, allowing users to bypass plan preparation and diff validation steps if desired. It also refactors how plan files are selected and referenced throughout the workflow, and standardizes the use of `${GITHUB_WORKSPACE}` for file paths. These changes improve flexibility and maintainability of the workflow.Plan Diff Skipping and Conditional Logic
- Added a new input
skip-plandifftoaction.ymlto allow skipping plan diff validation, with corresponding conditional logic throughout the workflow to support this behavior. [1] [2] - Introduced a new step
Determine Plan Fileto select the appropriate plan file and filename based on whether plan diff is skipped or not, and updated downstream steps to use this output. [1] [2] [3]
File Path Standardization
- Replaced usages of
${{ github.workspace }}with${GITHUB_WORKSPACE}for all file output and manipulation operations, ensuring consistency and reliability in file path references. [1] [2] [3] [4] [5]
Workflow Improvements
- Updated conditional logic for Infracost-related steps and Terraform apply to account for the new
skip-plandiffinput, ensuring correct execution flow when plan diff is skipped. [1] [2] - Added logic to conditionally set the
--skip-initflag for Terraform apply, depending on whether plan diff was run.
Minor Enhancements
- Added a conditional to the Atmos installation step so it only runs when a version is specified.
v5.3.0
v5.2.0
v5.1.0
Remove affected-components.json from .gitignore @goruha (#84)
## what * Add `.atmos` to `.gitignore`why
- Fix readme generation that adds all new generated files to readme PR
Name of the renewed planfile is passed to plan command - based on (#80) @goruha (#83)
## whatThe name of the planfile is passed to the Atmos Terraform plan to avoid errors in file naming.
why
If the component name contains a slash (e.g., eks/app), atmos terraform plan creates a file named plat-ue1-dev-eks-app.planfile (at least for me with atmos = 1.187.0).
This action attempts to copy the file plat-ue1-dev-eks_app.planfile. This happens because of https://github.com/cloudposse/github-action-atmos-terraform-apply/blob/99b9b1eda20d0d77be6e4f18e1c67d0790104278/action.yml#L238
This is probably what causes my error after updating to v5.
cp: cannot stat '/home/runner/_work/***/***/deploy/atmos/components/terraform/eks/app/plat-ue1-dev-eks_app.planfile': No such file or directory
To correct this error and avoid similar ones in the future, I would suggest specifying the expected name of the planfile directly.
references
Thanks @angst-storm
v5.0.0
Support plan-diff @goruha (#77)
## what * Use [`atmos terraform plan-diff`](https://atmos.tools/cli/commands/terraform/plan-diff) to ensure stored plan is actual * Added tests for - Basic apply usage - Apply with storage disabled - Apply with atmos pro - Apply when plan-diff has changes - Apply when plan generation fail * Updated README with migration plan for new `v5` action * Added Github Action summaries for cases `plan-diff` found changes and `plan` generation failed * Updated terraform-docs to `v0.20.0`why
- Guarantee that the plan we saw on GitOps
planstage would be the same one we apply. - Improve test coverage to be confident in GHA behaviour
- Provide documentation to users about the changes
- Provide a nice feedback message in the GitHub UI for the action
- Get the latest bug fixes
v4.2.0
v4.1.0
v4.0.0
Disable process functions @goruha (#70)
## Breaking Change! * Requires `atmos >= 1.158.0`. Will fail on older versionwhat
- Disable process functions for
cloudposse/github-action-atmos-get-setting
why
process-functionsrequires terraform. Which we install after fetching the versionprocess-functionscan cause an issue where cached terraform versions conflict with the version we want to installatmos < 1.158.0not not support flag--process-functions
v3.3.0
v3.2.0
fix: filter out 'Switched to workspace' message in terraform output @Benbentwo (#68)
## what - `atmos terraform output ... -skip-init` runs `terraform workspace` && `terraform output` - When running and outputting to a file this leads to a json file similar to the following: ``` �[0m�[32mSwitched to workspace "foo-bar".�[0m { "bucket_arn": { ... } } ``` - This PR adds a simple grep line to ensure that switch is removed from the json file.why
- Bugfix issue with
Error: invalid character '\x1b' looking for beginning of value