-
Notifications
You must be signed in to change notification settings - Fork 9
56 lines (49 loc) · 1.41 KB
/
iac_main.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
name: IaC Main
concurrency:
group: iac
cancel-in-progress: true
on:
push:
permissions:
id-token: write
contents: read
env:
TF_VERSION: '1.6.2'
TG_VERSION: '0.55.15'
AWS_REGION: us-east-1
jobs:
dummy:
runs-on: ubuntu/latest
steps:
- name: some crap
uses: aws-actions/configure-aws-credentials@v4
with:
aws-region: ${{env.AWS_REGION }}
verify:
if: github.ref != 'refs/heads/main'
strategy:
matrix:
environment: [stage, production]
module: [terraform/tfbackend, network/vpc, services/backend-infra, data-store/cache, data-store/database, services/frontend]
uses: ./.github/workflows/iac_verify.yaml
with:
tf_version: ${{ env.TF_VERSION }}
tg_version: ${{ env.TG_VERSION }}
aws_region: ${{ env.AWS_REGION }}
environment: ${{ matrix.environment }}
module: ${{ matrix.module }}
secrets: inherit
apply:
if: github.ref == 'refs/heads/main'
strategy:
matrix:
environment: [stage]
module: [terraform/tfbackend, network/vpc, services/backend-infra, data-store/cache, data-store/database, services/frontend]
uses: ./.github/workflows/iac_apply.yaml
with:
tf_version: ${{ env.TF_VERSION }}
tg_version: ${{ env.TG_VERSION }}
aws_region: ${{ env.AWS_REGION }}
environment: ${{ matrix.environment }}
module: ${{ matrix.module }}
secrets: inherit