Skip to content

Terraform Refresh

Terraform Refresh #17

name: 'Terraform Refresh'
on:
workflow_dispatch:
env:
# Repository specific, contact @bencord0 to rotate
CONSUL_HTTP_TOKEN: ${{ secrets.CONSUL_HTTP_TOKEN }}
permissions:
id-token: write
contents: read
jobs:
terraform-refresh:
name: 'Terraform Refresh'
environment: production
runs-on: ubuntu-latest
strategy:
matrix:
region: ["eu-west-1"]
# region: ["eu-west-1", "eu-west-2", "us-east-1"]
steps:
# Checkout the repository to the GitHub Actions runner
- name: Checkout
uses: actions/checkout@v3
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-session-name: terraform-refresh
role-to-assume: "arn:aws:iam::055237546114:role/terraform-plans-ro"
aws-region: ${{ matrix.region }}
unset-current-credentials: true
disable-retry: true
env:
SHOW_STACK_TRACE: "true"
# Refresh terraform state
- name: Terraform Refresh
run: |
./scripts/debug_aws_credentials.sh
./scripts/terraform_refresh.sh
env:
AWS_DEFAULT_REGION: ${{ matrix.region }}