-
Notifications
You must be signed in to change notification settings - Fork 0
59 lines (50 loc) · 1.33 KB
/
terraform.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
name: Terraform
on:
workflow_dispatch:
push:
branches:
- dev
- main
- ssoteam-2010
paths:
- terraform-ecs/**
- loki-authorizer/**
- .github/**
env:
TF_VERSION: 1.1.4
jobs:
terraform:
permissions: write-all
runs-on: ubuntu-20.04
steps:
- uses: hmarr/debug-action@v3
- uses: actions/checkout@v4
- name: Install asdf
uses: asdf-vm/actions/setup@v3
- name: Cache tools
uses: actions/cache@v4
with:
path: /home/runner/.asdf
key: ${{ runner.os }}-${{ hashFiles('**/.tool-versions') }}
- name: Install required tools
run: |
cat .tool-versions | cut -f 1 -d ' ' | xargs -n 1 asdf plugin-add || true
asdf plugin-update --all
asdf install
asdf reshim
shell: bash
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ secrets.TERRAFORM_DEPLOY_ROLE_ARN }}
aws-region: ca-central-1
- name: Terraform Init
id: init
run: terraform init -upgrade
working-directory: ./terraform
- name: Terraform Plan
id: plan
if: github.event_name == 'pull_request'
run: terraform plan -var "auth_secret=fake_secret_for_testing" -no-color
working-directory: ./terraform
continue-on-error: true