simplygenius-atmos 0.11.5 → 0.11.6

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: afa120dcd3c2081998e5a215a4590553a2545f699ad9cbd17e585b6f51784045
4
- data.tar.gz: eeb60c1ed55ea88b7b34970cf752289b8a6eb7f64b67221e063a5f27ce1949f4
3
+ metadata.gz: 4c93be3775fa963635eb0bd321ec575ba1d614443cc748b8e163026bc39e9bb6
4
+ data.tar.gz: a2b4c8a63334617cd90c4171895dd983cc369f5ceb4fe87f9b8cff653f66da7f
5
5
  SHA512:
6
- metadata.gz: 964094b4a7e12e23dadb011872cb5cddde9353e472d0cf17f1c168ae3a66ff4fddceca55a1a20c4d0bd8886e87937de717e84ffe60c08b89bd4513867ad8a2c8
7
- data.tar.gz: 381ed5d125cd3dc1fca56d30e6d1e13c2356f4e5c61320e02d808d5180d7f7f00d86a36e72c630ce2842955183d4a49952bd92ee18fa82a0aaac3e2c7de804cb
6
+ metadata.gz: b99184520a48ed489c1981f19f9e179c62561358e072c56fe4fb2b37ed32cfe97aeb80604b371de0614aacb61b75f0f001d2f35bf538499a496f4b12fefd0592
7
+ data.tar.gz: ee9183b0cf0c94aa315aead82412cc5f3c432b9b78ab5e73e610041f4b5ad2bb8d7728e9d67d8df09d7e014bc5e5c8f633f3b0968ba0071372de9db233938261
data/CHANGELOG.md CHANGED
@@ -1,3 +1,8 @@
1
+ 0.11.6 (01/03/2020)
2
+ -------------------
3
+
4
+ * fix passing of complex types from atmos to terraform for 0.12 and up [1df9b3d](https://github.com/simplygenius/atmos/commit/1df9b3d)
5
+
1
6
  0.11.5 (12/12/2019)
2
7
  -------------------
3
8
 
@@ -274,13 +274,24 @@ module SimplyGenius
274
274
  # variables if declared in terraform can be managed from yml, set here and accessed from terraform
275
275
  #
276
276
  homogenized_config = homogenize_for_terraform(Atmos.config.to_h)
277
- homogenized_values = Hash[Atmos.config.to_h.collect {|k, v| [k, v.is_a?(Hash) ? homogenize_for_terraform(v) : v]}]
278
277
  var_hash = {
279
278
  all_env_names: Atmos.config.all_env_names,
280
279
  account_ids: Atmos.config.account_hash,
281
280
  atmos_config: homogenized_config
282
281
  }
283
- var_hash = var_hash.merge(homogenized_values)
282
+
283
+ # Terraform > 0.12 can have more complex data types (deeply nested
284
+ # maps), so if not enforcing 0.11 compatibility, we should preserve that
285
+ # structure for vars, but still homogenize in compat mode. This way,
286
+ # assuming the var defined in tf source has constraints that match the
287
+ # yml definition, then it will get populated correctly after all the
288
+ # atmos niceties like merging env specific overrides into a default
289
+ if @compat11
290
+ homogenized_values = Hash[Atmos.config.to_h.collect {|k, v| [k, v.is_a?(Hash) ? homogenize_for_terraform(v) : v]}]
291
+ var_hash = var_hash.merge(homogenized_values)
292
+ else
293
+ var_hash = var_hash.merge(Atmos.config.to_h)
294
+ end
284
295
 
285
296
  env_hash = encode_tf_env(var_hash)
286
297
 
@@ -1,5 +1,5 @@
1
1
  module SimplyGenius
2
2
  module Atmos
3
- VERSION = "0.11.5"
3
+ VERSION = "0.11.6"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: simplygenius-atmos
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.11.5
4
+ version: 0.11.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matt Conway
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-12-12 00:00:00.000000000 Z
11
+ date: 2020-01-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler