kitchen-terraform 1.0.2 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/README.md +3 -3
- data/lib/kitchen/driver/terraform.rb +363 -221
- data/lib/kitchen/provisioner/terraform.rb +2 -3
- data/lib/kitchen/terraform.rb +3 -1
- data/lib/kitchen/terraform/clear_directory.rb +38 -0
- data/lib/kitchen/terraform/client/command.rb +168 -0
- data/lib/kitchen/terraform/client/options.rb +275 -0
- data/lib/kitchen/terraform/client_version_verifier.rb +57 -0
- data/lib/{terraform/debug_logger.rb → kitchen/terraform/config_attribute.rb} +7 -13
- data/lib/kitchen/terraform/config_attribute/backend_configurations.rb +53 -0
- data/lib/kitchen/terraform/config_attribute/color.rb +56 -0
- data/lib/kitchen/terraform/config_attribute/command_timeout.rb +52 -0
- data/lib/kitchen/terraform/config_attribute/directory.rb +54 -0
- data/lib/kitchen/terraform/config_attribute/groups.rb +96 -0
- data/lib/kitchen/terraform/config_attribute/lock_timeout.rb +52 -0
- data/lib/kitchen/terraform/config_attribute/parallelism.rb +53 -0
- data/lib/kitchen/terraform/config_attribute/plugin_directory.rb +55 -0
- data/lib/kitchen/terraform/config_attribute/state.rb +55 -0
- data/lib/kitchen/terraform/config_attribute/variable_files.rb +51 -0
- data/lib/kitchen/terraform/config_attribute/variables.rb +53 -0
- data/lib/kitchen/terraform/config_attribute/verify_plugins.rb +52 -0
- data/lib/kitchen/terraform/config_attribute_cacher.rb +44 -0
- data/lib/kitchen/terraform/config_attribute_definer.rb +66 -0
- data/lib/kitchen/terraform/config_predicates.rb +21 -0
- data/lib/kitchen/terraform/config_predicates/hash_of_symbols_and_strings.rb +72 -0
- data/lib/{terraform.rb → kitchen/terraform/config_schemas.rb} +4 -2
- data/lib/kitchen/terraform/config_schemas/array_of_hashes_of_symbols_and_strings.rb +47 -0
- data/lib/kitchen/terraform/config_schemas/array_of_strings.rb +31 -0
- data/lib/kitchen/terraform/config_schemas/boolean.rb +27 -0
- data/lib/kitchen/terraform/config_schemas/hash_of_symbols_and_strings.rb +32 -0
- data/lib/kitchen/terraform/config_schemas/integer.rb +27 -0
- data/lib/kitchen/terraform/config_schemas/optional_string.rb +31 -0
- data/lib/kitchen/terraform/config_schemas/string.rb +26 -0
- data/lib/kitchen/terraform/configurable.rb +75 -0
- data/lib/kitchen/terraform/file_path_config_attribute_definer.rb +48 -0
- data/lib/{terraform/project_version.rb → kitchen/terraform/version.rb} +3 -3
- data/lib/kitchen/verifier/terraform.rb +40 -129
- data/lib/kitchen/verifier/terraform/configure_inspec_runner_attributes.rb +7 -4
- data/lib/kitchen/verifier/terraform/enumerate_groups_and_hostnames.rb +2 -2
- metadata +69 -43
- metadata.gz.sig +0 -0
- data/lib/kitchen/driver/terraform/verify_client_version.rb +0 -44
- data/lib/kitchen/driver/terraform/workflow.rb +0 -90
- data/lib/kitchen/terraform/client/apply.rb +0 -38
- data/lib/kitchen/terraform/client/execute_command.rb +0 -56
- data/lib/kitchen/terraform/client/get.rb +0 -35
- data/lib/kitchen/terraform/client/output.rb +0 -50
- data/lib/kitchen/terraform/client/plan.rb +0 -42
- data/lib/kitchen/terraform/client/process_options.rb +0 -87
- data/lib/kitchen/terraform/client/validate.rb +0 -35
- data/lib/kitchen/terraform/client/version.rb +0 -48
- data/lib/kitchen/terraform/define_config_attribute.rb +0 -39
- data/lib/kitchen/terraform/define_integer_config_attribute.rb +0 -43
- data/lib/kitchen/terraform/define_string_config_attribute.rb +0 -43
- data/lib/terraform/configurable.rb +0 -42
@@ -16,153 +16,65 @@
|
|
16
16
|
|
17
17
|
require "dry/monads"
|
18
18
|
require "kitchen"
|
19
|
-
require "kitchen/terraform/
|
19
|
+
require "kitchen/terraform/config_attribute/color"
|
20
|
+
require "kitchen/terraform/config_attribute/groups"
|
21
|
+
require "kitchen/terraform/configurable"
|
20
22
|
require "kitchen/verifier/inspec"
|
21
|
-
require "terraform/configurable"
|
22
23
|
|
23
|
-
# The verifier utilizes the InSpec infrastructure testing framework to verify the behaviour and state
|
24
|
-
# the Terraform state.
|
24
|
+
# The kitchen-terraform verifier utilizes the InSpec infrastructure testing framework to verify the behaviour and state
|
25
|
+
# of resources in the Terraform state.
|
25
26
|
#
|
26
|
-
#
|
27
|
+
# It is a subclass of the kitchen-inspec verifier.
|
27
28
|
#
|
28
|
-
# === Configuration
|
29
|
+
# === Test Kitchen Configuration
|
29
30
|
#
|
30
|
-
#
|
31
|
+
# The configuration of the verifier is used to control the behaviour of the InSpec runner.
|
32
|
+
#
|
33
|
+
# More information about the available configuration attributes is located with the respective modules.
|
34
|
+
#
|
35
|
+
# Test Kitchen configuration is defined in +.kitchen.yml+ and optionally overridden in +.kitchen.local.yml+.
|
36
|
+
#
|
37
|
+
# ==== Example
|
31
38
|
#
|
32
39
|
# verifier:
|
33
|
-
# name: terraform
|
40
|
+
# name: "terraform"
|
41
|
+
# color: false
|
34
42
|
# groups:
|
35
|
-
# -
|
43
|
+
# -
|
44
|
+
# name: "group_one"
|
36
45
|
# attributes:
|
37
|
-
# foo: bar
|
46
|
+
# foo: "bar"
|
38
47
|
# controls:
|
39
|
-
# - biz
|
40
|
-
# hostnames: hostnames_output
|
41
|
-
# port: 123
|
42
|
-
# username: test-user
|
43
|
-
# -
|
44
|
-
#
|
45
|
-
# ==== Attributes
|
46
|
-
#
|
47
|
-
# ===== groups
|
48
|
-
#
|
49
|
-
# Description:: A collection of maps that configure which InSpec profile will be run against different resources in the
|
50
|
-
# Terraform state.
|
51
|
-
#
|
52
|
-
# Type:: Array
|
53
|
-
#
|
54
|
-
# Status:: Optional
|
55
|
-
#
|
56
|
-
# Default:: +[]+
|
57
|
-
#
|
58
|
-
# ====== name
|
59
|
-
#
|
60
|
-
# Description:: A label that is used to identify the group.
|
61
|
-
#
|
62
|
-
# Type:: String
|
63
|
-
#
|
64
|
-
# Status:: Required
|
65
|
-
#
|
66
|
-
# ====== attributes
|
67
|
-
#
|
68
|
-
# Description:: A map that associates InSpec profile attribute names to Terraform output variable names.
|
69
|
-
#
|
70
|
-
# Type:: Hash
|
71
|
-
#
|
72
|
-
# Status:: Optional
|
73
|
-
#
|
74
|
-
# Default:: +{}+
|
75
|
-
#
|
76
|
-
# ====== controls
|
77
|
-
#
|
78
|
-
# Description:: A collection of controls to selectively include from the suite's InSpec profile.
|
79
|
-
#
|
80
|
-
# Type:: Array
|
48
|
+
# - "biz"
|
49
|
+
# hostnames: "hostnames_output"
|
50
|
+
# port: "123"
|
51
|
+
# username: "test-user"
|
52
|
+
# -
|
53
|
+
# name: "group_two"
|
81
54
|
#
|
82
|
-
#
|
55
|
+
# === InSpec Profiles
|
83
56
|
#
|
84
|
-
#
|
85
|
-
#
|
86
|
-
# ====== hostnames
|
87
|
-
#
|
88
|
-
# Description:: The name of a Terraform output variable of type String or Array which contains one or more hostnames
|
89
|
-
# from the Terraform state that will be targeted with the suite's InSpec profile.
|
90
|
-
#
|
91
|
-
# Type:: String
|
92
|
-
#
|
93
|
-
# Status:: Optional
|
94
|
-
#
|
95
|
-
# ====== port
|
96
|
-
#
|
97
|
-
# Description:: The port to use when connecting to the group's hosts with Secure Shell (SSH).
|
98
|
-
#
|
99
|
-
# Type:: Integer
|
100
|
-
#
|
101
|
-
# Status:: Optional
|
102
|
-
#
|
103
|
-
# ====== username
|
104
|
-
#
|
105
|
-
# Description:: The username to use when connecting to the group's hosts with SSH.
|
106
|
-
#
|
107
|
-
# Type:: String
|
108
|
-
#
|
109
|
-
# Status:: Optional
|
57
|
+
# The InSpec profile for a Test Kitchen suite exists under +./test/integration/<Test Kitchen suite name>/+.
|
110
58
|
#
|
59
|
+
# @see ::Kitchen::Terraform::ConfigAttribute::Color
|
60
|
+
# @see ::Kitchen::Terraform::ConfigAttribute::Groups
|
111
61
|
# @see https://en.wikipedia.org/wiki/Secure_Shell Secure Shell
|
62
|
+
# @see https://github.com/chef/kitchen-inspec/ kitchen-inspec
|
63
|
+
# @see https://github.com/chef/kitchen-inspec/blob/master/lib/kitchen/verifier/inspec.rb kitchen-inspec: Verifier
|
112
64
|
# @see https://www.inspec.io/ InSpec
|
113
|
-
# @see https://www.inspec.io/docs/reference/
|
114
|
-
# @see https://www.
|
115
|
-
# @see https://www.terraform.io/docs/configuration/outputs.html Terraform Output Variables
|
116
|
-
# @see https://www.terraform.io/docs/state/index.html Terraform State
|
65
|
+
# @see https://www.inspec.io/docs/reference/profiles/ InSpec: Profiles
|
66
|
+
# @see https://www.terraform.io/docs/state/index.html Terraform: State
|
117
67
|
# @version 2
|
118
68
|
class ::Kitchen::Verifier::Terraform < ::Kitchen::Verifier::Inspec
|
119
69
|
kitchen_verifier_api_version 2
|
120
70
|
|
121
|
-
::
|
122
|
-
attribute: :groups,
|
123
|
-
initialize_default_value: lambda do |_plugin|
|
124
|
-
[]
|
125
|
-
end,
|
126
|
-
plugin_class: self,
|
127
|
-
schema: lambda do
|
128
|
-
configure do
|
129
|
-
def self.messages
|
130
|
-
super.merge en: {
|
131
|
-
errors: {
|
132
|
-
keys_are_strings_or_symbols?: "keys must be strings or symbols",
|
133
|
-
values_are_strings?: "values must be strings"
|
134
|
-
}
|
135
|
-
}
|
136
|
-
end
|
137
|
-
|
138
|
-
def keys_are_strings_or_symbols?(hash)
|
139
|
-
hash.keys.all? do |key|
|
140
|
-
key.is_a?(::String) | key.is_a?(::Symbol)
|
141
|
-
end
|
142
|
-
end
|
71
|
+
include ::Dry::Monads::Either::Mixin
|
143
72
|
|
144
|
-
|
145
|
-
hash.values.all? do |value|
|
146
|
-
value.is_a? ::String
|
147
|
-
end
|
148
|
-
end
|
149
|
-
end
|
150
|
-
required(:value).each do
|
151
|
-
schema do
|
152
|
-
required(:name).filled :str?
|
153
|
-
optional(:attributes).value :hash?, :keys_are_strings_or_symbols?, :values_are_strings?
|
154
|
-
optional(:controls).each :filled?, :str?
|
155
|
-
optional(:hostnames).value :str?
|
156
|
-
optional(:port).value :int?
|
157
|
-
optional(:username).value :str?
|
158
|
-
end
|
159
|
-
end
|
160
|
-
end
|
161
|
-
)
|
73
|
+
include ::Kitchen::Terraform::ConfigAttribute::Color
|
162
74
|
|
163
|
-
include ::
|
75
|
+
include ::Kitchen::Terraform::ConfigAttribute::Groups
|
164
76
|
|
165
|
-
include ::Terraform::Configurable
|
77
|
+
include ::Kitchen::Terraform::Configurable
|
166
78
|
|
167
79
|
# The verifier enumerates through each hostname of each group and verifies the associated InSpec controls.
|
168
80
|
#
|
@@ -172,13 +84,13 @@ class ::Kitchen::Verifier::Terraform < ::Kitchen::Verifier::Inspec
|
|
172
84
|
# @raise [::Kitchen::ActionFailed] if the result of the action is a failure.
|
173
85
|
# @return [::Dry::Monads::Either] the result of the action.
|
174
86
|
def call(state)
|
175
|
-
self.class::EnumerateGroupsAndHostnames.call driver: driver, groups:
|
87
|
+
self.class::EnumerateGroupsAndHostnames.call driver: driver, groups: config_groups do |group:, hostname:|
|
176
88
|
state.store :group, group
|
177
89
|
state.store :hostname, hostname
|
178
90
|
info "Verifying host '#{hostname}' of group '#{group.fetch :name}'"
|
179
91
|
super state
|
180
|
-
end.
|
181
|
-
logger.debug success
|
92
|
+
end.bind do |success|
|
93
|
+
Right logger.debug success
|
182
94
|
end.or do |failure|
|
183
95
|
raise ::Kitchen::ActionFailed, failure
|
184
96
|
end
|
@@ -192,7 +104,6 @@ class ::Kitchen::Verifier::Terraform < ::Kitchen::Verifier::Inspec
|
|
192
104
|
# @api private
|
193
105
|
# @return [::Hash] Inspec Runner options.
|
194
106
|
# @see https://github.com/chef/inspec/blob/master/lib/inspec/runner.rb ::Inspec::Runner
|
195
|
-
# @see https://github.com/chef/kitchen-inspec/blob/master/lib/kitchen/verifier.rb kitchen-inspec verifier
|
196
107
|
def runner_options(transport, state = {}, platform = nil, suite = nil)
|
197
108
|
super(transport, state, platform, suite).tap do |options|
|
198
109
|
self.class::ConfigureInspecRunnerBackend.call hostname: state.fetch(:hostname), options: options
|
@@ -69,8 +69,11 @@ module ::Kitchen::Verifier::Terraform::ConfigureInspecRunnerAttributes
|
|
69
69
|
# @return [::Dry::Monads::Either] the result of the function
|
70
70
|
def self.call(driver:, group:, terraform_state:)
|
71
71
|
Right("terraform_state" => terraform_state).bind do |attributes|
|
72
|
-
driver.output.
|
73
|
-
[
|
72
|
+
driver.output.bind do |output|
|
73
|
+
Right [
|
74
|
+
attributes,
|
75
|
+
output
|
76
|
+
]
|
74
77
|
end
|
75
78
|
end.bind do |attributes, output|
|
76
79
|
Try ::KeyError do
|
@@ -79,13 +82,13 @@ module ::Kitchen::Verifier::Terraform::ConfigureInspecRunnerAttributes
|
|
79
82
|
end
|
80
83
|
[attributes, output]
|
81
84
|
end
|
82
|
-
end.
|
85
|
+
end.bind do |attributes, output|
|
83
86
|
Maybe(group[:attributes]).bind do |group_attributes|
|
84
87
|
group_attributes.each_pair do |attribute_name, output_name|
|
85
88
|
attributes.store attribute_name.to_s, output.fetch(output_name.to_s).fetch("value")
|
86
89
|
end
|
87
90
|
end
|
88
|
-
attributes
|
91
|
+
Right attributes
|
89
92
|
end.to_either.or do |error|
|
90
93
|
Left "configuring Inspec::Runner attributes failed\n#{error}"
|
91
94
|
end
|
@@ -60,8 +60,8 @@ module ::Kitchen::Verifier::Terraform::EnumerateGroupsAndHostnames
|
|
60
60
|
Right block.call group: group, hostname: "localhost"
|
61
61
|
end
|
62
62
|
end
|
63
|
-
end.
|
64
|
-
"finished enumeration of groups and hostnames"
|
63
|
+
end.bind do
|
64
|
+
Right "finished enumeration of groups and hostnames"
|
65
65
|
end
|
66
66
|
end
|
67
67
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kitchen-terraform
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 2.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Aaron Lane
|
@@ -23,28 +23,38 @@ bindir: bin
|
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C8ey+eymPhghdBM0Fxx+9zVvI
|
53
|
+
txx/nHF8OT3dFr5sni1qko0hXzKhv6OolNU+9a9CVS/+apVKRyoYu7GFFBdLBdGc
|
54
|
+
XjOfZudLs1zJ8ZNOuwj6KkGJ9J3XHd9hM95MtBEWlxAfYdCuW1+v7zCTfbieBEba
|
55
|
+
UIyyldg4TuVcuRs8uKJyempT0hqx2DniseBWw3nvtgom3A==
|
46
56
|
-----END CERTIFICATE-----
|
47
|
-
date: 2017-
|
57
|
+
date: 2017-09-14 00:00:00.000000000 Z
|
48
58
|
dependencies:
|
49
59
|
- !ruby/object:Gem::Dependency
|
50
60
|
name: codeclimate-test-reporter
|
@@ -262,15 +272,16 @@ dependencies:
|
|
262
272
|
requirements:
|
263
273
|
- - "~>"
|
264
274
|
- !ruby/object:Gem::Version
|
265
|
-
version:
|
275
|
+
version: 1.16.0
|
266
276
|
type: :runtime
|
267
277
|
prerelease: false
|
268
278
|
version_requirements: !ruby/object:Gem::Requirement
|
269
279
|
requirements:
|
270
280
|
- - "~>"
|
271
281
|
- !ruby/object:Gem::Version
|
272
|
-
version:
|
273
|
-
description:
|
282
|
+
version: 1.16.0
|
283
|
+
description: kitchen-terraform is a set of Test Kitchen plugins for testing Terraform
|
284
|
+
configuration
|
274
285
|
email: kitchen-terraform@newcontext.com
|
275
286
|
executables: []
|
276
287
|
extensions: []
|
@@ -279,23 +290,42 @@ files:
|
|
279
290
|
- LICENSE
|
280
291
|
- README.md
|
281
292
|
- lib/kitchen/driver/terraform.rb
|
282
|
-
- lib/kitchen/driver/terraform/verify_client_version.rb
|
283
|
-
- lib/kitchen/driver/terraform/workflow.rb
|
284
293
|
- lib/kitchen/provisioner/terraform.rb
|
285
294
|
- lib/kitchen/terraform.rb
|
295
|
+
- lib/kitchen/terraform/clear_directory.rb
|
286
296
|
- lib/kitchen/terraform/client.rb
|
287
|
-
- lib/kitchen/terraform/client/
|
288
|
-
- lib/kitchen/terraform/client/
|
289
|
-
- lib/kitchen/terraform/
|
290
|
-
- lib/kitchen/terraform/
|
291
|
-
- lib/kitchen/terraform/
|
292
|
-
- lib/kitchen/terraform/
|
293
|
-
- lib/kitchen/terraform/
|
294
|
-
- lib/kitchen/terraform/
|
297
|
+
- lib/kitchen/terraform/client/command.rb
|
298
|
+
- lib/kitchen/terraform/client/options.rb
|
299
|
+
- lib/kitchen/terraform/client_version_verifier.rb
|
300
|
+
- lib/kitchen/terraform/config_attribute.rb
|
301
|
+
- lib/kitchen/terraform/config_attribute/backend_configurations.rb
|
302
|
+
- lib/kitchen/terraform/config_attribute/color.rb
|
303
|
+
- lib/kitchen/terraform/config_attribute/command_timeout.rb
|
304
|
+
- lib/kitchen/terraform/config_attribute/directory.rb
|
305
|
+
- lib/kitchen/terraform/config_attribute/groups.rb
|
306
|
+
- lib/kitchen/terraform/config_attribute/lock_timeout.rb
|
307
|
+
- lib/kitchen/terraform/config_attribute/parallelism.rb
|
308
|
+
- lib/kitchen/terraform/config_attribute/plugin_directory.rb
|
309
|
+
- lib/kitchen/terraform/config_attribute/state.rb
|
310
|
+
- lib/kitchen/terraform/config_attribute/variable_files.rb
|
311
|
+
- lib/kitchen/terraform/config_attribute/variables.rb
|
312
|
+
- lib/kitchen/terraform/config_attribute/verify_plugins.rb
|
313
|
+
- lib/kitchen/terraform/config_attribute_cacher.rb
|
314
|
+
- lib/kitchen/terraform/config_attribute_definer.rb
|
315
|
+
- lib/kitchen/terraform/config_predicates.rb
|
316
|
+
- lib/kitchen/terraform/config_predicates/hash_of_symbols_and_strings.rb
|
317
|
+
- lib/kitchen/terraform/config_schemas.rb
|
318
|
+
- lib/kitchen/terraform/config_schemas/array_of_hashes_of_symbols_and_strings.rb
|
319
|
+
- lib/kitchen/terraform/config_schemas/array_of_strings.rb
|
320
|
+
- lib/kitchen/terraform/config_schemas/boolean.rb
|
321
|
+
- lib/kitchen/terraform/config_schemas/hash_of_symbols_and_strings.rb
|
322
|
+
- lib/kitchen/terraform/config_schemas/integer.rb
|
323
|
+
- lib/kitchen/terraform/config_schemas/optional_string.rb
|
324
|
+
- lib/kitchen/terraform/config_schemas/string.rb
|
325
|
+
- lib/kitchen/terraform/configurable.rb
|
295
326
|
- lib/kitchen/terraform/create_directories.rb
|
296
|
-
- lib/kitchen/terraform/
|
297
|
-
- lib/kitchen/terraform/
|
298
|
-
- lib/kitchen/terraform/define_string_config_attribute.rb
|
327
|
+
- lib/kitchen/terraform/file_path_config_attribute_definer.rb
|
328
|
+
- lib/kitchen/terraform/version.rb
|
299
329
|
- lib/kitchen/verifier/terraform.rb
|
300
330
|
- lib/kitchen/verifier/terraform/configure_inspec_runner_attributes.rb
|
301
331
|
- lib/kitchen/verifier/terraform/configure_inspec_runner_backend.rb
|
@@ -304,10 +334,6 @@ files:
|
|
304
334
|
- lib/kitchen/verifier/terraform/configure_inspec_runner_port.rb
|
305
335
|
- lib/kitchen/verifier/terraform/configure_inspec_runner_user.rb
|
306
336
|
- lib/kitchen/verifier/terraform/enumerate_groups_and_hostnames.rb
|
307
|
-
- lib/terraform.rb
|
308
|
-
- lib/terraform/configurable.rb
|
309
|
-
- lib/terraform/debug_logger.rb
|
310
|
-
- lib/terraform/project_version.rb
|
311
337
|
homepage: https://github.com/newcontext-oss/kitchen-terraform
|
312
338
|
licenses:
|
313
339
|
- Apache-2.0
|
@@ -330,10 +356,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
330
356
|
- !ruby/object:Gem::Version
|
331
357
|
version: '0'
|
332
358
|
requirements:
|
333
|
-
- Terraform
|
359
|
+
- Terraform ~> 0.10.2
|
334
360
|
rubyforge_project:
|
335
|
-
rubygems_version: 2.6.
|
361
|
+
rubygems_version: 2.6.13
|
336
362
|
signing_key:
|
337
363
|
specification_version: 4
|
338
|
-
summary: Test Kitchen plugins for testing Terraform
|
364
|
+
summary: Test Kitchen plugins for testing Terraform configuration
|
339
365
|
test_files: []
|
metadata.gz.sig
CHANGED
Binary file
|
@@ -1,44 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
# Copyright 2016 New Context Services, Inc.
|
4
|
-
#
|
5
|
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
-
# you may not use this file except in compliance with the License.
|
7
|
-
# You may obtain a copy of the License at
|
8
|
-
#
|
9
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
10
|
-
#
|
11
|
-
# Unless required by applicable law or agreed to in writing, software
|
12
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
-
# See the License for the specific language governing permissions and
|
15
|
-
# limitations under the License.
|
16
|
-
|
17
|
-
require "dry/monads"
|
18
|
-
require "kitchen/driver/terraform"
|
19
|
-
|
20
|
-
# Verifies that the provided Terraform Client version is supported.
|
21
|
-
#
|
22
|
-
# Supported:: Terraform version 0.9.
|
23
|
-
#
|
24
|
-
# Deprecated:: Terraform versions 0.7 and 0.8.
|
25
|
-
#
|
26
|
-
# Not Supported:: Terraform versions 0.6 and older.
|
27
|
-
module ::Kitchen::Driver::Terraform::VerifyClientVersion
|
28
|
-
extend ::Dry::Monads::Either::Mixin
|
29
|
-
|
30
|
-
# Invokes the function.
|
31
|
-
#
|
32
|
-
# @param version [::Float] the Terraform Client version.
|
33
|
-
# @return [::Dry::Monads::Either] the result of the function.
|
34
|
-
def self.call(version:)
|
35
|
-
if version == 0.9
|
36
|
-
Right "Terraform version #{version} is supported"
|
37
|
-
elsif (0.7..0.8).cover? version
|
38
|
-
Right "Terraform version #{version} is deprecated and will not be supported by kitchen-terraform version " \
|
39
|
-
"2.0; upgrade to Terraform version 0.9 to remain supported"
|
40
|
-
else
|
41
|
-
Left "Terraform version #{version} is not supported; supported Terraform versions are 0.7 through 0.9"
|
42
|
-
end
|
43
|
-
end
|
44
|
-
end
|