From a56ebf53bd4ad80e5b30f7ffa673b4fcdd02af9a Mon Sep 17 00:00:00 2001 From: Tristan Watson Date: Fri, 23 Aug 2024 15:08:11 +0100 Subject: [PATCH 1/2] fix(ENG-899): adding a check to ensure that TFLint file exists for newer projects --- actions/terraform-checks/action.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/actions/terraform-checks/action.yml b/actions/terraform-checks/action.yml index 3ce2917..4f5776a 100644 --- a/actions/terraform-checks/action.yml +++ b/actions/terraform-checks/action.yml @@ -9,6 +9,15 @@ runs: with: terraform_version: ${{ inputs.terraform_version }} + - name: Check for .tflint.hcl file + run: | + if [ -f .tflint.hcl ]; then + echo "INFO: .tflint.hcl file found in the root directory." + else + echo "ERROR: .tflint.hcl file is missing. Please add it to the root of the repository. See the internal terraform docs" + exit 1 + fi + - name: Cache plugin dir uses: actions/cache@v4 with: From 47df0cd645c2b87abd5ca81438e463a10c6bc211 Mon Sep 17 00:00:00 2001 From: Tristan Watson Date: Fri, 23 Aug 2024 15:58:54 +0100 Subject: [PATCH 2/2] fix(ENG-899): adding shell to tfaction --- actions/terraform-checks/action.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/actions/terraform-checks/action.yml b/actions/terraform-checks/action.yml index 4f5776a..894d859 100644 --- a/actions/terraform-checks/action.yml +++ b/actions/terraform-checks/action.yml @@ -10,6 +10,7 @@ runs: terraform_version: ${{ inputs.terraform_version }} - name: Check for .tflint.hcl file + shell: bash run: | if [ -f .tflint.hcl ]; then echo "INFO: .tflint.hcl file found in the root directory."