Skip to content

Commit

Permalink
🔖 v1.38.0
Browse files Browse the repository at this point in the history
  • Loading branch information
dflook committed Dec 8, 2023
1 parent 5bac65e commit e67215d
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 3 deletions.
33 changes: 31 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,45 @@
# Changelog
This is the changelog for [dflook/terraform-github-actions](https://github.com/dflook/terraform-github-actions)
All notable changes to this project will be documented in this file.

For more information see the [README.md](README.md).

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

The actions are versioned as a suite. Some actions may have no change in behaviour between versions.

When using an action you can specify the version as:

- `@v1.37.0` to use an exact release
- `@v1.37` to use the latest patch release for the specific minor version
- `@v1.38.0` to use an exact release
- `@v1.38` to use the latest patch release for the specific minor version
- `@v1` to use the latest patch release for the specific major version

## [1.38.0] - 2023-12-08

### 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 the `add_github_comment` input of [dflook/terraform-plan](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](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](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.

## [1.37.0] - 2023-10-29

### Added
Expand Down Expand Up @@ -576,6 +604,7 @@ First release of the GitHub Actions:
- [dflook/terraform-new-workspace](terraform-new-workspace)
- [dflook/terraform-destroy-workspace](terraform-destroy-workspace)

[1.38.0]: https://github.com/dflook/terraform-github-actions/compare/v1.37.0...v1.38.0
[1.37.0]: https://github.com/dflook/terraform-github-actions/compare/v1.36.2...v1.37.0
[1.36.2]: https://github.com/dflook/terraform-github-actions/compare/v1.36.1...v1.36.2
[1.36.1]: https://github.com/dflook/terraform-github-actions/compare/v1.36.0...v1.36.1
Expand Down
5 changes: 4 additions & 1 deletion terraform-plan/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,11 @@ The [dflook/terraform-apply](https://github.com/dflook/terraform-github-actions/

* `add_github_comment`

Controls whether a comment is added to the PR with the generated plan.

The default is `true`, which adds a comment to the PR with the results of the plan.
Set to `changes-only` to add a comment only when the plan indicates there are changes to apply.
Set to `always-new` to always create a new comment for each plan, instead of updating the previous comment.
Set to `false` to disable the comment - the plan will still appear in the workflow log.

- Type: string
Expand Down Expand Up @@ -345,7 +348,7 @@ The [dflook/terraform-apply](https://github.com/dflook/terraform-github-actions/

## Workflow events

When adding the plan to a PR comment (`add_github_comment` is set to `true`/`changes-only`), the workflow can be triggered by the following events:
When adding the plan to a PR comment (`add_github_comment` is not `false`), the workflow can be triggered by the following events:

- pull_request
- pull_request_review_comment
Expand Down

0 comments on commit e67215d

Please sign in to comment.