Skip to content

feat: modernise terraform workflows and actions - #132

Open
sdh100shaun wants to merge 1 commit into
mainfrom
chore/modernise-terraform-workflows
Open

sdh100shaun wants to merge 1 commit into
mainfrom
chore/modernise-terraform-workflows

Conversation

@sdh100shaun

Copy link
Copy Markdown
Contributor

Description

Modernise the Terraform static workflows and composite actions: install and configure Terraform and TFLint, provide a fallback TFLint config, add optional per-directory validation, correct scheduling and update the documentation. Changed-file lint findings are filtered after recursive scanning so nested Terraform files are handled correctly.

Related issue: N/A

Before submitting (or marking as "ready for review")

  • Does the pull request title follow the conventional commit specification?
  • Have you performed a self-review of the code
  • Have you have added tests that prove the fix or feature is effective and working
  • Did you make sure to update any documentation relating to this change?

Validation: actionlint and shellcheck passed for the changed workflows, and shellcheck passed for the composite action scripts. Nine isolated integration checks passed using Terraform 1.9.8, TFLint 0.66.0 and mocked failure paths; the checks were not added to the repository. A consumer-repository GitHub Actions run has not been performed.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The consumer template does not declare or forward dispatch inputs, preventing manual runs from selecting the documented Terraform/TFLint versions or enabling validation.

1 open issue
What changed in this PR

Modernises the shared Terraform workflows and composite actions used by consumer repositories, improving tool setup, changed-file checks and optional validation.

Changes:

  • Adds configurable Terraform/TFLint versions, fallback lint configuration and per-directory validation.
  • Improves composite-action argument handling, formatting options, workspace preservation and artifact controls.
  • Corrects the weekly schedule, adds manual triggers and updates documentation.
File Description
workflow-templates/​terraform-static.yaml Adds manual dispatch and read-only permissions.
workflow-templates/​terraform-static.properties.json Updates the changed-file workflow description.
workflow-templates/​terraform-static-full.yaml Corrects the weekly schedule and adds manual dispatch.
workflow-templates/​terraform-static-full.properties.json Documents scheduling and optional validation.
README.md Documents workflow inputs, validation and caller configuration.
.github/​workflows/​terraform-static.yaml Adds tool setup, recursive lint filtering and affected-directory validation.
.github/​workflows/​terraform-static-full.yaml Adds configurable tools, fallback lint configuration and repository-wide validation.
.github/​actions/​terraform-workspace/​README.md Documents initialization, directory selection and workspace export.
.github/​actions/​terraform-workspace/​action.yml Preserves untracked files and supports configuration directories.
.github/​actions/​terraform-fmt/​README.md Documents formatting inputs and defaults.
.github/​actions/​terraform-fmt/​action.yml Corrects formatting flag handling and quotes arguments.
.github/​actions/​terraform-action/​README.md Updates prerequisites, inputs and usage examples.
.github/​actions/​terraform-action/​action.yml Improves argument parsing, failure propagation and artifact controls.

Review effort: Balanced

schedule:
- cron: '* 6 * * mon'
- cron: '0 6 * * mon'
workflow_dispatch:

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues are recorded for the Terraform workflow and composite-action updates.

1 open issue

Review effort: Balanced

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants