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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 85414398217a0077a497cad40caed2b25b25a46098b035ed401895e9f347f27d
4
- data.tar.gz: 5e6a6e1b8ae77289ce71a9157139a6ef36f6bf06e71f883edcbc5d0e4b59f5e7
3
+ metadata.gz: 2557465fb327190f4115eeb3552a8835795e25011f87d01447c787f35b5d433e
4
+ data.tar.gz: 54f51750e2e43b00e92071d9c8804d8e659b538c14b49328ae34583265b6e44a
5
5
  SHA512:
6
- metadata.gz: 74a1a040441de018544df893f084fe8f3368f3e645a5b809411f6041f63d9711aff494cac282c06d560adb1f3b9715e1321d55b68e0a33f64f2cfff04b804a93
7
- data.tar.gz: c008f981efca326b5190bd5081c746df3500c7ca6920b5f37fb9b0770704468a78a7b1cb9525ed202b911b8f55b6053172e61f7087a0ac80ca83bbb25dcc9e2e
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 += <<~EOH
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'])
@@ -1,3 +1,3 @@
1
1
  module Pfm
2
- VERSION = '1.0.8'.freeze
2
+ VERSION = '1.0.10'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: idlc-sdk-pfm
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.8
4
+ version: 1.0.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nathan Cazell