Skip to content

Commit

Permalink
chore(ci): add terraform checks job
Browse files Browse the repository at this point in the history
  • Loading branch information
tweakster committed Sep 24, 2024
1 parent de23689 commit a344022
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/terraform_checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Terraform checks and linting

on: [push]

jobs:
terraform-lint-format:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Run Terraform Action from oak-terraform-actions
uses: oaknational/oak-terraform-actions/actions/terraform-checks@feat/ENG-966-allow-modules
with:
terraform_base_dir: modules
env:
TF_WORKSPACE: ci-cd # This is necessary due to the use of Terraform Workspaces and if undefined it will be `default`

10 changes: 10 additions & 0 deletions .tflint.hcl
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
plugin "terraform" {
enabled = true
preset = "all"
}

plugin "google" {
enabled = true
version = "0.30.0"
source = "github.com/terraform-linters/tflint-ruleset-google"
}

0 comments on commit a344022

Please sign in to comment.