Releases: dflook/terraform-github-actions
v1.38.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@v3
- uses: dflook/terraform-plan@v1.38.0
with:
path: my-terraform-config
You can specify an action version as:
@v1.38.0
to use exactly this release@v1.38
to use the latest patch release for this specific minor version@v1
to use the latest patch release for this specific major version
Changes
Added
-
Terraform outputs are added to the PR comment after the plan is applied.
This is useful for seeing the values of outputs that are only available after apply, e.g. the public IP of a created resource.
Previously this was only visible in the workflow log. -
The new
always-new
option for theadd_github_comment
input of dflook/terraform-plan.This will always add a new comment for each plan that is generated, instead of updating an existing comment if one exists.
This can be preferable if you are iterating on a plan and want to see each plan in the correct place in the PR timeline.The default behaviour is unchanged and will update an existing comment if one exists, hiding outdated plans. The history of the plan is visible in the comment history.
Changed
-
PR comments will no longer be updated once a plan has been applied.
When dflook/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. Any further plans generated by dflook/terraform-plan will result in a new plan in a different PR comment.
This is to avoid the comment being updated after the plan has been applied, which can be confusing.
This would only happen if your workflow is to apply changes before merging the PR.
v1.37.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@v3
- uses: dflook/terraform-plan@v1.37.0
with:
path: my-terraform-config
You can specify an action version as:
@v1.37.0
to use exactly this release@v1.37
to use the latest patch release for this specific minor version@v1
to use the latest patch release for this specific major version
Changes
Added
-
Experimental support for OpenTofu.
New tofu actions have been added that are identical to the terraform actions, but uses OpenTofu instead of Terraform for versions >=1.6.0:
- dflook/tofu-version
- dflook/tofu-remote-state
- dflook/tofu-output
- dflook/tofu-validate
- dflook/tofu-fmt-check
- dflook/tofu-fmt
- dflook/tofu-check
- dflook/tofu-plan
- dflook/tofu-apply
- dflook/tofu-destroy
- dflook/tofu-new-workspace
- dflook/tofu-destroy-workspace
- dflook/tofu-unlock-state
As OpenTofu currently only has pre-release versions, OpenTofu will only be selected by using the exact version number.
The easiest way to do this is by setting theOPENTOFU_VERSION
environment variable, e.g in your workflow:env: OPENTOFU_VERSION: 1.6.0-alpha3
Setting
OPENTOFU_VERSION
with thedflook/terraform-*
actions will cause it to behave as if it was thedflook/tofu-*
action.
v1.36.2
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@v3
- uses: dflook/terraform-plan@v1.36.2
with:
path: my-terraform-config
You can specify an action version as:
@v1.36.2
to use exactly this release@v1.36
to use the latest patch release for this specific minor version@v1
to use the latest patch release for this specific major version
Changes
Fixed
- When no terraform version is specified and no state file exists the actions will now use the latest terraform version, instead of incorrectly using Terraform 0.9.
v1.36.1
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@v3
- uses: dflook/terraform-plan@v1.36.1
with:
path: my-terraform-config
You can specify an action version as:
@v1.36.1
to use exactly this release@v1.36
to use the latest patch release for this specific minor version@v1
to use the latest patch release for this specific major version
Changes
Fixed
- The selected workspace was not being shown in the workflow log when using a partial cloud block.
v1.36.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@v3
- uses: dflook/terraform-plan@v1.36.0
with:
path: my-terraform-config
You can specify an action version as:
@v1.36.0
to use exactly this release@v1.36
to use the latest patch release for this specific minor version@v1
to use the latest patch release for this specific major version
Changes
Added
-
Support for being triggered by repository_dispatch events.
Previously dflook/terraform-plan and dflook/terraform-apply couldn't work with PR comments when triggered by
repository_dispatch
events. With this changerepository_dispatch
events that include the PR api url in the client payload will be able to use PR comments.The minimum client payload looks like:
{ "pull_request": { "url": "https://api.github.com/repos/dflook/terraform-github-actions/pulls/1" } }
v1.35.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@v3
- uses: dflook/terraform-plan@v1.35.0
with:
path: my-terraform-config
You can specify an action version as:
@v1.35.0
to use exactly this release@v1.35
to use the latest patch release for this specific minor version@v1
to use the latest patch release for this specific major version
Changes
Added
- Support for partial or empty cloud blocks. This means you can use a placeholder
cloud
block in your terraform, like so:
terraform {
cloud {
}
}
The configuration will be completed with the TF_CLOUD_ORGANIZATION
and TF_CLOUD_HOSTNAME
environment variables - the workspace should be specified using the workspace
input.
As always, any tokens can be supplied in the TERRAFORM_CLOUD_TOKENS
environment variable.
v1.34.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@v3
- uses: dflook/terraform-plan@v1.34.0
with:
path: my-terraform-config
You can specify an action version as:
@v1.34.0
to use exactly this release@v1.34
to use the latest patch release for this specific minor version@v1
to use the latest patch release for this specific major version
Changes
Added
- The action image now also builds for
arm64
, meaning these actions will work on linux/arm64 runners.
Fixed
- Workaround Terraform 1.4.0 sometimes forgetting to output anything.
v1.33.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@v3
- uses: dflook/terraform-plan@v1.33.0
with:
path: my-terraform-config
You can specify an action version as:
@v1.33.0
to use exactly this release@v1.33
to use the latest patch release for this specific minor version@v1
to use the latest patch release for this specific major version
Changes
Added
-
The dflook/terraform-plan and dflook/terraform-apply actions now have a
destroy
input.
When settingdestroy: true
terraform will run in destroy mode, planning the destruction of all resources.
This allows reviewing the effect of a destroy before applying it.The dflook/terraform-destroy action is unchanged and will still immediately destroy all resources.
v1.32.1
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@v3
- uses: dflook/terraform-plan@v1.32.1
with:
path: my-terraform-config
You can specify an action version as:
@v1.32.1
to use exactly this release@v1.32
to use the latest patch release for this specific minor version@v1
to use the latest patch release for this specific major version
Changes
Fixed
- When triggered by
issue_comment
orpull_request_review_comment
events, the action will again add a 👍 reaction to the comment. This stopped working in v1.30.0
v1.32.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@v3
- uses: dflook/terraform-plan@v1.32.0
with:
path: my-terraform-config
You can specify an action version as:
@v1.32.0
to use exactly this release@v1.32
to use the latest patch release for this specific minor version@v1
to use the latest patch release for this specific major version
Changes
Added
- A new dflook/terraform-state-unlock action. Thanks patricktalmeida for working on this!
- Actions that fail because the state was locked will now have the
failure-reason
output set tostate-locked
.
They also have a newlock-info
output which is a json object with any available lock information.
This affects dflook/terraform-apply, dflook/terraform-destroy, and dflook/terraform-destroy-worksapce.
Changed
- If a terraform operation fails because the state is locked the
failure-reason
output will now be set tostate-locked
, where before it may have beenapply-failed
ordestroy-failed
.