kitchen-terraform 5.7.1 → 5.7.2
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 +1 -1
- data/lib/kitchen/terraform/driver/destroy.rb +10 -2
- data/lib/kitchen/terraform/inspec_runner.rb +5 -4
- data/lib/kitchen/terraform/shell_out.rb +4 -3
- data/lib/kitchen/terraform/version.rb +1 -1
- metadata +2 -2
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 24be7336ab4c7262f10b788ee1a05d46128685d73ad1a68ce01ab3f3249c1f57
|
|
4
|
+
data.tar.gz: 6049b0f5dc6956fb216179cb6c151e66c2479d9512f818f8b6541296a9642aa9
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: '081a8c15bb44c3abf56f31c7dba176bd64ba4205c03e560af0e39d78b4c3294c02dd2829facb7c92f133f360ae2aa92ecb5d46ed195123dbc3d614b1d01107e6'
|
|
7
|
+
data.tar.gz: ff5019b5f8e9db143108c8f5e49d570f60e7b8cae1ae43f8b3705b2b8def44fc62a9126f70b29762e5c04962196ac22a7bc405b013ea67377ee8d41322b7495e
|
checksums.yaml.gz.sig
CHANGED
|
Binary file
|
data.tar.gz.sig
CHANGED
|
Binary file
|
data/README.md
CHANGED
|
@@ -102,7 +102,7 @@ example.
|
|
|
102
102
|
> Installing Kitchen-Terraform with RubyGems
|
|
103
103
|
|
|
104
104
|
```sh
|
|
105
|
-
gem install kitchen-terraform --version 5.7.
|
|
105
|
+
gem install kitchen-terraform --version 5.7.2
|
|
106
106
|
```
|
|
107
107
|
|
|
108
108
|
This approach is not recommended as it requires more effort to install
|
|
@@ -76,7 +76,7 @@ module Kitchen
|
|
|
76
76
|
logger: logger,
|
|
77
77
|
)
|
|
78
78
|
self.logger = logger
|
|
79
|
-
|
|
79
|
+
define_options config: config
|
|
80
80
|
self.workspace_name = workspace_name
|
|
81
81
|
self.destroy = ::Kitchen::Terraform::Command::Destroy.new config: config
|
|
82
82
|
self.init = ::Kitchen::Terraform::Command::Init.new config: hash_config
|
|
@@ -100,6 +100,7 @@ module Kitchen
|
|
|
100
100
|
attr_accessor(
|
|
101
101
|
:command_executor,
|
|
102
102
|
:destroy,
|
|
103
|
+
:destroy_options,
|
|
103
104
|
:init,
|
|
104
105
|
:logger,
|
|
105
106
|
:options,
|
|
@@ -119,9 +120,16 @@ module Kitchen
|
|
|
119
120
|
logger.warn "Finished creating the #{workspace_name} Terraform workspace."
|
|
120
121
|
end
|
|
121
122
|
|
|
123
|
+
def define_options(config:)
|
|
124
|
+
self.options = { cwd: config.fetch(:root_module_directory), timeout: config.fetch(:command_timeout) }
|
|
125
|
+
self.destroy_options = options.merge(
|
|
126
|
+
environment: { "LC_ALL" => nil, "TF_IN_AUTOMATION" => "true", "TF_WARN_OUTPUT_ERRORS" => "true" }
|
|
127
|
+
)
|
|
128
|
+
end
|
|
129
|
+
|
|
122
130
|
def destroy_infrastructure
|
|
123
131
|
logger.warn "Destroying the Terraform-managed infrastructure..."
|
|
124
|
-
command_executor.run command: destroy, options:
|
|
132
|
+
command_executor.run command: destroy, options: destroy_options do |standard_output:|
|
|
125
133
|
end
|
|
126
134
|
logger.warn "Finished destroying the Terraform-managed infrastructure."
|
|
127
135
|
end
|
|
@@ -61,10 +61,11 @@ module Kitchen
|
|
|
61
61
|
""
|
|
62
62
|
end
|
|
63
63
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
64
|
+
::Inspec::Plugin::V2::Loader.new.tap do |loader|
|
|
65
|
+
loader.load_all
|
|
66
|
+
loader.exit_on_load_error
|
|
67
|
+
end
|
|
68
|
+
|
|
68
69
|
self.runner = ::Inspec::Runner.new options.merge logger: ::Inspec::Log.logger
|
|
69
70
|
|
|
70
71
|
profile_locations.each do |profile_location|
|
|
@@ -29,16 +29,17 @@ module Kitchen
|
|
|
29
29
|
#
|
|
30
30
|
# @param command [String] the command to run.
|
|
31
31
|
# @param logger [Kitchen::Logger] a logger for logging messages.
|
|
32
|
+
# @param options [Hash] options which adjust the execution of the command.
|
|
32
33
|
# @return [Kitchen::Terraform::CommandExecutor]
|
|
33
34
|
def initialize(command:, logger:, options:)
|
|
34
35
|
self.command = command
|
|
35
36
|
self.logger = logger
|
|
36
37
|
self.shell_out = ::Mixlib::ShellOut.new(
|
|
37
38
|
command,
|
|
38
|
-
|
|
39
|
-
environment: { "LC_ALL" => nil, "TF_IN_AUTOMATION" => "true"
|
|
39
|
+
{
|
|
40
|
+
environment: { "LC_ALL" => nil, "TF_IN_AUTOMATION" => "true" },
|
|
40
41
|
live_stream: logger,
|
|
41
|
-
)
|
|
42
|
+
}.merge(options)
|
|
42
43
|
)
|
|
43
44
|
end
|
|
44
45
|
|
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: 5.7.
|
|
4
|
+
version: 5.7.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Aaron Lane
|
|
@@ -62,7 +62,7 @@ cert_chain:
|
|
|
62
62
|
JH4yGDzVEYaZHaohSDcYuGLK6OQylPu7oM75S+TNLWseDIT8bWgQk6NelVjtQQ2Q
|
|
63
63
|
XSbgfu863jyey/0qO01cUo3+iTqzl85cWg==
|
|
64
64
|
-----END CERTIFICATE-----
|
|
65
|
-
date: 2021-
|
|
65
|
+
date: 2021-03-09 00:00:00.000000000 Z
|
|
66
66
|
dependencies:
|
|
67
67
|
- !ruby/object:Gem::Dependency
|
|
68
68
|
name: bundler
|
metadata.gz.sig
CHANGED
|
Binary file
|