Bump hashicorp/aws from 6.34.0 to 6.39.0 in /terraform (#165) #263
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 | |
| on: | |
| pull_request: | |
| branches: | |
| - main | |
| paths: | |
| - "terraform/**" | |
| - ".github/workflows/terraform.yml" | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - "terraform/**" | |
| - ".github/workflows/terraform.yml" | |
| schedule: | |
| - cron: "0 21 1 * 0" | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| lint: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - name: Setup TFLint | |
| uses: terraform-linters/setup-tflint@b480b8fcdaa6f2c577f8e4fa799e89e756bb7c93 # v6.2.2 | |
| with: | |
| tflint_version: "latest" | |
| tflint_wrapper: false | |
| - name: Init TFLint | |
| run: tflint --init | |
| env: | |
| GITHUB_TOKEN: ${{ github.token }} | |
| working-directory: ./terraform | |
| - name: Terraform linting | |
| id: tflint | |
| run: tflint -f compact --minimum-failure-severity notice | |
| working-directory: ./terraform | |
| analyze: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 | |
| with: | |
| python-version: "3.14" | |
| architecture: "x64" | |
| - name: Install dependencies | |
| run: pip install -r requirements.txt | |
| working-directory: ./terraform | |
| - name: Terraform analysis | |
| run: checkov --quiet --compact | |
| working-directory: ./terraform | |
| deploy: | |
| if: ${{ github.event_name != 'schedule' }} | |
| runs-on: ubuntu-latest | |
| needs: [lint, analyze] | |
| permissions: | |
| id-token: write | |
| contents: read | |
| env: | |
| lambda_package: ${{ vars.LAMBDA_PACKAGE }} | |
| TF_VAR_bucket_name: ${{ secrets.RSS_FEEDS_BUCKET }} | |
| TF_VAR_topic_name: ${{ secrets.RSS_FEEDS_TOPIC }} | |
| TF_VAR_alarm_topic_name: ${{ secrets.RSS_FEEDS_ALARM_TOPIC }} | |
| TF_VAR_rss_feeds_urls: ${{ vars.RSS_FEEDS_URLS }} | |
| TF_VAR_lambda_name: ${{ vars.LAMBDA_NAME }} | |
| TF_VAR_lambda_package_path: ${{ github.workspace}}/${{ vars.LAMBDA_PACKAGE }} | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - name: Configure AWS Credentials | |
| uses: aws-actions/configure-aws-credentials@8df5847569e6427dd6c4fb1cf565c83acfa8afa7 # v6.0.0 | |
| with: | |
| aws-region: ${{ vars.AWS_REGION }} | |
| role-to-assume: ${{ secrets.AWS_ROLE }} | |
| - name: Create dummy package | |
| run: zip -j ${{ vars.LAMBDA_PACKAGE }} handler.py | |
| - name: Setup Terraform | |
| uses: hashicorp/setup-terraform@5e8dbf3c6d9deaf4193ca7a8fb23f2ac83bb6c85 # v4.0.0 | |
| - name: Terraform format | |
| run: terraform fmt -check | |
| working-directory: ./terraform | |
| - name: Terraform init | |
| run: terraform init -backend-config="bucket=${{ secrets.TF_STATE_BUCKET }}" | |
| working-directory: ./terraform | |
| - name: Terraform plan | |
| run: terraform plan -out=tfplan | |
| working-directory: ./terraform | |
| - name: Terraform apply | |
| if: ${{ (github.event_name == 'push' || github.event_name == 'workflow_dispatch')}} | |
| run: terraform apply -auto-approve tfplan | |
| working-directory: ./terraform |