idlc-sdk-pfm 1.0.8 → 1.0.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/idlc-sdk-pfm/command/base.rb +4 -3
- data/lib/idlc-sdk-pfm/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2557465fb327190f4115eeb3552a8835795e25011f87d01447c787f35b5d433e
|
4
|
+
data.tar.gz: 54f51750e2e43b00e92071d9c8804d8e659b538c14b49328ae34583265b6e44a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4cbae0cf0c7c50c33a23854fd027f35770eb17ea4e97d3380a5b457e8add1d069bb0016b62af28b5c75d5f0b882bf2cc5bbaf216f96616f27578652ec6c68900
|
7
|
+
data.tar.gz: a78d4d19b527161144692970f10ec535966ba4d3c64de4f57003acfca6f06c7e549c3d83e85a3cd80beb0fe3f95efdcec309414e712467376576fff07c1861be
|
@@ -166,13 +166,14 @@ module Pfm
|
|
166
166
|
end
|
167
167
|
|
168
168
|
# Create dynamic variables file for terraform based on config
|
169
|
-
vars_file =
|
169
|
+
vars_file = {}
|
170
170
|
|
171
171
|
env_metadata = JSON.parse(open(@config[:config_file]).read)
|
172
172
|
['account', 'environment', 'ec2', 'application'].each do |section|
|
173
173
|
env_metadata[section].each do |key, value|
|
174
|
+
if value.nil? value = ''
|
174
175
|
next unless (value.instance_of? String)
|
175
|
-
vars_file
|
176
|
+
vars_file[key] = <<~EOH
|
176
177
|
variable "#{key}" {}
|
177
178
|
|
178
179
|
EOH
|
@@ -181,7 +182,7 @@ module Pfm
|
|
181
182
|
end
|
182
183
|
|
183
184
|
# write vars file
|
184
|
-
File.open("#{config[:working_dir]}/#{env_metadata['environment_key']}-tfvars.tf", 'w') { |file| file.write(vars_file) }
|
185
|
+
File.open("#{config[:working_dir]}/#{env_metadata['environment_key']}-tfvars.tf", 'w') { |file| file.write(vars_file.join('')) }
|
185
186
|
|
186
187
|
# Pass some extra vars for Terraform
|
187
188
|
Idlc::Deploy::Config.add_deployment_var('environment_key', env_metadata['environment_key'])
|
data/lib/idlc-sdk-pfm/version.rb
CHANGED