From 3e92bcef4de8fd36473b06fc55eb4c0acfe0f778 Mon Sep 17 00:00:00 2001 From: Amy Matthews Date: Tue, 24 Sep 2024 12:29:12 +0100 Subject: [PATCH 1/2] 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 From 848dcd3f7186cb8614d7b27cd67b131837d30ae1 Mon Sep 17 00:00:00 2001 From: Amy Matthews Date: Tue, 24 Sep 2024 13:47:46 +0100 Subject: [PATCH 2/2] chore(terraform): add terraform version file to repo --- .terraform-version | 1 + 1 file changed, 1 insertion(+) create mode 100644 .terraform-version diff --git a/.terraform-version b/.terraform-version new file mode 100644 index 0000000..d615fd0 --- /dev/null +++ b/.terraform-version @@ -0,0 +1 @@ +1.9.4