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 +4 -4
- data/README.md +24 -1
- data/lib/TerraformDevKit/environment.rb +3 -3
- data/lib/TerraformDevKit/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 842de4981b1cf2c30e407d89e00ed35d3e188917
|
4
|
+
data.tar.gz: 66196ff8be1dd80f86c61ff24ea1bfd154477e51
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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.
|
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
|
-
|
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?
|
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.
|
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-
|
11
|
+
date: 2017-11-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|