cfhighlander 0.12.1 → 0.12.2.alpha.1603234673

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: c6f2a474754f86155edd6a16c4fe94900d7cc33c1b38f339a409b73c18c5eb3b
4
- data.tar.gz: fdba45406b6ebba85846ec5000845f21e5e3e0d098307ecccf8ea850b5730524
3
+ metadata.gz: d536f8e52032ab314218ebc97602337ce9641674dc922162e5edd0bf85fc1c45
4
+ data.tar.gz: 6c8b11170fd53dd05101febff9805875bd09ef7ef978d045231d42d036179330
5
5
  SHA512:
6
- metadata.gz: 8b22f33ba15d51b73eecc54632de3c3b2149d20624ef9657cf05a891d74622eb3523b1d01d1842adc3d1c49639d2f6a5d757a6e31a00cfb625f3c5cfcd2bd61f
7
- data.tar.gz: 3c394dc8e5694ef55218c708cbe2f53ad4372bac9e8bb0a6af544ab5cc38b07ebbe7f8f508337c7d6c91c358393735c3f7c0b4357876e19c3da379528872367d
6
+ metadata.gz: 262fa6c520fbf222e38a3a6d6213fd5999774d06eb6b9dbb5cba02a353338a3638ccecf9afdb5abcb77c7d4f99dca2b3d732d893aea65d39dbd2df36d89ff404
7
+ data.tar.gz: 391b8f33fe0da950823abb6286116612c900a62cc273e9114bb2915cad42764b74459b8efd623a91035ce2531c9d139de96c750e471216899c6b3a49073d978c
data/README.md CHANGED
@@ -495,6 +495,17 @@ CfhighlanderTemplate do
495
495
  end
496
496
  ```
497
497
 
498
+ **Nested Stack Timeout** - If you ant set a timeout on your nested cloudformation stack you can set this with the `timeout: int` option on the component.
499
+
500
+ ```ruby
501
+ CfhighlanderTemplate do
502
+
503
+ # sets a timeout for 10 minutes on the nested VPC stack, if the stack is not created or updated within 10 minutes the stack rolls back.
504
+ Component name: 'vpc', template: 'vpc-v2', timeout: 10
505
+
506
+ end
507
+ ```
508
+
498
509
  **Convert config value to parameter** - In case of inner component having configuration value
499
510
  you wish to expose as runtime parameter, it is possible to do so with limitation that configuration
500
511
  value is only used in *resource declarations*, as property value. If configuration value is being used
@@ -36,7 +36,8 @@ module Cfhighlander
36
36
  :template_version,
37
37
  :inlined,
38
38
  :dependson,
39
- :condition
39
+ :condition,
40
+ :template_timeout
40
41
 
41
42
  def initialize(parent,
42
43
  name,
@@ -49,6 +50,7 @@ module Cfhighlander
49
50
  condition = nil,
50
51
  enabled = true,
51
52
  dependson = [],
53
+ template_timeout = nil,
52
54
  inline = false,
53
55
  distribution_format = 'yaml')
54
56
 
@@ -59,6 +61,7 @@ module Cfhighlander
59
61
  @conditional = conditional
60
62
  @condition = condition
61
63
  @dependson = [*dependson]
64
+ @template_timeout = template_timeout
62
65
  @inlined = inline
63
66
 
64
67
  template_name = template
@@ -154,13 +157,12 @@ module Cfhighlander
154
157
  param_ovr[:maxValue] = maxValue unless maxValue.nil?
155
158
  param_ovr[:minLength] = minLength unless minLength.nil?
156
159
  param_ovr[:minValue] = minValue unless minValue.nil?
157
-
158
160
  @component_loaded.highlander_dsl.Parameters do
159
161
  ComponentParam name, value, param_ovr
160
162
  end
161
163
  else
162
164
  parameter.default_value = defaultValue unless defaultValue.nil?
163
- parameter.type unless type.nil?
165
+ parameter.type = type unless type.nil?
164
166
  parameter.no_echo = noEcho unless noEcho.nil?
165
167
  parameter.allowed_values = allowedValues unless allowedValues.nil?
166
168
  parameter.allowed_pattern = allowedPattern unless allowedPattern.nil?
@@ -37,7 +37,8 @@ module Cfhighlander
37
37
  :lambda_functions_keys,
38
38
  :description,
39
39
  :dependson_components,
40
- :template_dir
40
+ :template_dir,
41
+ :template_timeout
41
42
 
42
43
  attr_reader :conditions,
43
44
  :subcomponents,
@@ -57,6 +58,7 @@ module Cfhighlander
57
58
  @lambda_functions_keys = []
58
59
  @dependson_components_templates = []
59
60
  @dependson_components = []
61
+ @template_timeout = nil
60
62
  @conditions = []
61
63
  @config_overrides = {}
62
64
  @extended_template = nil
@@ -127,6 +129,7 @@ module Cfhighlander
127
129
  condition: nil,
128
130
  enabled: true,
129
131
  dependson: [],
132
+ timeout: nil,
130
133
  render: Cfhighlander::Model::Component::Substack,
131
134
  &block)
132
135
  puts "INFO: Requested subcomponent #{name} with template #{template}"
@@ -151,6 +154,7 @@ module Cfhighlander
151
154
  condition,
152
155
  enabled,
153
156
  dependson,
157
+ timeout,
154
158
  render == Cfhighlander::Model::Component::Inline
155
159
  )
156
160
  # component.instance_eval(&block) unless block.nil?
@@ -1,3 +1,3 @@
1
1
  module Cfhighlander
2
- VERSION="0.12.1".freeze
2
+ VERSION="0.12.2".freeze
3
3
  end
@@ -23,6 +23,9 @@ CloudFormation do
23
23
  <% for @param in @subcomponent.parameters %><%="\t"%>'<%=@param.name %>' => <%= @param.cfndsl_value %>,
24
24
  <% end %>})
25
25
  <% if @subcomponent.conditional %>Condition '<%= @subcomponent.condition %>' <% end %>
26
+ <%- if !@subcomponent.template_timeout.nil? %>
27
+ TimeoutInMinutes <%= @subcomponent.template_timeout.to_i %>
28
+ <%- end %>
26
29
  end
27
30
  <% end %>
28
31
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cfhighlander
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.12.1
4
+ version: 0.12.2.alpha.1603234673
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nikola Tosic
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2020-05-12 00:00:00.000000000 Z
13
+ date: 2020-10-20 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: highline
@@ -277,12 +277,11 @@ required_ruby_version: !ruby/object:Gem::Requirement
277
277
  version: '0'
278
278
  required_rubygems_version: !ruby/object:Gem::Requirement
279
279
  requirements:
280
- - - ">="
280
+ - - ">"
281
281
  - !ruby/object:Gem::Version
282
- version: '0'
282
+ version: 1.3.1
283
283
  requirements: []
284
- rubyforge_project:
285
- rubygems_version: 2.7.7
284
+ rubygems_version: 3.0.8
286
285
  signing_key:
287
286
  specification_version: 4
288
287
  summary: DSL on top of cfndsl. Manage libraries of cloudformation components