aboutsummaryrefslogtreecommitdiffstats
path: root/.github
diff options
context:
space:
mode:
authorAlex Schofield <git@ajschof.me>2024-08-13 15:59:08 +0100
committerAlex Schofield <git@ajschof.me>2024-08-13 15:59:08 +0100
commit43cc61cd535609b59948ba75d8d9ea859bf8d990 (patch)
tree13da3830fe35edf44277d3283c06af0e60b6b689 /.github
parent8bbf8803473badc357a9747a5ccff32c8aea4dc8 (diff)
downloadde-project-bentley-43cc61cd535609b59948ba75d8d9ea859bf8d990.tar.gz
de-project-bentley-43cc61cd535609b59948ba75d8d9ea859bf8d990.zip
ci: add terraform quality checks
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/terraform.yml34
1 files changed, 34 insertions, 0 deletions
diff --git a/.github/workflows/terraform.yml b/.github/workflows/terraform.yml
new file mode 100644
index 0000000..d28a357
--- /dev/null
+++ b/.github/workflows/terraform.yml
@@ -0,0 +1,34 @@
+name: terraform-quality-checks
+
+on:
+ push:
+ branches: [development]
+ paths:
+ - 'terraform/**.tf'
+ - 'terraform/**.tfvars'
+ pull_request:
+ branches: [development, staging]
+ paths:
+ - 'terraform/**.tf'
+ - 'terraform/**.tfvars'
+jobs:
+ terraform-validation:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v2
+ - name: Setup Terraform
+ uses: hashicorp/setup-terraform@v1
+ with:
+ terraform_version: latest # Using the latest version, but not sure if it's the best practice
+ - name: Format
+ run: terraform fmt -check -recursive
+ - name: Init
+ run: terraform init -backend=false
+ - name: Validate
+ run: terraform validate
+ - name: Setup TFLint
+ uses: terraform-linters/setup-tflint@v2
+ with:
+ tflint_version: latest
+ - name: Run TFLint
+ run: tflint -f compact \ No newline at end of file
git.ajschof.me — hosted by ajschofield — powered by cgit