ci: add HCL validate/fmt workflow and Makefile targets for #71 (Phase 1)#100
Merged
ci: add HCL validate/fmt workflow and Makefile targets for #71 (Phase 1)#100
Conversation
Adds .github/workflows/validate.yml running terraform validate and terraform fmt -check on all three templates for every push/PR. Adds make validate and make fmt-check as local equivalents. Also applies terraform fmt fixes to all three templates so CI passes from the first run. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The Issue
Part of #71 (automated testing). Phase 1: static HCL validation that requires no live infrastructure.
How This PR Solves The Issue
Adds
.github/workflows/validate.ymlwhich runs on every push and PR:terraform validate— checks HCL syntax and provider schema correctness for each of the three templates (user-defined-web,drupal-core,freeform) using a matrix jobterraform fmt -check -recursive— enforces consistent formatting across all templatesAlso adds
make validateandmake fmt-checkas local equivalents so the same checks can be run before pushing.Applies
terraform fmtfixes to all three templates so CI passes immediately from the first run.Manual Testing Instructions
Automated Testing Overview
This PR is the automated testing — the workflow will run on this PR itself and on all future PRs, providing immediate feedback on HCL syntax and formatting issues.
Release/Deployment Notes
No impact on deployed templates or workspaces. CI-only change.