Releases: OP5dev/TF-via-PR
v11 Pass Command Arguments with more PR Automation
Highlights
- Input individual command arguments instead of a string.
- Expand support for PR automation event triggers.
Added
- Separate input parameters for each command argument passed into TF.
- Leverage github-script instead of bash for handling workflow logic and GitHub API.
- Support for
tenv
to avoid TF wrapper script.
Updated
- Example workflows for common use-cases and event triggers.
- Sample workflow to consolidate with matrix strategy and deployment environments.
- Readme documentation with up-to-date screenshot and guidance.
Changed
-
Refactor input parameter names:
Before After Default command_input
args_*
cli_uses
tf_tool
terraform
label_enable
label_pr
true
plan_outline
outline_enable
true
recreate_comment
update_comment
false
-
Refactor output parameter names:
Before After command
header
comment_summary
summary
plan_id
identifier
tf_fmt
fmt_result
tf_output
last_result
Removed
- Support for
issue_comment
event trigger in order to focus on PR automation events.
Fixed
- #237 by fetching the job name with several methods until GitHub fixes it.
- #238 by enabling compatibility with
workflow_dispatch
event trigger while using0
as a placeholder PR number. - #243 by confirming compatibility with
merge_group
event trigger and documenting workflow example. - #245 by confirming compatibility with
push
event trigger and documenting workflow example.
Secured
- Support for v11.0.0 and above.
Todo
- Add workflow example for interactive PR label trigger.
- Add support for
terragrunt
thin wrapper, per #258.
Commits changelog: v10.7.0...v11.0.0
v11.4.5
Fixed
- Interpolation of
auto-approve
argument (thank you, @chris3ware).
Commits changelog: v11.4.4...v11.4.5
v11.4.4
Fixed
- Correctly parse and retrieve
tenv
versions beyond the latest one (thank you, @ego93!). - New
tenv_arch
input parameter to select atenv
's architecture in place of the default "amd64".
Commits changelog: v11.4.3...v11.4.4
v11.4.3
Fixed
- CI workflow to update major release tag (for real, this time).
Commits changelog: v11.4.2...v11.4.3
v11.4.2
Fixed
- CI workflow to update major release tag.
Removed
- GitHub Codespaces support.
Commits changelog: v11.4.1...v11.4.2
v11.4.1
v11.4.0
Added
- The new
exitcode
output parameter will return0
(succeeded) or1
(failed) by default. By passing inarg_detailed_exitcode: true
, thenexitcode
will return one of the documented exit codes:0
= Succeeded with empty diff (no changes)1
= Error2
= Succeeded with non-empty diff (changes present)
- The
init
command now consumes-var-file
and-var
inputs to complement OpenTofu's early (static) evaluation implementation.
Commits changelog: v11.3.0...v11.4.0
v11.3.0
Added
Optionally pin the version of tenv tool used by TF-via-PR with the new tenv_version
input parameter.
If tf_version
input is being used and the following error is observed:
Failed to detect a version allowing to call terraform : <nil>: Failed to read file; The configuration file "main.tf" could not be read.
There are a few different methods of resolution:
- Pass
tenv_version: 3.1.0
input to revert to previous behaviour. - Set
TFENV_TERRAFORM_VERSION
orTOFUENV_TERRAFORM_VERSION
environment variables, pertenv
. - Use setup-opentofu (example) or setup-terraform (example) with the default wrapper enabled.
Commits changelog: v11.2.0...v11.3.0
v11.2.0
Added
Optionally compare the existing TF plan file with a newly-generated one, in order to prevent stale apply using the new plan_parity
input parameter. Comparison is conducted via normalized string comparison of the plan outlines. If the outlines are identical, the old TF plan file is replaced by the new one before apply, otherwise proceeding as usual.
This is useful in a merge_group-triggered workflow to prevent stale apply, where prior merges may have invalidated the existing TF plan file despite no changes to the plan proposal.
Commits changelog: v11.1.0...v11.2.0
v11.0.2
Updated
- Bump actions/upload-artifact to v4.3.6.
Changed
- Replace
-
separator with.
in TF identifier to avoid naming ambiguity (thank you, @p4perf4ce).
Fixed
- Handle default
pr_number
for all cases beyond supported event triggers (thank you, @p4perf4ce).
New Contributors
- @p4perf4ce made their first contribution in #272.
Commits changelog: v11.0.1...v11.0.2