Skip to content

DT-755 Update terraform and providers #307

DT-755 Update terraform and providers

DT-755 Update terraform and providers #307

Workflow file for this run

name: "Validate and plan"
on:
pull_request:
paths:
- "terraform/**"
- ".github/workflows/**"
push:
branches:
- "main"
paths:
- "terraform/**"
- ".github/workflows/**"
jobs:
plan_test:
name: Test Terraform plan
runs-on: ubuntu-latest
env:
AWS_REGION: "eu-west-1"
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Terraform
uses: hashicorp/setup-terraform@v2
with:
terraform_version: 1.7.0
- name: Terraform init
run: terraform init -input=false
working-directory: terraform/test
env:
AWS_ACCESS_KEY_ID: ${{ secrets.access_key }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.secret_key }}
- name: Terraform validate
run: terraform validate
working-directory: terraform/test
- name: Terraform plan
run: terraform plan -input=false -refresh=false -lock=false
working-directory: terraform/test
env:
AWS_ACCESS_KEY_ID: ${{ secrets.access_key }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.secret_key }}
plan_staging:
name: Staging Terraform plan
runs-on: ubuntu-latest
env:
AWS_REGION: "eu-west-1"
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Terraform
uses: hashicorp/setup-terraform@v2
with:
terraform_version: 1.7.0
- name: Terraform init
run: terraform init -input=false
working-directory: terraform/staging
env:
AWS_ACCESS_KEY_ID: ${{ secrets.access_key }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.secret_key }}
- name: Terraform validate
run: terraform validate
working-directory: terraform/staging
- name: Terraform plan
run: terraform plan -input=false -refresh=false -lock=false
working-directory: terraform/staging
env:
AWS_ACCESS_KEY_ID: ${{ secrets.access_key }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.secret_key }}
validate_production:
name: Validate production Terraform config
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Terraform
uses: hashicorp/setup-terraform@v2
with:
terraform_version: 1.7.0
- name: Terraform init
run: terraform init -input=false -backend=false
working-directory: terraform/production
- name: Terraform validate
run: terraform validate
working-directory: terraform/production