You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+66-49Lines changed: 66 additions & 49 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -31,9 +31,9 @@ When using an action you can specify the version as:
31
31
32
32
### Added
33
33
- Support for Terraform 1.10 ephemeral input variables.
34
-
34
+
35
35
Terraform 1.10 introduced ephemeral values, which are not stored in the plan or state file.
36
-
Ephemeral variables now work correctly with [dflook/terraform-apply](https://github.com/dflook/terraform-github-actions/tree/main/terraform-apply).
36
+
Ephemeral variables now work correctly with [dflook/terraform-apply](https://github.com/dflook/terraform-github-actions/tree/main/terraform-apply).
37
37
These can be set normally using the `variables` input.
38
38
39
39
## [1.45.0] - 2024-12-24
@@ -70,7 +70,7 @@ When using an action you can specify the version as:
70
70
This is only useful to avoid rate limiting when using the actions with GitHub Enterprise together with OpenTofu.
71
71
72
72
Normally the `GITHUB_TOKEN` environment variable is used for API requests. When using GitHub Enterprise, the `GITHUB_TOKEN` is the token for the GitHub Enterprise instance, and not the GitHub.com API.
73
-
OpenTofu requires the GitHub.com API to fetch release information.
73
+
OpenTofu requires the GitHub.com API to fetch release information.
74
74
75
75
## [1.41.2] - 2024-02-11
76
76
@@ -95,7 +95,7 @@ When using an action you can specify the version as:
95
95
- An optional `plan_path` input for [dflook/terraform-apply](terraform-apply), and matching `plan_path` output for [dflook/terraform-plan](terraform-plan).
96
96
97
97
This allows passing the generated plan from the plan step to the apply step, if you have a secure place to store it.
98
-
98
+
99
99
The default behaviour when this is not set is unchanged - the apply step will generate a fresh plan and compare it to the plan from the PR comment.
100
100
By passing the plan from the plan step to the apply step, the apply step will skip generating a plan and use the passed plan instead.
101
101
It must still match the plan in the PR comment.
@@ -140,29 +140,29 @@ When using an action you can specify the version as:
140
140
When [dflook/terraform-apply](terraform-apply) applies a plan, any PR comment will be updated with the results of the apply, and then no further updates will be made.
141
141
Any further plans generated by [dflook/terraform-plan](terraform-plan) will result in a new plan in a different PR comment.
142
142
143
-
This is to avoid the comment being updated after the plan has been applied, which can be confusing.
143
+
This is to avoid the comment being updated after the plan has been applied, which can be confusing.
144
144
This would only happen if your workflow is to apply changes before merging the PR.
145
145
146
146
## [1.37.0] - 2023-10-29
147
147
148
148
### Added
149
149
150
-
- Experimental support for OpenTofu.
150
+
- Experimental support for OpenTofu.
151
151
152
152
New tofu actions have been added that are identical to the terraform actions, but use OpenTofu instead of Terraform for versions >= 1.6.0.:
As OpenTofu currently only has pre-release versions, OpenTofu will only be selected by using the exact version number.
168
168
The easiest way to do this is by setting the `OPENTOFU_VERSION` environment variable, e.g in your workflow:
@@ -205,7 +205,7 @@ When using an action you can specify the version as:
205
205
## [1.35.0] - 2023-06-18
206
206
207
207
### Added
208
-
- Support for partial or empty cloud blocks. This means you can use a placeholder `cloud` block in your terraform, like so:
208
+
- Support for partial or empty cloud blocks. This means you can use a placeholder `cloud` block in your terraform, like so:
209
209
210
210
```hcl
211
211
terraform {
@@ -249,7 +249,7 @@ terraform {
249
249
250
250
### Changed
251
251
- If a terraform operation fails because the state is locked the `failure-reason` output will now be set to `state-locked`,
252
-
where before it may have been `apply-failed` or `destroy-failed`.
252
+
where before it may have been `apply-failed` or `destroy-failed`.
253
253
254
254
## [1.31.1] - 2022-12-01
255
255
@@ -273,7 +273,7 @@ terraform {
273
273
## [1.29.1] - 2022-10-24
274
274
275
275
### Fixed
276
-
- Multiline string terraform outputs are now properly set as action outputs, and properly masked in the workflow log.
276
+
- Multiline string terraform outputs are now properly set as action outputs, and properly masked in the workflow log.
277
277
278
278
## [1.29.0] - 2022-10-17
279
279
@@ -321,15 +321,16 @@ terraform {
321
321
## [1.25.0] - 2022-05-06
322
322
323
323
### Added
324
-
- New `run_id` output for [dflook/terraform-plan](https://github.com/dflook/terraform-github-actions/tree/main/terraform-plan) and [dflook/terraform-apply](https://github.com/dflook/terraform-github-actions/tree/main/terraform-apply) which are set when using Terraform Cloud/Enterprise. It is the remote run-id of the plan or apply operation.
324
+
- New `run_id` output for [dflook/terraform-plan](https://github.com/dflook/terraform-github-actions/tree/main/terraform-plan) and [dflook/terraform-apply](https://github.com/dflook/terraform-github-actions/tree/main/terraform-apply) which are set when using Terraform Cloud/Enterprise.
325
+
It is the remote run-id of the plan or apply operation.
325
326
- The `json_plan_path` output of [dflook/terraform-plan](https://github.com/dflook/terraform-github-actions/tree/main/terraform-plan) now works when using Terraform Cloud/Enterprise.
326
327
327
328
## [1.24.0] - 2022-05-03
328
329
329
330
### Added
330
331
- New `to_add`, `to_change` and `to_destroy` outputs for the [dflook/terraform-plan](https://github.com/dflook/terraform-github-actions/tree/main/terraform-plan) action that contain the number of resources that would be added, changed or deleted by the plan.
331
332
332
-
These can be used in an [if expression](https://docs.github.com/en/enterprise-server@3.2/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idif) in a workflow to conditionally run steps, e.g. when the plan would destroy something.
333
+
These can be used in an [if expression](https://docs.github.com/en/enterprise-server@3.2/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idif) in a workflow to conditionally run steps, e.g. when the plan would destroy something.
333
334
334
335
## [1.23.0] - 2022-05-02
335
336
@@ -343,7 +344,7 @@ terraform {
343
344
### Fixed
344
345
- Pre-release terraform versions now won't be used when selecting the latest terraform version.
345
346
- Invalid terraform files that contained an unterminated string would take an extremely long time to parse before failing the job.
346
-
- [dflook/terraform-validate](https://github.com/dflook/terraform-github-actions/tree/main/terraform-validate) now automatically sets `terraform.workspace` to `default` when validating a module that uses a `remote` or `cloud` backend.
347
+
- [dflook/terraform-validate](https://github.com/dflook/terraform-github-actions/tree/main/terraform-validate) now automatically sets `terraform.workspace` to `default` when validating a module that uses a `remote` or `cloud` backend.
347
348
348
349
## [1.22.2] - 2022-02-28
349
350
@@ -360,16 +361,17 @@ terraform {
360
361
361
362
### Added
362
363
- 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:
363
-
- [dflook/terraform-new-workspace](https://github.com/dflook/terraform-github-actions/tree/main/terraform-new-workspace) can now create the first workspace
364
-
- [dflook/terraform-destroy-workspace](https://github.com/dflook/terraform-github-actions/tree/main/terraform-destroy-workspace) can now delete the last remaining workspace
365
-
- [dflook/terraform-new-workspace](https://github.com/dflook/terraform-github-actions/tree/main/terraform-new-workspace) and [dflook/terraform-destroy-workspace](https://github.com/dflook/terraform-github-actions/tree/main/terraform-destroy-workspace) work with a `remote` backend that specifies a workspace by `name`
364
+
* [dflook/terraform-new-workspace](https://github.com/dflook/terraform-github-actions/tree/main/terraform-new-workspace) can now create the first workspace
365
+
* [dflook/terraform-destroy-workspace](https://github.com/dflook/terraform-github-actions/tree/main/terraform-destroy-workspace) can now delete the last remaining workspace
366
+
* [dflook/terraform-new-workspace](https://github.com/dflook/terraform-github-actions/tree/main/terraform-new-workspace) and [dflook/terraform-destroy-workspace](https://github.com/dflook/terraform-github-actions/tree/main/terraform-destroy-workspace)
367
+
work with a `remote` backend that specifies a workspace by `name`
366
368
367
369
- The terraform version to use will now be detected from additional places:
368
370
369
-
-The terraform version set in the remote workspace when using Terraform Cloud/Enterprise as the backend
-The terraform version that wrote an existing state file
372
-
-A `TERRAFORM_VERSION` environment variable
371
+
* The terraform version set in the remote workspace when using Terraform Cloud/Enterprise as the backend
372
+
* An [asdf](https://asdf-vm.com/) `.tool-versions` file
373
+
* The terraform version that wrote an existing state file
374
+
* A `TERRAFORM_VERSION` environment variable
373
375
374
376
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.
375
377
@@ -378,13 +380,19 @@ terraform {
378
380
### Changed
379
381
As a result of the above terraform version detection additions, note these changes:
380
382
381
-
- 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/main/terraform-fmt), [dflook/terraform-fmt-check](https://github.com/dflook/terraform-github-actions/tree/main/terraform-fmt-check) and [dflook/terraform-validate](https://github.com/dflook/terraform-github-actions/tree/main/terraform-validate).
383
+
- Actions always use the terraform version set in the remote workspace when using TFC/E, if it exists. This mostly
- 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.
384
389
385
390
- 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`)
386
391
387
-
- 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/main/terraform-fmt), [dflook/terraform-fmt-check](https://github.com/dflook/terraform-github-actions/tree/main/terraform-fmt-check) and [dflook/terraform-validate](https://github.com/dflook/terraform-github-actions/tree/main/terraform-validate) actions.
392
+
- All actions now support the inputs and environment variables related to the backend, for discovering the terraform
393
+
version from a TFC/E workspace or remote state. This add the inputs `workspace`, `backend_config`,
394
+
`backend_config_file`, and the `TERRAFORM_CLOUD_TOKENS` environment variable to the [dflook/terraform-fmt](https://github.com/dflook/terraform-github-actions/tree/main/terraform-fmt),
395
+
[dflook/terraform-fmt-check](https://github.com/dflook/terraform-github-actions/tree/main/terraform-fmt-check) and [dflook/terraform-validate](https://github.com/dflook/terraform-github-actions/tree/main/terraform-validate) actions.
388
396
389
397
- :warning: Some unused packages were removed from the container image, most notably Python 2.
390
398
@@ -394,14 +402,14 @@ As a result of the above terraform version detection additions, note these chang
394
402
- [dflook/terraform-new-workspace](https://github.com/dflook/terraform-github-actions/tree/main/terraform-new-workspace) support for Terraform v1.1.0.
395
403
396
404
This stopped working after a change in the behaviour of terraform init.
397
-
405
+
398
406
There is an outstanding [issue in Terraform v1.1.0](https://github.com/hashicorp/terraform/issues/30129) using the `remote` backend that prevents creating a new workspace when no workspaces currently exist.
399
407
If you are affected by this, you can pin to an earlier version of Terraform using one of methods listed in the [dflook/terraform-version](https://github.com/dflook/terraform-github-actions/tree/main/terraform-version#terraform-version-action) docs.
400
408
401
409
## [1.21.0] - 2021-12-04
402
410
403
411
### Added
404
-
- A new `workspace` input for [dflook/terraform-validate](https://github.com/dflook/terraform-github-actions/tree/main/terraform-validate)
412
+
- A new `workspace` input for [dflook/terraform-validate](https://github.com/dflook/terraform-github-actions/tree/main/terraform-validate)
405
413
allows validating usage of `terraform.workspace` in the terraform code.
406
414
407
415
Terraform doesn't initialize `terraform.workspace` based on the backend configuration when running a validate operation.
@@ -420,7 +428,8 @@ As a result of the above terraform version detection additions, note these chang
420
428
421
429
These are paths to the generated plan in human-readable and JSON formats.
422
430
423
-
If the plan generated by [dflook/terraform-plan](https://github.com/dflook/terraform-github-actions/tree/main/terraform-plan) is different from the plan generated by [dflook/terraform-apply](https://github.com/dflook/terraform-github-actions/tree/main/terraform-apply) the apply step will fail with `failure-reason` set to `plan-changed`.
431
+
If the plan generated by [dflook/terraform-plan](https://github.com/dflook/terraform-github-actions/tree/main/terraform-plan) is different from the plan generated by
432
+
[dflook/terraform-apply](https://github.com/dflook/terraform-github-actions/tree/main/terraform-apply) the apply step will fail with `failure-reason` set to `plan-changed`.
424
433
These new outputs make it easier to inspect the differences.
425
434
426
435
## [1.19.0] - 2021-11-01
@@ -454,6 +463,13 @@ As a result of the above terraform version detection additions, note these chang
- [dflook/terraform-validate](https://github.com/dflook/terraform-github-actions/tree/master/terraform-validate) was sometimes unable to create detailed check failures.
@@ -525,6 +541,7 @@ As a result of the above terraform version detection additions, note these chang
525
541
The runtime image is currently based on `debian:buster`, with the command run using `bash -xeo pipefail`.
526
542
527
543
For example:
544
+
528
545
```yaml
529
546
env:
530
547
TERRAFORM_PRE_RUN: |
@@ -550,7 +567,7 @@ As a result of the above terraform version detection additions, note these chang
550
567
551
568
### Changed
552
569
- Improved messaging in the workflow log when [terraform-apply](https://github.com/dflook/terraform-github-actions/tree/master/terraform-apply) is aborted because the plan has changed
553
-
- Update documentation for `backend_config`, `backend_config_file`, `var_file` & `target` inputs to use separate lines for multiple values.
570
+
- Update documentation for `backend_config`, `backend_config_file`, `var_file` & `target` inputs to use separate lines for multiple values.
554
571
Multiple values may still be separated by commas if preferred.
555
572
556
573
## [1.10.0] - 2021-05-30
@@ -587,9 +604,9 @@ As a result of the above terraform version detection additions, note these chang
587
604
588
605
### Deprecated
589
606
- The `var` input has been deprecated due to the following limitations:
590
-
-Only primitive types can be set with `var` - number, bool and string.
591
-
-String values may not contain a comma.
592
-
-Values set with `var` will be overridden by values contained in `var_file`s
607
+
* Only primitive types can be set with `var` - number, bool and string.
608
+
* String values may not contain a comma.
609
+
* Values set with `var` will be overridden by values contained in `var_file`s
593
610
594
611
`variables`is the preferred way to set input variables.
0 commit comments