TerraformDevKit 0.1.11 → 0.1.12

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
  SHA1:
3
- metadata.gz: 73056367038798386bcc02b1d20f801c27e43ef0
4
- data.tar.gz: 0e1f59d12f2dd358ea463360bb3dce9e0f5255b0
3
+ metadata.gz: 842de4981b1cf2c30e407d89e00ed35d3e188917
4
+ data.tar.gz: 66196ff8be1dd80f86c61ff24ea1bfd154477e51
5
5
  SHA512:
6
- metadata.gz: f61ca6d7b4d70b25298ea785c27245c0e59df4e8e41f8490ece88a33e6e9e900b7e048029bd2429d90b631d519fcf8aa04f1d27754d939a6927f27393609a75f
7
- data.tar.gz: 5eef28470ca98ce7e859c20bae13cfc8f1baa4b9c362f2278bd406543c6f0358e80e6e935b04db9572b23679e79984a8c6a17eed01428d5a03dab888e50f80c0
6
+ metadata.gz: 032997a7b4706c196f9e194bf8fb1612e910fb37a21c8e4b23f6634f1d9af2425a4a91c1238e1f1fe80262647512e4e84a70ce04c0a0e6db739895ccecb9c9e4
7
+ data.tar.gz: cccc0d84f9a5ddea24f45ed9b97465fad1ac845d7c27ca8c22502feb5f7b0445567a84ba7ece7d9191e0fcbf782f665c0d66d11bc8e8a0140b511460bf54811d
data/README.md CHANGED
@@ -68,7 +68,7 @@ A sample configuration files is shown next:
68
68
 
69
69
  ```yaml
70
70
  terraform-version: 0.10.8
71
- terragrunt-version: 0.13.15
71
+ terragrunt-version: 0.13.5
72
72
  aws:
73
73
  profile: myprofile
74
74
  region: eu-west-1
@@ -146,6 +146,29 @@ terragrunt = {
146
146
  }
147
147
  ```
148
148
 
149
+ ### Injecting Additional Variables into Template Files
150
+
151
+ In addition to the default variables that are passed to Mustache when rendering
152
+ a template file, users can provide additional variables. To do so, users must register a procedure that receives the environment as a parameter and returns
153
+ a map with the extra variables and their values. An example is shown next:
154
+
155
+ ```ruby
156
+ TDK::TerraformConfigManager.register_extra_vars_proc(
157
+ proc do
158
+ { SumoLogicEndpoint: TDK::Configuration.get('sumologic')['endpoint'] }
159
+ end
160
+ )
161
+ ```
162
+
163
+ ### Skipping Module Updates
164
+
165
+ For safety and correctness reasons, TerraformDevKit requests to update every
166
+ module when it executes Terraform. This may take a while, depending on the
167
+ number of modules used in the infrastructure.
168
+
169
+ When users are sure that an update is not necessary, this step can be skipped
170
+ by setting the environment variable `TF_DEVKIT_SKIP_MODULE_UPDATE` to `true`.
171
+
149
172
  ## Development
150
173
 
151
174
  After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
@@ -5,8 +5,7 @@ module TerraformDevKit
5
5
  attr_reader :name
6
6
 
7
7
  def initialize(name)
8
- raise 'Environment must not be null' if name.nil?
9
- raise "Invalid environment name: #{name}" unless /^[0-9a-zA-Z]+$/ =~ name
8
+ /^[0-9a-zA-Z]+$/ =~ name || (raise "Invalid environment name: #{name}")
10
9
  @name = name.downcase
11
10
  end
12
11
 
@@ -37,7 +36,8 @@ module TerraformDevKit
37
36
  def self.temp_name
38
37
  hostname = Socket.gethostname
39
38
  date = Time.now.strftime('%y%m%d%H%M')
40
- "#{hostname}#{date}"
39
+ env = "#{hostname}#{date}"
40
+ env.gsub(/[^0-9a-zA-Z]/, '')
41
41
  end
42
42
 
43
43
  def self.running_on_jenkins?
@@ -1,3 +1,3 @@
1
1
  module TerraformDevKit
2
- VERSION = '0.1.11'.freeze
2
+ VERSION = '0.1.12'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: TerraformDevKit
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.11
4
+ version: 0.1.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Victor Jimenez
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-11-07 00:00:00.000000000 Z
11
+ date: 2017-11-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler