Potential fix for code scanning alert no. 1: Workflow does not contain permissions #55
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Terraform Lint | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| jobs: | |
| terraform-lint: | |
| name: Lint Terraform code | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Terraform | |
| uses: hashicorp/setup-terraform@v3 | |
| with: | |
| terraform_version: 0.13.1 | |
| - name: Terraform Init | |
| id: init | |
| run: terraform init -input=false | |
| - name: Terraform Format Check | |
| id: fmt | |
| run: terraform fmt -check -recursive | |
| continue-on-error: true | |
| - name: Terraform Format Diff | |
| if: failure() | |
| run: terraform fmt -diff -recursive | |
| - name: Terraform Validate | |
| run: terraform validate |