Skip to content

Commit 5630572

Browse files
authored
🔖 v1.22.0
1 parent 8599093 commit 5630572

File tree

1 file changed

+37
-2
lines changed

1 file changed

+37
-2
lines changed

CHANGELOG.md

Lines changed: 37 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,44 @@ The actions are versioned as a suite. Some actions may have no change in behavio
88

99
When using an action you can specify the version as:
1010

11-
- `@v1.21.1` to use an exact release
12-
- `@v1.21` to use the latest patch release for the specific minor version
11+
- `@v1.22.0` to use an exact release
12+
- `@v1.22` to use the latest patch release for the specific minor version
1313
- `@v1` to use the latest patch release for the specific major version
1414

15+
## [1.22.0] - 2022-01-23
16+
17+
### Added
18+
19+
- Workspace management for Terraform Cloud/Enterprise has been reimplemented to avoid issues with the `terraform workspace` command when using the `remote` backend or a cloud config block:
20+
- [dflook/terraform-new-workspace](https://github.com/dflook/terraform-github-actions/tree/master/terraform-new-workspace) can now create the first workspace
21+
- [dflook/terraform-destroy-workspace](https://github.com/dflook/terraform-github-actions/tree/master/terraform-destroy-workspace) can now delete the last remaining workspace
22+
- [dflook/terraform-new-workspace](https://github.com/dflook/terraform-github-actions/tree/master/terraform-new-workspace) and [dflook/terraform-destroy-workspace](https://github.com/dflook/terraform-github-actions/tree/master/terraform-destroy-workspace) work with a `remote` backend that specifies a workspace by `name`
23+
24+
- The terraform version to use will now be detected from additional places:
25+
26+
- The terraform version set in the remote workspace when using Terraform Cloud/Enterprise as the backend
27+
- An [asdf](https://asdf-vm.com/) `.tool-versions` file
28+
- The terraform version that wrote an existing state file
29+
- A `TERRAFORM_VERSION` environment variable
30+
31+
The best way to specify the version is using a [`required_version`](https://www.terraform.io/docs/configuration/terraform.html#specifying-a-required-terraform-version) constraint.
32+
33+
See [dflook/terraform-version](https://github.com/dflook/terraform-github-actions/tree/master/terraform-version#terraform-version-action) docs for details.
34+
35+
### Changed
36+
37+
As a result of the above terraform version detection additions, note these changes:
38+
39+
- Actions always use the terraform version set in the remote workspace when using TFC/E, if it exists. This mostly effects [dflook/terraform-fmt](https://github.com/dflook/terraform-github-actions/tree/master/terraform-fmt), [dflook/terraform-fmt-check](https://github.com/dflook/terraform-github-actions/tree/master/terraform-fmt-check) and [dflook/terraform-validate](https://github.com/dflook/terraform-github-actions/tree/master/terraform-validate).
40+
41+
- 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.
42+
43+
- 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`)
44+
45+
- 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 the `TERRAFORM_CLOUD_TOKENS` environment variable to the [dflook/terraform-fmt](https://github.com/dflook/terraform-github-actions/tree/master/terraform-fmt), [dflook/terraform-fmt-check](https://github.com/dflook/terraform-github-actions/tree/master/terraform-fmt-check) and [dflook/terraform-validate](https://github.com/dflook/terraform-github-actions/tree/master/terraform-validate) actions.
46+
47+
- :warning: Some unused packages were removed from the container image, most notably Python 2.
48+
1549
## [1.21.1] - 2021-12-12
1650

1751
### Fixed
@@ -331,6 +365,7 @@ First release of the GitHub Actions:
331365
- [dflook/terraform-new-workspace](terraform-new-workspace)
332366
- [dflook/terraform-destroy-workspace](terraform-destroy-workspace)
333367

368+
[1.22.0]: https://github.com/dflook/terraform-github-actions/compare/v1.21.1...v1.22.0
334369
[1.21.1]: https://github.com/dflook/terraform-github-actions/compare/v1.21.0...v1.21.1
335370
[1.21.0]: https://github.com/dflook/terraform-github-actions/compare/v1.20.1...v1.21.0
336371
[1.20.1]: https://github.com/dflook/terraform-github-actions/compare/v1.20.0...v1.20.1

0 commit comments

Comments
 (0)