generated from memes/repo-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathkitchen.yml
264 lines (257 loc) · 8.22 KB
/
kitchen.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
259
260
261
262
263
264
# NOTE: This test-kitchen file contains ERB code to cut-down on boilerplate; YAML
# linters will complain!
# yamllint disable
<%
require 'open3'
require 'json'
report_dir = ENV['REPORT_DIR'] || 'test/reports'
report_ts = ENV['REPORT_TS'] || Time.now.strftime('%Y-%m-%d-%H-%M-%S')
tf_output, rc = Open3.capture2('terraform -chdir=test/setup output -json')
if rc != 0
abort 'Failed to capture Terraform output from test/setup'
end
harness_outputs = JSON.parse(tf_output).map { |k,v| [k, v['value']] }.to_h
%>
---
driver:
name: terraform
verify_version: true
transport:
name: terraform
command_timeout: 600
provisioner:
name: terraform
verifier:
name: terraform
color: true
platforms:
- name: local
suites:
- name: minimal-project-role
transport:
root_module_directory: test/fixtures/root
driver:
variables:
target_id: '<%= harness_outputs['project_id'] %>'
verifier:
systems:
- name: f5-xc-role
backend: gcp
profile_locations:
- test/profiles/f5-xc-role
controls:
- project_role
reporter:
- cli
- documentation:<%= report_dir %>/<%= report_ts %>/minimal-project-role.txt
- name: random-id-project-role
transport:
root_module_directory: test/fixtures/root
driver:
variables:
target_type: project
target_id: '<%= harness_outputs['project_id'] %>'
random_id_prefix: '<%= harness_outputs['prefix'].gsub(/[^a-z0-9_.]/, '_') %>'
title: Full random id project role
members: '[\"serviceAccount:<%= harness_outputs['sa'] %>\"]'
verifier:
systems:
- name: f5-xc-role
backend: gcp
profile_locations:
- test/profiles/f5-xc-role
controls:
- project_role
reporter:
- cli
- documentation:<%= report_dir %>/<%= report_ts %>/random-id-project-role.txt
- name: fixed-id-project-role
transport:
root_module_directory: test/fixtures/root
driver:
variables:
target_type: project
target_id: '<%= harness_outputs['project_id'] %>'
id: '<%= harness_outputs['prefix'].gsub(/[^a-z0-9_.]/, '_') + '_full_fixed_id' %>'
title: Full fixed id project role
members: '[\"serviceAccount:<%= harness_outputs['sa'] %>\"]'
verifier:
systems:
- name: f5-xc-role
backend: gcp
profile_locations:
- test/profiles/f5-xc-role
controls:
- project_role
reporter:
- cli
- documentation:<%= report_dir %>/<%= report_ts %>/fixed-id-project-role.txt
- name: minimal-org-role
transport:
root_module_directory: test/fixtures/root
driver:
variables:
target_type: org
target_id: '<%= harness_outputs['org_id'] %>'
verifier:
systems:
- name: f5-xc-role
backend: gcp
profile_locations:
- test/profiles/f5-xc-role
controls:
- org_role
reporter:
- cli
- documentation:<%= report_dir %>/<%= report_ts %>/minimal-org-role.txt
- name: random-id-org-role
transport:
root_module_directory: test/fixtures/root
driver:
variables:
target_type: org
target_id: '<%= harness_outputs['org_id'] %>'
random_id_prefix: '<%= harness_outputs['prefix'].gsub(/[^a-z0-9_.]/, '_') %>'
title: Full random id org role
members: '[\"serviceAccount:<%= harness_outputs['sa'] %>\"]'
verifier:
systems:
- name: f5-xc-role
backend: gcp
profile_locations:
- test/profiles/f5-xc-role
controls:
- org_role
reporter:
- cli
- documentation:<%= report_dir %>/<%= report_ts %>/random-id-org-role.txt
- name: fixed-id-org-role
transport:
root_module_directory: test/fixtures/root
driver:
variables:
target_type: org
target_id: '<%= harness_outputs['org_id'] %>'
id: '<%= harness_outputs['prefix'].gsub(/[^a-z0-9_.]/, '_') + '_full_fixed_id' %>'
title: Full fixed id org role
members: '[\"serviceAccount:<%= harness_outputs['sa'] %>\"]'
verifier:
systems:
- name: f5-xc-role
backend: gcp
profile_locations:
- test/profiles/f5-xc-role
controls:
- org_role
reporter:
- cli
- documentation:<%= report_dir %>/<%= report_ts %>/fixed-id-org-role.txt
- name: example-simple-project-role
transport:
root_module_directory: test/fixtures/examples/simple_project_role
driver:
variables:
project_id: '<%= harness_outputs['project_id'] %>'
members: '[\"serviceAccount:<%= harness_outputs['sa'] %>\"]'
verifier:
systems:
- name: f5-xc-role
backend: gcp
profile_locations:
- test/profiles/f5-xc-role
controls:
- project_role
reporter:
- cli
- documentation:<%= report_dir %>/<%= report_ts %>/example-simple-project-role.txt
- name: example-simple-org-role
transport:
root_module_directory: test/fixtures/examples/simple_org_role
driver:
variables:
org_id: '<%= harness_outputs['org_id'] %>'
verifier:
systems:
- name: f5-xc-role
backend: gcp
profile_locations:
- test/profiles/f5-xc-role
controls:
- org_role
reporter:
- cli
- documentation:<%= report_dir %>/<%= report_ts %>/example-simple-org-role.txt
- name: example-fixed-id
transport:
root_module_directory: test/fixtures/examples/fixed_id
driver:
variables:
project_id: '<%= harness_outputs['project_id'] %>'
id: '<%= harness_outputs['prefix'].gsub(/[^a-z0-9_.]/, '_') + '_example_id' %>'
title: Example with fixed id
members: '[\"serviceAccount:<%= harness_outputs['sa'] %>\"]'
verifier:
systems:
- name: f5-xc-role
backend: gcp
profile_locations:
- test/profiles/f5-xc-role
controls:
- project_role
reporter:
- cli
- documentation:<%= report_dir %>/<%= report_ts %>/example-fixed-id.txt
- name: example-cloud-credential
transport:
root_module_directory: test/fixtures/examples/cloud_credential
driver:
variables:
project_id: '<%= harness_outputs['project_id'] %>'
name: '<%= harness_outputs['prefix'] + '-xc' %>'
f5_xc_api_url: '<%= ENV['VOLT_API_URL'] %>'
f5_xc_api_token: '<%= ENV['VOLTERRA_TOKEN'] %>'
verifier:
systems:
- name: f5-xc-role
backend: gcp
profile_locations:
- test/profiles/f5-xc-role
controls:
- project_role
reporter:
- cli
- documentation:<%= report_dir %>/<%= report_ts %>/example-cloud-credential-gcp.txt
- name: local
backend: local
profile_locations:
- test/profiles/f5-xc-cloud-credential
reporter:
- cli
- documentation:<%= report_dir %>/<%= report_ts %>/example-cloud-credential-local.txt
- name: example-blindfold-cloud-credential
transport:
root_module_directory: test/fixtures/examples/blindfold_cloud_credential
driver:
variables:
project_id: '<%= harness_outputs['project_id'] %>'
name: '<%= harness_outputs['prefix'] + '-bf-xc' %>'
f5_xc_api_url: '<%= ENV['VOLT_API_URL'] %>'
f5_xc_api_token: '<%= ENV['VOLTERRA_TOKEN'] %>'
verifier:
systems:
- name: f5-xc-role
backend: gcp
profile_locations:
- test/profiles/f5-xc-role
controls:
- project_role
reporter:
- cli
- documentation:<%= report_dir %>/<%= report_ts %>/example-blindfold-cloud-credential-gcp.txt
- name: local
backend: local
profile_locations:
- test/profiles/f5-xc-cloud-credential
reporter:
- cli
- documentation:<%= report_dir %>/<%= report_ts %>/example-blindfold-cloud-credential-local.txt