-
Notifications
You must be signed in to change notification settings - Fork 44
258 lines (209 loc) · 7.83 KB
/
terraform.yml
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
name: Terraform Validation
on:
pull_request:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
name: Terraform Validation
steps:
- name: Checkout Code
uses: actions/checkout@v2
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-1
- name: Setup Terraform
uses: hashicorp/setup-terraform@v1
# HIPAA Validation
- name: Terraform fmt HIPAA
run: terraform fmt
working-directory: ./compliance_scp/hipaa
continue-on-error: true
- name: Terraform Init HIPAA
run: terraform init
working-directory: ./compliance_scp/hipaa
- name: Terraform Validate HIPAA
run: terraform validate -no-color
working-directory: ./compliance_scp/hipaa
- name: Terraform Plan HIPAA
run: terraform plan -no-color
continue-on-error: false
working-directory: ./compliance_scp/hipaa
env:
TF_VAR_target_id: ${{ secrets.TARGET_ID }}"'
# PCI Validation
- name: Terraform fmt PCI
run: terraform fmt
working-directory: ./compliance_scp/pci
continue-on-error: true
- name: Terraform Init PCI
run: terraform init
working-directory: ./compliance_scp/pci
- name: Terraform Validate PCI
run: terraform validate -no-color
working-directory: ./compliance_scp/pci
- name: Terraform Plan PCI
run: terraform plan -no-color
continue-on-error: false
working-directory: ./compliance_scp/pci
env:
TF_VAR_target_id: ${{ secrets.TARGET_ID }}"'
# SOC Validation
- name: Terraform fmt SOC
run: terraform fmt
working-directory: ./compliance_scp/soc
continue-on-error: true
- name: Terraform Init SOC
run: terraform init
working-directory: ./compliance_scp/soc
- name: Terraform Validate SOC
run: terraform validate -no-color
working-directory: ./compliance_scp/soc
- name: Terraform Plan SOC
run: terraform plan -no-color
continue-on-error: false
working-directory: ./compliance_scp/soc
env:
TF_VAR_target_id: ${{ secrets.TARGET_ID }}"'
# ISO Validation
- name: Terraform fmt ISO
run: terraform fmt
working-directory: ./compliance_scp/iso
continue-on-error: true
- name: Terraform Init ISO
run: terraform init
working-directory: ./compliance_scp/iso
- name: Terraform Validate ISO
run: terraform validate -no-color
working-directory: ./compliance_scp/iso
- name: Terraform Plan ISO
run: terraform plan -no-color
continue-on-error: false
working-directory: ./compliance_scp/iso
env:
TF_VAR_target_id: ${{ secrets.TARGET_ID }}"'
# FedRAMP Medium Validation
- name: Terraform fmt FedRAMP Mod
run: terraform fmt
working-directory: ./compliance_scp/fedrampMod
continue-on-error: true
- name: Terraform Init FedRAMP Mod
run: terraform init
working-directory: ./compliance_scp/fedrampMod
- name: Terraform Validate FedRAMP Mod
run: terraform validate -no-color
working-directory: ./compliance_scp/fedrampMod
- name: Terraform Plan FedRAMP Mod
run: terraform plan -no-color
continue-on-error: false
working-directory: ./compliance_scp/fedrampMod
env:
TF_VAR_target_id: ${{ secrets.TARGET_ID }}"'
# FedRAMP High Validation
- name: Terraform fmt FedRAMP High
run: terraform fmt
working-directory: ./compliance_scp/fedrampHigh
continue-on-error: true
- name: Terraform Init FedRAMP High
run: terraform init
working-directory: ./compliance_scp/fedrampHigh
- name: Terraform Validate FedRAMP High
run: terraform validate -no-color
working-directory: ./compliance_scp/fedrampHigh
- name: Terraform Plan FedRAMP High
run: terraform plan -no-color
continue-on-error: false
working-directory: ./compliance_scp/fedrampHigh
env:
TF_VAR_target_id: ${{ secrets.TARGET_ID }}"'
# DoD CC SRG IL2 (East/West) Validation
- name: Terraform fmt DoD CC SRG IL2 (East/West)
run: terraform fmt
working-directory: ./compliance_scp/dodCcSrgIl2Ew
continue-on-error: true
- name: Terraform Init DoD CC SRG IL2 (East/West)
run: terraform init
working-directory: ./compliance_scp/dodCcSrgIl2Ew
- name: Terraform Validate DoD CC SRG IL2 (East/West)
run: terraform validate -no-color
working-directory: ./compliance_scp/dodCcSrgIl2Ew
- name: Terraform Plan DoD CC SRG IL2 (East/West)h
run: terraform plan -no-color
continue-on-error: false
working-directory: ./compliance_scp/dodCcSrgIl2Ew
env:
TF_VAR_target_id: ${{ secrets.TARGET_ID }}"'
# DoD CC SRG IL2 (GovCloud) Validation
- name: Terraform fmt DoD CC SRG IL2 (GovCloud)
run: terraform fmt
working-directory: ./compliance_scp/dodCcSrgIl2Gc
continue-on-error: true
- name: Terraform Init DoD CC SRG IL2 (GovCloud)
run: terraform init
working-directory: ./compliance_scp/dodCcSrgIl2Gc
- name: Terraform Validate DoD CC SRG IL2 (GovCloud)
run: terraform validate -no-color
working-directory: ./compliance_scp/dodCcSrgIl2Gc
- name: Terraform Plan DoD CC SRG IL2 (GovCloud)
run: terraform plan -no-color
continue-on-error: false
working-directory: ./compliance_scp/dodCcSrgIl2Gc
env:
TF_VAR_target_id: ${{ secrets.TARGET_ID }}"'
# DoD CC SRG IL4 (GovCloud) Validation
- name: Terraform fmt DoD CC SRG IL4 (GovCloud)
run: terraform fmt
working-directory: ./compliance_scp/dodCcSrgIl4Gc
continue-on-error: true
- name: Terraform Init DoD CC SRG IL4 (GovCloud)
run: terraform init
working-directory: ./compliance_scp/dodCcSrgIl4Gc
- name: Terraform Validate DoD CC SRG IL4 (GovCloud)
run: terraform validate -no-color
working-directory: ./compliance_scp/dodCcSrgIl4Gc
- name: Terraform Plan DoD CC SRG IL4 (GovCloud)
run: terraform plan -no-color
continue-on-error: false
working-directory: ./compliance_scp/dodCcSrgIl4Gc
env:
TF_VAR_target_id: ${{ secrets.TARGET_ID }}"'
# DoD CC SRG IL5 (GovCloud) Validation
- name: Terraform fmt DoD CC SRG IL5 (GovCloud)
run: terraform fmt
working-directory: ./compliance_scp/dodCcSrgIl5Gc
continue-on-error: true
- name: Terraform Init DoD CC SRG IL5 (GovCloud)
run: terraform init
working-directory: ./compliance_scp/dodCcSrgIl5Gc
- name: Terraform Validate DoD CC SRG IL5 (GovCloud)
run: terraform validate -no-color
working-directory: ./compliance_scp/dodCcSrgIl5Gc
- name: Terraform Plan DoD CC SRG IL5 (GovCloud)
run: terraform plan -no-color
continue-on-error: false
working-directory: ./compliance_scp/dodCcSrgIl5Gc
env:
TF_VAR_target_id: ${{ secrets.TARGET_ID }}"'
# Security Controls Validation
- name: Terraform fmt Security Controls
run: terraform fmt
working-directory: ./security_controls_scp
continue-on-error: true
- name: Terraform Init Security Controls
run: terraform init
working-directory: ./security_controls_scp
- name: Terraform Validate Security Controls
run: terraform validate -no-color
working-directory: ./security_controls_scp
- name: Terraform Plan Security Controls
run: terraform plan -no-color
continue-on-error: false
working-directory: ./security_controls_scp
env:
TF_VAR_target_id: ${{ secrets.TARGET_ID }}"'
TF_VAR_ami_creator_account: ${{ secrets.AMI_CREATOR_ACCOUNT }}"'
TF_VAR_ami_tag_key: ${{ secrets.AMI_TAG_KEY }}"'
TF_VAR_ami_tag_value: ${{ secrets.AMI_TAG_VALUE }}"'