From 3e92bcef4de8fd36473b06fc55eb4c0acfe0f778 Mon Sep 17 00:00:00 2001 From: Amy Matthews Date: Tue, 24 Sep 2024 12:29:12 +0100 Subject: [PATCH] chore(ci): add terraform checks job --- .github/workflows/terraform_checks.yml | 16 ++++++++++++++++ .tflint.hcl | 10 ++++++++++ 2 files changed, 26 insertions(+) create mode 100644 .github/workflows/terraform_checks.yml create mode 100644 .tflint.hcl diff --git a/.github/workflows/terraform_checks.yml b/.github/workflows/terraform_checks.yml new file mode 100644 index 0000000..1eff684 --- /dev/null +++ b/.github/workflows/terraform_checks.yml @@ -0,0 +1,16 @@ +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@main + with: + terraform_base_dir: modules diff --git a/.tflint.hcl b/.tflint.hcl new file mode 100644 index 0000000..7742dc4 --- /dev/null +++ b/.tflint.hcl @@ -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" +} \ No newline at end of file