kitchen-pulumi 0.1.0.pre.beta
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/LICENSE +21 -0
- data/README.md +4 -0
- data/lib/kitchen/driver/pulumi.rb +170 -0
- data/lib/kitchen/provisioner/pulumi.rb +24 -0
- data/lib/kitchen/pulumi.rb +8 -0
- data/lib/kitchen/pulumi/command.rb +11 -0
- data/lib/kitchen/pulumi/command/input.rb +33 -0
- data/lib/kitchen/pulumi/command/output.rb +33 -0
- data/lib/kitchen/pulumi/config_attribute.rb +12 -0
- data/lib/kitchen/pulumi/config_attribute/backend.rb +34 -0
- data/lib/kitchen/pulumi/config_attribute/color.rb +34 -0
- data/lib/kitchen/pulumi/config_attribute/config.rb +35 -0
- data/lib/kitchen/pulumi/config_attribute/config_file.rb +34 -0
- data/lib/kitchen/pulumi/config_attribute/directory.rb +34 -0
- data/lib/kitchen/pulumi/config_attribute/fail_fast.rb +34 -0
- data/lib/kitchen/pulumi/config_attribute/plugins.rb +34 -0
- data/lib/kitchen/pulumi/config_attribute/refresh_config.rb +34 -0
- data/lib/kitchen/pulumi/config_attribute/secrets.rb +35 -0
- data/lib/kitchen/pulumi/config_attribute/stack.rb +33 -0
- data/lib/kitchen/pulumi/config_attribute/stack_evolution.rb +37 -0
- data/lib/kitchen/pulumi/config_attribute/systems.rb +33 -0
- data/lib/kitchen/pulumi/config_attribute_cacher.rb +28 -0
- data/lib/kitchen/pulumi/config_attribute_definer.rb +39 -0
- data/lib/kitchen/pulumi/config_schemas.rb +11 -0
- data/lib/kitchen/pulumi/config_schemas/array_of_hashes.rb +12 -0
- data/lib/kitchen/pulumi/config_schemas/boolean.rb +12 -0
- data/lib/kitchen/pulumi/config_schemas/config_evolution_array.rb +40 -0
- data/lib/kitchen/pulumi/config_schemas/error_messages.yml +21 -0
- data/lib/kitchen/pulumi/config_schemas/hash.rb +12 -0
- data/lib/kitchen/pulumi/config_schemas/stack_settings_hash.rb +20 -0
- data/lib/kitchen/pulumi/config_schemas/string.rb +12 -0
- data/lib/kitchen/pulumi/config_schemas/system.rb +577 -0
- data/lib/kitchen/pulumi/config_schemas/systems.rb +20 -0
- data/lib/kitchen/pulumi/configurable.rb +27 -0
- data/lib/kitchen/pulumi/error.rb +10 -0
- data/lib/kitchen/pulumi/file_path_config_attribute_definer.rb +25 -0
- data/lib/kitchen/pulumi/inspec.rb +66 -0
- data/lib/kitchen/pulumi/inspec_options_mapper.rb +69 -0
- data/lib/kitchen/pulumi/inspec_with_hosts.rb +40 -0
- data/lib/kitchen/pulumi/inspec_without_hosts.rb +34 -0
- data/lib/kitchen/pulumi/kitchen_instance.rb +12 -0
- data/lib/kitchen/pulumi/shell_out.rb +40 -0
- data/lib/kitchen/pulumi/system.rb +130 -0
- data/lib/kitchen/pulumi/system_attrs_resolver.rb +59 -0
- data/lib/kitchen/pulumi/system_hosts_resolver.rb +34 -0
- data/lib/kitchen/pulumi/version.rb +5 -0
- data/lib/kitchen/verifier/pulumi.rb +177 -0
- metadata +323 -0
@@ -0,0 +1,20 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'dry-validation'
|
4
|
+
require 'kitchen/pulumi/config_schemas'
|
5
|
+
|
6
|
+
module Kitchen
|
7
|
+
module Pulumi
|
8
|
+
ConfigSchemas::StackSettingsHash = ::Dry::Validation.Schema do
|
9
|
+
configure do
|
10
|
+
config.messages_file = "#{__dir__}/error_messages.yml"
|
11
|
+
|
12
|
+
def stack_settings_hash?(value)
|
13
|
+
value.all? { |_, nested_hash| nested_hash.is_a?(Hash) }
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
17
|
+
required(:value).maybe(:hash?, :stack_settings_hash?)
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
@@ -0,0 +1,577 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'dry/validation'
|
4
|
+
require 'kitchen/pulumi/config_schemas'
|
5
|
+
|
6
|
+
# rubocop:disable Metrics/LineLength
|
7
|
+
# rubocop:disable Metrics/BlockLength
|
8
|
+
module Kitchen
|
9
|
+
module Pulumi
|
10
|
+
module ConfigSchemas
|
11
|
+
# A system is a mapping which is used to configure the execution of {https://www.inspec.io/docs/ InSpec tests}
|
12
|
+
# against a Pulumi stack. The keys of a system mapping correlate to the arguments and the
|
13
|
+
# options of the {https://www.inspec.io/docs/reference/cli/#exec +inspec exec+} command-line interface
|
14
|
+
# subcomamand.
|
15
|
+
#
|
16
|
+
# ===== InSpec Profiles
|
17
|
+
#
|
18
|
+
# All systems within the same {https://kitchen.ci/docs/getting-started/adding-suite Kitchen suite} are by default
|
19
|
+
# tested using the same {https://www.inspec.io/docs/reference/profiles/ InSpec profile}. The profile must be
|
20
|
+
# implemented in the directory located at `<Kitchen root>/test/integration/<suite name>`. This behaviour can be
|
21
|
+
# overridden with the <code>profile_locations</code> key.
|
22
|
+
#
|
23
|
+
# The values of any {https://pulumi.io/reference/config.html#config-stack Pulumi stack config keys}
|
24
|
+
# configured with the driver's <code>config</code> attribute and the values of any
|
25
|
+
# {https://pulumi.io/reference/programming-model.html#stack-outputs Pulumi stack outputs} are associated with
|
26
|
+
# equivalently named
|
27
|
+
# {https://www.inspec.io/docs/reference/profiles/#profile-attributes InSpec profile attributes}, prefixed with
|
28
|
+
# <code>input_</code> or <code>output_</code>, respectively. The values of the output variables are also
|
29
|
+
# associated with equivalently named profile attributes without any prefixes for backward compatibility. Output
|
30
|
+
# variable associations can be overridden with the <code>attrs_outputs</code> key. For example, the value of an
|
31
|
+
# input variable named `test` will be associated with an attribute named `input_test`, and the value of an output
|
32
|
+
# variable named `test` will be associated with an attribute named `output_test` as well as an attribute named
|
33
|
+
# `test`.
|
34
|
+
#
|
35
|
+
# ===== Required Keys
|
36
|
+
#
|
37
|
+
# The following keys must be included by every system.
|
38
|
+
#
|
39
|
+
# ====== name
|
40
|
+
#
|
41
|
+
# The value of the +name+ key is a scalar which is used to refer to the system for logging purposes.
|
42
|
+
#
|
43
|
+
# <em>Example kitchen.yml</em>
|
44
|
+
# verifier:
|
45
|
+
# name: pulumi
|
46
|
+
# systems:
|
47
|
+
# - name: a system
|
48
|
+
# backend: local
|
49
|
+
#
|
50
|
+
# ====== backend
|
51
|
+
#
|
52
|
+
# The value of the +backend+ key is a scalar which is used to select the
|
53
|
+
# {https://www.inspec.io/docs/reference/cli/#exec InSpec backend} for connections to the system.
|
54
|
+
#
|
55
|
+
# The scalar must match the name of one the available backends.
|
56
|
+
#
|
57
|
+
# <em>Example kitchen.yml</em>
|
58
|
+
# verifier:
|
59
|
+
# name: pulumi
|
60
|
+
# systems:
|
61
|
+
# - name: a system
|
62
|
+
# backend: docker
|
63
|
+
#
|
64
|
+
# ===== Optional Keys
|
65
|
+
#
|
66
|
+
# The following keys may be included by any system to alter the behaviour of InSpec. Any key which is omitted
|
67
|
+
# will be associated with a default value as defined by InSpec except where otherwise noted.
|
68
|
+
#
|
69
|
+
# ====== attrs
|
70
|
+
#
|
71
|
+
# The value of the +attrs+ key is a sequence of scalars which is used to locate any
|
72
|
+
# {https://www.inspec.io/docs/reference/profiles/#profile-attributes InSpec profile attributes} files.
|
73
|
+
#
|
74
|
+
# <em>Example kitchen.yml</em>
|
75
|
+
# verifier:
|
76
|
+
# name: pulumi
|
77
|
+
# systems:
|
78
|
+
# - name: a system
|
79
|
+
# backend: local
|
80
|
+
# attrs:
|
81
|
+
# - /path/to/first_attributes.yml
|
82
|
+
# - /path/to/second_attributes.yml
|
83
|
+
#
|
84
|
+
# ====== attrs_outputs
|
85
|
+
#
|
86
|
+
# The value of the +attrs_outputs+ key is a mapping of scalars to scalars which is used to define
|
87
|
+
# {https://www.inspec.io/docs/reference/profiles/#profile-attributes InSpec profile attributes} with the values
|
88
|
+
# of Pulumi outputs.
|
89
|
+
#
|
90
|
+
# The use of the +attrs_outputs+ key is only necessary to override the default definitions of profile attributes
|
91
|
+
# with names and values equivalent to the outputs.
|
92
|
+
#
|
93
|
+
# <em>Example kitchen.yml</em>
|
94
|
+
# verifier:
|
95
|
+
# name: pulumi
|
96
|
+
# systems:
|
97
|
+
# - name: a system
|
98
|
+
# backend: local
|
99
|
+
# attrs_outputs:
|
100
|
+
# an_attribute_name: an_output_name
|
101
|
+
#
|
102
|
+
# ====== backend_cache
|
103
|
+
#
|
104
|
+
# The value of the +backend_cache+ key is a boolean which is used to toggle the caching of InSpec backend command
|
105
|
+
# output.
|
106
|
+
#
|
107
|
+
# <em>Example kitchen.yml</em>
|
108
|
+
# verifier:
|
109
|
+
# name: pulumi
|
110
|
+
# systems:
|
111
|
+
# - name: a system
|
112
|
+
# backend: local
|
113
|
+
# backend_cache: false
|
114
|
+
#
|
115
|
+
# ====== bastion_host
|
116
|
+
#
|
117
|
+
# The value of the +bastion_host+ key is a scalar which is used as the hostname of a
|
118
|
+
# {https://en.wikipedia.org/wiki/Bastion_host bastion host} to connect to before connecting to hosts in the
|
119
|
+
# system.
|
120
|
+
#
|
121
|
+
# The +bastion_host+ key must be used in combination with a backend which supports remote connections.
|
122
|
+
#
|
123
|
+
# <em>Example kitchen.yml</em>
|
124
|
+
# verifier:
|
125
|
+
# name: pulumi
|
126
|
+
# systems:
|
127
|
+
# - name: a system
|
128
|
+
# backend: ssh
|
129
|
+
# bastion_host: bastion-host.domain
|
130
|
+
#
|
131
|
+
# ====== bastion_port
|
132
|
+
#
|
133
|
+
# The value of the +bastion_port+ key is an integer which is used as the port number to connect to on the bastion
|
134
|
+
# host.
|
135
|
+
#
|
136
|
+
# The +bastion_port+ key must be used in combination with the +bastion_host+ key.
|
137
|
+
#
|
138
|
+
# <em>Example kitchen.yml</em>
|
139
|
+
# verifier:
|
140
|
+
# name: pulumi
|
141
|
+
# systems:
|
142
|
+
# - name: a system
|
143
|
+
# backend: ssh
|
144
|
+
# bastion_host: bastion-host.domain
|
145
|
+
# bastion_port: 1234
|
146
|
+
#
|
147
|
+
# ====== bastion_user
|
148
|
+
#
|
149
|
+
# The value of the +bastion_user+ key is a scalar which is used as the username for authentication with the
|
150
|
+
# bastion host.
|
151
|
+
#
|
152
|
+
# The +bastion_user+ key must be used in combination with the +bastion_host+ key.
|
153
|
+
#
|
154
|
+
# <em>Example kitchen.yml</em>
|
155
|
+
# verifier:
|
156
|
+
# name: pulumi
|
157
|
+
# systems:
|
158
|
+
# - name: a system
|
159
|
+
# backend: ssh
|
160
|
+
# bastion_host: bastion-host.domain
|
161
|
+
# bastion_user: bastion-user
|
162
|
+
#
|
163
|
+
# ====== controls
|
164
|
+
#
|
165
|
+
# The value of the +controls+ key is a sequence of scalars which is used to select for execution against the
|
166
|
+
# system a subset of the {https://www.inspec.io/docs/reference/dsl_inspec/ InSpec controls} of the profile.
|
167
|
+
#
|
168
|
+
# The use of the +controls+ key is only necessary if the system should not be tested with all of the controls of # the profile.
|
169
|
+
#
|
170
|
+
# The scalars must match the names of the controls, not the names of the control files.
|
171
|
+
#
|
172
|
+
# <em>Example kitchen.yml</em>
|
173
|
+
# verifier:
|
174
|
+
# name: pulumi
|
175
|
+
# systems:
|
176
|
+
# - name: first system
|
177
|
+
# backend: local
|
178
|
+
# controls:
|
179
|
+
# - first control
|
180
|
+
# - third control
|
181
|
+
# - name: second system
|
182
|
+
# backend: local
|
183
|
+
# controls:
|
184
|
+
# - second control
|
185
|
+
# - fourth control
|
186
|
+
#
|
187
|
+
# ====== enable_password
|
188
|
+
#
|
189
|
+
# The value of the +enable_password+ key is a scalar which is used as the password for authentication with a
|
190
|
+
# Cisco IOS device in enable mode.
|
191
|
+
#
|
192
|
+
# The +enable_password+ key must be used in combination with <tt>backend: ssh</tt>.
|
193
|
+
#
|
194
|
+
# <em>Example kitchen.yml</em>
|
195
|
+
# verifier:
|
196
|
+
# name: pulumi
|
197
|
+
# systems:
|
198
|
+
# - name: a system
|
199
|
+
# backend: ssh
|
200
|
+
# enable_password: Cisc0!
|
201
|
+
#
|
202
|
+
# ====== hosts
|
203
|
+
#
|
204
|
+
# The value of the +hosts+ key is a sequence of scalars which is used as addresses of hosts in the system.
|
205
|
+
#
|
206
|
+
# The +hosts+ key must be used in combination with a backend which enables remote connections.
|
207
|
+
#
|
208
|
+
# <em>Example kitchen.yml</em>
|
209
|
+
# verifier:
|
210
|
+
# name: pulumi
|
211
|
+
# systems:
|
212
|
+
# - name: a system
|
213
|
+
# backend: ssh
|
214
|
+
# hosts:
|
215
|
+
# - hostname.domainname
|
216
|
+
#
|
217
|
+
# ====== hosts_output
|
218
|
+
#
|
219
|
+
# The value of the +hosts_output+ key is a scalar which is used to obtain the addresses of hosts in the system
|
220
|
+
# from a Pulumi output.
|
221
|
+
#
|
222
|
+
# The scalar must match the name of an output with a value which is a string or an array of strings.
|
223
|
+
#
|
224
|
+
# The +hosts_output+ key must be used in combination with a backend which enables remote connections.
|
225
|
+
#
|
226
|
+
# <em>Example kitchen.yml</em>
|
227
|
+
# verifier:
|
228
|
+
# name: pulumi
|
229
|
+
# systems:
|
230
|
+
# - name: a system
|
231
|
+
# backend: ssh
|
232
|
+
# hosts_output: an_output
|
233
|
+
#
|
234
|
+
# ====== key_files
|
235
|
+
#
|
236
|
+
# The value of the +key_files+ key is a sequence of scalars which is used to locate key files (also known as
|
237
|
+
# identity files) for {https://linux.die.net/man/1/ssh Secure Shell (SSH) authentication} with hosts in the
|
238
|
+
# Pulumi state.
|
239
|
+
#
|
240
|
+
# The +key_files+ key must be used in combination with <tt>backend: ssh</tt>.
|
241
|
+
#
|
242
|
+
# <em>Example kitchen.yml</em>
|
243
|
+
# verifier:
|
244
|
+
# name: pulumi
|
245
|
+
# systems:
|
246
|
+
# - name: a system
|
247
|
+
# backend: ssh
|
248
|
+
# key_files:
|
249
|
+
# - /path/to/first/key/file
|
250
|
+
# - /path/to/second/key/file
|
251
|
+
#
|
252
|
+
# ====== password
|
253
|
+
#
|
254
|
+
# The value of the +password+ key is a scalar which is used as the password for authentication with hosts in the
|
255
|
+
# system.
|
256
|
+
#
|
257
|
+
# The +password+ key must be used in combination with a backend which supports password authentication.
|
258
|
+
#
|
259
|
+
# <em>Example kitchen.yml</em>
|
260
|
+
# verifier:
|
261
|
+
# name: pulumi
|
262
|
+
# systems:
|
263
|
+
# - name: a system
|
264
|
+
# backend: ssh
|
265
|
+
# password: Th3P455I5Th3W0rd
|
266
|
+
#
|
267
|
+
# ====== path
|
268
|
+
#
|
269
|
+
# The value of the +path+ key is a scalar which is used as the login path when connecting to a host in the system.
|
270
|
+
#
|
271
|
+
# The +path+ key must be used in combination with <tt>backend: winrm</tt>.
|
272
|
+
#
|
273
|
+
# <em>Example kitchen.yml</em>
|
274
|
+
# verifier:
|
275
|
+
# name: pulumi
|
276
|
+
# systems:
|
277
|
+
# - name: a system
|
278
|
+
# backend: winrm
|
279
|
+
# path: /login
|
280
|
+
#
|
281
|
+
# ====== port
|
282
|
+
#
|
283
|
+
# The value of the +port+ key is an integer which is used as the port number when connecting via SSH to the hosts
|
284
|
+
# of the system.
|
285
|
+
#
|
286
|
+
# The +port+ key must be used in combination with <tt>backend: ssh</tt>.
|
287
|
+
#
|
288
|
+
# If the +port+ key is omitted then the value of the +port+ key of the Test Kitchen transport will be used.
|
289
|
+
#
|
290
|
+
# <em>Example kitchen.yml</em>
|
291
|
+
# verifier:
|
292
|
+
# name: pulumi
|
293
|
+
# systems:
|
294
|
+
# - name: a system
|
295
|
+
# backend: ssh
|
296
|
+
# port: 1234
|
297
|
+
#
|
298
|
+
# ====== profile_locations
|
299
|
+
#
|
300
|
+
# The value of the <code>profile_locations</code> key is a sequence of scalars which is used to locate
|
301
|
+
# {https://www.inspec.io/docs/reference/profiles/ InSpec profiles} containing the controls to be executed against
|
302
|
+
# the system. This key corresponds to the LOCATIONS argument of <code>inspec exec</code>.
|
303
|
+
#
|
304
|
+
# The default value contains a single scalar which assumes that a profile exists locally for the associated
|
305
|
+
# {https://kitchen.ci/docs/getting-started/adding-suite Kitchen suite} at
|
306
|
+
# <code><KITCHEN ROOT>/test/integration/<KITCHEN SUITE NAME></code>.
|
307
|
+
#
|
308
|
+
# <em>Example kitchen.yml</em>
|
309
|
+
# verifier:
|
310
|
+
# name: pulumi
|
311
|
+
# systems:
|
312
|
+
# - name: a system
|
313
|
+
# backend: local
|
314
|
+
# profile_locations:
|
315
|
+
# - supermarket://username/linux-baseline
|
316
|
+
# - /path/to/profile
|
317
|
+
# - /path/to/a_test.rb
|
318
|
+
#
|
319
|
+
# ====== proxy_command
|
320
|
+
#
|
321
|
+
# The value of the +proxy_command+ key is a scalar which is used as a proxy command when connecting to a host via
|
322
|
+
# SSH.
|
323
|
+
#
|
324
|
+
# The +proxy_command+ key must be used in combination with <tt>backend: ssh</tt>.
|
325
|
+
#
|
326
|
+
# <em>Example kitchen.yml</em>
|
327
|
+
# verifier:
|
328
|
+
# name: pulumi
|
329
|
+
# systems:
|
330
|
+
# - name: a system
|
331
|
+
# backend: ssh
|
332
|
+
# proxy_command: ssh root@127.0.0.1 -W %h:%p
|
333
|
+
#
|
334
|
+
# ====== reporter
|
335
|
+
#
|
336
|
+
# The value of the +reporter+ key is a sequence of scalars which is used to select the
|
337
|
+
# {https://www.inspec.io/docs/reference/reporters/#supported-reporters InSpec reporters}
|
338
|
+
# for reporting test output.
|
339
|
+
#
|
340
|
+
# The scalars must match the names of the available reporters.
|
341
|
+
#
|
342
|
+
# <em>Example kitchen.yml</em>
|
343
|
+
# verifier:
|
344
|
+
# name: pulumi
|
345
|
+
# systems:
|
346
|
+
# - name: a system
|
347
|
+
# backend: local
|
348
|
+
# reporter:
|
349
|
+
# - cli
|
350
|
+
# - documentation
|
351
|
+
#
|
352
|
+
# ====== self_signed
|
353
|
+
#
|
354
|
+
# The value of the +self_signed+ key is a boolean which is used to toggle permission for self-signed certificates
|
355
|
+
# during testing of Windows hosts.
|
356
|
+
#
|
357
|
+
# The +self_signed+ key must be used in combination with <tt>backend: winrm</tt>.
|
358
|
+
#
|
359
|
+
# <em>Example kitchen.yml</em>
|
360
|
+
# verifier:
|
361
|
+
# name: pulumi
|
362
|
+
# systems:
|
363
|
+
# - name: a system
|
364
|
+
# backend: winrm
|
365
|
+
# self_signed: true
|
366
|
+
#
|
367
|
+
# ====== shell
|
368
|
+
#
|
369
|
+
# The value of the +shell+ key is a boolean which is used to toggle the use of a subshell when executing tests on
|
370
|
+
# hosts in the system.
|
371
|
+
#
|
372
|
+
# The +shell+ key is only effective for a system which has Unix-like hosts.
|
373
|
+
#
|
374
|
+
# <em>Example kitchen.yml</em>
|
375
|
+
# verifier:
|
376
|
+
# name: pulumi
|
377
|
+
# systems:
|
378
|
+
# - name: a system
|
379
|
+
# backend: ssh
|
380
|
+
# hosts_output: an_output
|
381
|
+
# shell: true
|
382
|
+
#
|
383
|
+
# ====== shell_command
|
384
|
+
#
|
385
|
+
# The value of the +shell_command+ key is a scalar which is used to override the default shell command used to
|
386
|
+
# instantiate a subshell.
|
387
|
+
#
|
388
|
+
# The +shell_command+ key must be used in combination with <tt>shell: true</tt>.
|
389
|
+
#
|
390
|
+
# <em>Example kitchen.yml</em>
|
391
|
+
# verifier:
|
392
|
+
# name: pulumi
|
393
|
+
# systems:
|
394
|
+
# - name: a system
|
395
|
+
# backend: ssh
|
396
|
+
# hosts_output: an_output
|
397
|
+
# shell: true
|
398
|
+
# shell_command: /bin/ksh
|
399
|
+
#
|
400
|
+
# ====== shell_options
|
401
|
+
#
|
402
|
+
# The value of the +shell_options+ key is a scalar which is used to provide options to the subshell.
|
403
|
+
#
|
404
|
+
# The +shell_options+ key must be used in combination with <tt>shell: true</tt>.
|
405
|
+
#
|
406
|
+
# <em>Example kitchen.yml</em>
|
407
|
+
# verifier:
|
408
|
+
# name: pulumi
|
409
|
+
# systems:
|
410
|
+
# - name: a system
|
411
|
+
# backend: ssh
|
412
|
+
# hosts_output: an_output
|
413
|
+
# shell: true
|
414
|
+
# shell_options: -v
|
415
|
+
#
|
416
|
+
# ====== show_progress
|
417
|
+
#
|
418
|
+
# The value of the +show_progress+ key is a boolean which is used to toggle the display of progress while tests
|
419
|
+
# are executing.
|
420
|
+
#
|
421
|
+
# <em>Example kitchen.yml</em>
|
422
|
+
# verifier:
|
423
|
+
# name: pulumi
|
424
|
+
# systems:
|
425
|
+
# - name: a system
|
426
|
+
# backend: local
|
427
|
+
# show_progress: false
|
428
|
+
#
|
429
|
+
# ====== ssl
|
430
|
+
#
|
431
|
+
# The value of the +ssl+ key is a boolean which is used to toggle the use of
|
432
|
+
# {https://en.wikipedia.org/wiki/Transport_Layer_Security Transport Layer Security (TLS)} when connecting to
|
433
|
+
# hosts in the system. InSpec's reference to Secure Socket Layer (SSL) is a misnomer as that protocol has been
|
434
|
+
# deprecated in favour of TLS.
|
435
|
+
#
|
436
|
+
# The +ssl+ key must be used in combination with <tt>backend: winrm</tt>.
|
437
|
+
#
|
438
|
+
# <em>Example kitchen.yml</em>
|
439
|
+
# verifier:
|
440
|
+
# name: pulumi
|
441
|
+
# systems:
|
442
|
+
# - name: a system
|
443
|
+
# backend: winrm
|
444
|
+
# ssl: true
|
445
|
+
#
|
446
|
+
# ====== sudo
|
447
|
+
#
|
448
|
+
# The value of the +sudo+ key is a boolean which is used to toggle the use of
|
449
|
+
# {https://en.wikipedia.org/wiki/Sudo sudo} for obtaining superuser permissions when executing tests on hosts in
|
450
|
+
# the system.
|
451
|
+
#
|
452
|
+
# The +sudo+ key is only effective for a system which has Unix-like hosts.
|
453
|
+
#
|
454
|
+
# <em>Example kitchen.yml</em>
|
455
|
+
# verifier:
|
456
|
+
# name: pulumi
|
457
|
+
# systems:
|
458
|
+
# - name: a system
|
459
|
+
# backend: ssh
|
460
|
+
# hosts_output: an_output
|
461
|
+
# sudo: true
|
462
|
+
#
|
463
|
+
# ====== sudo_command
|
464
|
+
#
|
465
|
+
# The value of the +sudo_command+ key is a scalar which is used to override the default command used to
|
466
|
+
# invoke sudo.
|
467
|
+
#
|
468
|
+
# The +sudo_command+ key must be used in combination with <tt>sudo: true</tt>.
|
469
|
+
#
|
470
|
+
# <em>Example kitchen.yml</em>
|
471
|
+
# verifier:
|
472
|
+
# name: pulumi
|
473
|
+
# systems:
|
474
|
+
# - name: a system
|
475
|
+
# backend: ssh
|
476
|
+
# hosts_output: an_output
|
477
|
+
# sudo: true
|
478
|
+
# sudo_command: /bin/sudo
|
479
|
+
#
|
480
|
+
# ====== sudo_options
|
481
|
+
#
|
482
|
+
# The value of the +sudo_options+ key is a scalar which is used to provide options to the sudo command.
|
483
|
+
#
|
484
|
+
# The +sudo_options+ key must be used in combination with <tt>sudo: true</tt>.
|
485
|
+
#
|
486
|
+
# <em>Example kitchen.yml</em>
|
487
|
+
# verifier:
|
488
|
+
# name: pulumi
|
489
|
+
# systems:
|
490
|
+
# - name: a system
|
491
|
+
# backend: ssh
|
492
|
+
# hosts_output: an_output
|
493
|
+
# sudo: true
|
494
|
+
# sudo_options: -u admin
|
495
|
+
#
|
496
|
+
# ====== sudo_password
|
497
|
+
#
|
498
|
+
# The value of the +sudo_password+ key is a scalar which is used as the password for authentication with the sudo
|
499
|
+
# command.
|
500
|
+
#
|
501
|
+
# The +sudo_password+ key must be used in combination with <tt>sudo: true</tt>.
|
502
|
+
#
|
503
|
+
# <em>Example kitchen.yml</em>
|
504
|
+
# verifier:
|
505
|
+
# name: pulumi
|
506
|
+
# systems:
|
507
|
+
# - name: a system
|
508
|
+
# backend: ssh
|
509
|
+
# hosts_output: an_output
|
510
|
+
# sudo: true
|
511
|
+
# sudo_password: Th3P455I5Th3W0rd
|
512
|
+
#
|
513
|
+
# ====== user
|
514
|
+
#
|
515
|
+
# The value of the +user+ key is a scalar which is used as the username for authentication with hosts in the
|
516
|
+
# system.
|
517
|
+
#
|
518
|
+
# The +user+ key must be used in combination with a backend which supports user authentication.
|
519
|
+
#
|
520
|
+
# <em>Example kitchen.yml</em>
|
521
|
+
# verifier:
|
522
|
+
# name: pulumi
|
523
|
+
# systems:
|
524
|
+
# - name: a system
|
525
|
+
# backend: ssh
|
526
|
+
# user: tester
|
527
|
+
#
|
528
|
+
# ====== vendor_cache
|
529
|
+
#
|
530
|
+
# The value of the +vendor_cache+ key is a scalar which is used as the pathname of the directory in which InSpec
|
531
|
+
# will cache dependencies of the profile.
|
532
|
+
#
|
533
|
+
# <em>Example kitchen.yml</em>
|
534
|
+
# verifier:
|
535
|
+
# name: pulumi
|
536
|
+
# systems:
|
537
|
+
# - name: a system
|
538
|
+
# backend: local
|
539
|
+
# vendor_cache: /opt/inspec-cache
|
540
|
+
System = ::Dry::Validation.Params do
|
541
|
+
required(:name).filled :str?
|
542
|
+
required(:backend).filled :str?
|
543
|
+
optional(:attrs).each(:filled?, :str?)
|
544
|
+
optional(:attrs_outputs).filled :hash?
|
545
|
+
optional(:backend_cache).value :bool?
|
546
|
+
optional(:bastion_host).filled :str?
|
547
|
+
optional(:bastion_port).value :int?
|
548
|
+
optional(:bastion_user).filled :str?
|
549
|
+
optional(:controls).each(:filled?, :str?)
|
550
|
+
optional(:enable_password).filled :str?
|
551
|
+
optional(:hosts).each :filled?, :str?
|
552
|
+
optional(:hosts_output).filled :str?
|
553
|
+
optional(:key_files).each(:filled?, :str?)
|
554
|
+
optional(:password).filled :str?
|
555
|
+
optional(:path).filled :str?
|
556
|
+
optional(:port).value :int?
|
557
|
+
optional(:profile_locations).each :filled?, :str?
|
558
|
+
optional(:proxy_command).filled :str?
|
559
|
+
optional(:reporter).each(:filled?, :str?)
|
560
|
+
optional(:self_signed).value :bool?
|
561
|
+
optional(:shell).value :bool?
|
562
|
+
optional(:shell_command).filled :str?
|
563
|
+
optional(:shell_options).filled :str?
|
564
|
+
optional(:show_progress).value :bool?
|
565
|
+
optional(:ssl).value :bool?
|
566
|
+
optional(:sudo).value :bool?
|
567
|
+
optional(:sudo_command).filled :str?
|
568
|
+
optional(:sudo_options).filled :str?
|
569
|
+
optional(:sudo_password).filled :str?
|
570
|
+
optional(:user).filled :str?
|
571
|
+
optional(:vendor_cache).filled :str?
|
572
|
+
end
|
573
|
+
end
|
574
|
+
end
|
575
|
+
end
|
576
|
+
# rubocop:enable Metrics/BlockLength
|
577
|
+
# rubocop:enable Metrics/LineLength
|