chore(deps): update terraform google to v7.7.0 (#169) #15
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 CI | |
| on: | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - 'terraform/**' | |
| pull_request: | |
| branches: | |
| - main | |
| paths: | |
| - 'terraform/**' | |
| jobs: | |
| terraform-lint: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | |
| - name: Get Terraform version from mise.toml | |
| id: terraform-version | |
| run: | | |
| if grep -q 'terraform = "latest"' mise.toml; then | |
| echo "version=latest" >> $GITHUB_OUTPUT | |
| else | |
| version=$(grep 'terraform = ' mise.toml | sed 's/.*terraform = "\(.*\)".*/\1/') | |
| echo "version=$version" >> $GITHUB_OUTPUT | |
| fi | |
| - name: Setup Terraform | |
| uses: hashicorp/setup-terraform@b9cd54a3c349d3f38e8881555d616ced269862dd # v3.1.2 | |
| with: | |
| terraform_version: ${{ steps.terraform-version.outputs.version }} | |
| - name: Setup TFLint | |
| uses: terraform-linters/setup-tflint@acd1575d3c037258ce5b2dd01379dc49ce24c6b7 # v6.2.0 | |
| with: | |
| tflint_version: latest | |
| - name: Terraform Format Check | |
| run: | | |
| cd terraform | |
| terraform fmt -check -recursive | |
| - name: TFLint | |
| run: | | |
| cd terraform | |
| tflint | |
| infracost: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | |
| - name: Get Terraform version from mise.toml | |
| id: terraform-version | |
| run: | | |
| if grep -q 'terraform = "latest"' mise.toml; then | |
| echo "version=latest" >> $GITHUB_OUTPUT | |
| else | |
| version=$(grep 'terraform = ' mise.toml | sed 's/.*terraform = "\(.*\)".*/\1/') | |
| echo "version=$version" >> $GITHUB_OUTPUT | |
| fi | |
| - name: Setup Terraform | |
| uses: hashicorp/setup-terraform@b9cd54a3c349d3f38e8881555d616ced269862dd # v3.1.2 | |
| with: | |
| terraform_version: ${{ steps.terraform-version.outputs.version }} | |
| - name: Setup Infracost | |
| uses: infracost/actions/setup@e9d6e6cd65e168e76b0de50ff9957d2fe8bb1832 # v3.0.1 | |
| with: | |
| api-key: ${{ secrets.INFRACOST_API_KEY }} | |
| - name: Generate Infracost cost estimate baseline | |
| run: | | |
| infracost breakdown --path=terraform \ | |
| --format=json \ | |
| --out-file=/tmp/infracost-base.json | |
| - name: Generate Infracost diff | |
| run: | | |
| infracost diff --path=terraform \ | |
| --format=json \ | |
| --out-file=/tmp/infracost.json \ | |
| --compare-to=/tmp/infracost-base.json | |
| - name: Post Infracost comment | |
| run: | | |
| infracost comment github --path=/tmp/infracost.json \ | |
| --repo=$GITHUB_REPOSITORY \ | |
| --github-token=${{github.token}} \ | |
| --pull-request=${{github.event.pull_request.number}} \ | |
| --behavior=update | |
| if: github.event_name == 'pull_request' |