terraform-wrapper 1.0.3 → 1.1.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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 757e953e25e4899b35a17e556123581ab077a84769a144f51db286a6b56f8608
|
4
|
+
data.tar.gz: 25d70f9f0132157ccc738bf0c459f35d1e777f5760bae6177bc202e92bc1c95c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a0399939f5522c2ffb3fcee4e0dded13c09b7731e0025de5d92bdab8afe63e9b3506eba6bf99d345323ea4f77f7a9096e18203f975127eb29729b60379036144
|
7
|
+
data.tar.gz: 9a8ef1ea51a121cd85a5a4334cda520f8a4246c2125510054c047f7d29e004cae8bf30a4eb200aae71321d0ccf1748b385449735d5e1bc00b65cf67b3f624c15
|
@@ -75,15 +75,28 @@ module TerraformWrapper
|
|
75
75
|
logger.fatal("Invalid YAML in configuration file: #{@path}") unless yaml.kind_of?(Hash)
|
76
76
|
|
77
77
|
identifiers = yaml.key?("identifiers") ? yaml["identifiers"] : Hash.new
|
78
|
-
@variables
|
79
|
-
|
78
|
+
@variables = TerraformWrapper::Shared::Variables.new(config: @name, component: @code.name, service: @service, identifiers: identifiers)
|
79
|
+
|
80
|
+
if yaml.key?("globals") then
|
81
|
+
logger.fatal("Key 'globals' is not a hash in configuration file: #{@path}") unless yaml["globals"].kind_of?(Hash)
|
82
|
+
globals = yaml["globals"]
|
83
|
+
|
84
|
+
@variables.add_variables(variables: globals["variables"]) if globals.key?("variables")
|
85
|
+
end
|
80
86
|
|
81
87
|
if yaml.key?("terraform") then
|
82
88
|
logger.fatal("Key 'terraform' is not a hash in configuration file: #{@path}") unless yaml["terraform"].kind_of?(Hash)
|
83
89
|
terraform = yaml["terraform"]
|
84
90
|
|
85
|
-
@
|
86
|
-
|
91
|
+
[ "globals", @code.name ].each do |extra|
|
92
|
+
if terraform.key?(extra) then
|
93
|
+
logger.fatal("Key '#{extra}' under 'terraform' is not a hash in configuration file: #{@path}") unless terraform[extra].kind_of?(Hash)
|
94
|
+
section = terraform[extra]
|
95
|
+
|
96
|
+
@variables.add_variables(variables: section["variables"]) if section.key?("variables")
|
97
|
+
@variables.add_files(base: @base, files: section["files"]) if section.key?("files")
|
98
|
+
end
|
99
|
+
end
|
87
100
|
end
|
88
101
|
|
89
102
|
@auths = Array.new
|
@@ -34,7 +34,7 @@ module TerraformWrapper
|
|
34
34
|
|
35
35
|
def upgrade_task
|
36
36
|
desc "Upgrades the Terraform infrastructure component modules, providers and lock file."
|
37
|
-
task :upgrade => :binary do |t, args|
|
37
|
+
task :upgrade => [:binary, :clean] do |t, args|
|
38
38
|
runner = TerraformWrapper::Shared::Runner.new(binary: @binary, code: @code)
|
39
39
|
|
40
40
|
logger.info("Upgrading Terraform component: #{@code.name}...")
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: terraform-wrapper
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Richard Lees
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-03-
|
11
|
+
date: 2021-03-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|