v1.22.0
All the terraform actions in this repository are released as one.
Use the actions as part of a GitHub Actions workflow, e.g:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: dflook/terraform-plan@v1.22.0
with:
path: my-terraform-configYou can specify an action version as:
@v1.22.0to use exactly this release@v1.22to use the latest patch release for this specific minor version@v1to use the latest patch release for this specific major version
Changes
Added
-
Workspace management for Terraform Cloud/Enterprise has been reimplemented to avoid issues with the
terraform workspacecommand when using theremotebackend or a cloud config block:- dflook/terraform-new-workspace can now create the first workspace
- dflook/terraform-destroy-workspace can now delete the last remaining workspace
- dflook/terraform-new-workspace and dflook/terraform-destroy-workspace work with a
remotebackend that specifies a workspace byname
-
The terraform version to use will now be detected from additional places:
- The terraform version set in the remote workspace when using Terraform Cloud/Enterprise as the backend
- An asdf
.tool-versionsfile - The terraform version that wrote an existing state file
- A
TERRAFORM_VERSIONenvironment variable
The best way to specify the version is using a
required_versionconstraint.See dflook/terraform-version docs for details.
Changed
As a result of the above terraform version detection additions, note these changes:
-
Actions always use the terraform version set in the remote workspace when using TFC/E, if it exists. This mostly effects dflook/terraform-fmt, dflook/terraform-fmt-check and dflook/terraform-validate.
-
If the terraform version is not specified anywhere then new workspaces will be created with the latest terraform version. Existing workspaces will use the terraform version that was last used for that workspace.
-
If you want to always use the latest terraform version, instead of not specifying a version you now need to set an open-ended version constraint (e.g.
>1.0.0) -
All actions now support the inputs and environment variables related to the backend, for discovering the terraform version from a TFC/E workspace or remote state. This add the inputs
workspace,backend_config,backend_config_file, and theTERRAFORM_CLOUD_TOKENSenvironment variable to the dflook/terraform-fmt, dflook/terraform-fmt-check and dflook/terraform-validate actions. -
⚠️ Some unused packages were removed from the container image, most notably Python 2.