Releases: cloudposse/github-action-atmos-terraform-apply
v7.0.0
fix: Scope plan storage AWS credentials to prevent Atmos auth interference @milldr (#93)
## WhatUse output-credentials: true mode for plan storage credential configuration and pass credentials explicitly via step-level env: vars to the plan storage steps.
Why
When using Atmos auth for Terraform operations (instead of the terraform-apply-role setting), the AWS credentials configured for plan storage (S3/DynamoDB access) were persisting in environment variables and taking precedence over Atmos' authentication mechanism.
This caused authentication failures when:
terraform-apply-rolewas not configured in gitops settings- Atmos auth was expected to handle role assumption for the target account
- Plan storage credentials remained in
AWS_ACCESS_KEY_ID,AWS_SECRET_ACCESS_KEY, andAWS_SESSION_TOKEN
Changes
- Add
output-credentials: trueto plan storage credential configuration step - Add step id
plan-storage-credentialsfor referencing credential outputs - Pass AWS credentials explicitly via
env:to "Retrieve Plan" and "Retrieve Lockfile" steps - Rename second credential configuration step to "Configure Apply AWS Credentials" for clarity
Update readme with plan-diff notes @goruha (#92)
## what * Update readme with plan-diff noteswhy
- Document plan-diff mode behaviour and non-deterministic plan diff limitations
references
Add conditional for Atmos installation step @jamengual (#90)
This pull request makes a small update to the workflow configuration in `action.yml`. The change adds a conditional check to only install Atmos if the `atmos-version` input is provided.🚀 Enhancements
fix: correct README.yaml indentation and test atmos configs @milldr (#96)
## What - Fix README.yaml blockquote indentation that caused YAML parsing errors - Fix test atmos.yaml base_path by removing `./` prefixWhy
- README.yaml had improperly indented blockquote continuation lines causing the release workflow to fail
- Test atmos configs had
./tests/...instead oftests/...which caused test failures
References
- Similar fix in plan action: cloudposse/github-action-atmos-terraform-plan#124
- Failed release: https://github.com/cloudposse/github-action-atmos-terraform-apply/actions/runs/20174357833
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