cfhighlander 0.10.1 → 0.10.2.alpha.1572474493

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: 591f2b964f1d6c84ee414e128385e1f08441447a865795c6742f268c3929727d
4
- data.tar.gz: 7ed6f4164a5b2f0706717e8d73ad2dc283f11fa9fdaef4ee520ff0e4d8e71f9c
3
+ metadata.gz: a4e203a4cdcd356716e9aa8542e765fd9d22368c5b82169c02520f64d3bcf674
4
+ data.tar.gz: 76141d13c247900fe432fd2a173f7f9bec409f011e71b52ff8db9ff432a2f3ee
5
5
  SHA512:
6
- metadata.gz: 531c661ec773f1878323086d945d6b25c38c8086f45914e3b465f631b8e0cf298c14b19bafb4ca1ba1ff703569f26b428a425e1f0e39f0b69c2dda9f607f93db
7
- data.tar.gz: 79a26274eed6f2beee1f9de05a47da6d07a63f2f7db5fd4b681a8ee8861fbbdadf0a15b7594e4a2100c3de5ee3f0acbdadc34ec4db4b5e639edf166392395120
6
+ metadata.gz: 54d9196dd9f058c910499cbb6aaecc59b8696ecd55d422bc4e2221b21c28a9927e574e7a9b2d3167d3c36c090b9c9ccf9073fe341725ea6e667c31ed88ec7bb6
7
+ data.tar.gz: 0b10bacd6529d0f706492468e01f252fce39bdf868130035394b2a3455f1bcfd1a4af7cff8ec3ce1de37f12623603a5b936b32cc7cf0966e52fad7b19d619df9
data/README.md CHANGED
@@ -651,6 +651,19 @@ end
651
651
  Will include any cfndsl libraries present and exported in vpc template
652
652
  so extension methods can be consumed within cfndsl template.
653
653
 
654
+ ### Component dependson
655
+
656
+ If you require dependencies between nest stacks, this can be defined in the component by using the `dependson` attribute with the value of the depend component names. This will take an array of component names or a string with a single component name. This adds the cloudformation `DependsOn` property to the stack resource in the master template.
657
+
658
+ ```ruby
659
+ CfhighlanderTemplate do
660
+ Name 'test'
661
+ Component name: 'vpc', template: 'vpc'
662
+ Component name: 'bastion', template: 'bastion'
663
+ Component name: 'ecs', template: 'ecs', dependson: ['vpc','bastion']
664
+ end
665
+ ```
666
+
654
667
  ### LambdaFunctions
655
668
 
656
669
 
@@ -34,7 +34,8 @@ module Cfhighlander
34
34
  :name,
35
35
  :template,
36
36
  :template_version,
37
- :inlined
37
+ :inlined,
38
+ :dependson
38
39
 
39
40
  def initialize(parent,
40
41
  name,
@@ -45,6 +46,7 @@ module Cfhighlander
45
46
  export_config = {},
46
47
  conditional = false,
47
48
  enabled = true,
49
+ dependson = [],
48
50
  inline = false,
49
51
  distribution_format = 'yaml')
50
52
 
@@ -53,8 +55,9 @@ module Cfhighlander
53
55
  @export_config = export_config
54
56
  @component_sources = component_sources
55
57
  @conditional = conditional
58
+ @dependson = [*dependson]
56
59
  @inlined = inline
57
-
60
+
58
61
  template_name = template
59
62
  template_version = 'latest'
60
63
  if template.include?('@') and not (template.start_with? 'git')
@@ -118,6 +118,7 @@ module Cfhighlander
118
118
  export_config: {},
119
119
  conditional: false,
120
120
  enabled: true,
121
+ dependson: [],
121
122
  render: Cfhighlander::Model::Component::Substack,
122
123
  &block)
123
124
  puts "INFO: Requested subcomponent #{name} with template #{template}"
@@ -129,7 +130,7 @@ module Cfhighlander
129
130
  end
130
131
 
131
132
  name = template if name.nil?
132
-
133
+
133
134
  # load component
134
135
  component = Cfhighlander::Dsl::Subcomponent.new(self,
135
136
  name,
@@ -140,6 +141,7 @@ module Cfhighlander
140
141
  export_config,
141
142
  conditional,
142
143
  enabled,
144
+ dependson,
143
145
  render == Cfhighlander::Model::Component::Inline
144
146
  )
145
147
  # component.instance_eval(&block) unless block.nil?
@@ -1,3 +1,3 @@
1
1
  module Cfhighlander
2
- VERSION="0.10.1".freeze
2
+ VERSION="0.10.2".freeze
3
3
  end
@@ -11,6 +11,9 @@ CloudFormation do
11
11
  <% for @subcomponent in dsl.subcomponents %>
12
12
  CloudFormation_Stack('<%= @subcomponent.cfn_name %>') do
13
13
  TemplateURL '<%= @subcomponent.distribution_url %>'
14
+ <%- if !@subcomponent.dependson.empty? %>
15
+ DependsOn <%= @subcomponent.dependson %>
16
+ <%- end %>
14
17
  Parameters ({
15
18
  <% for @param in @subcomponent.parameters %><%="\t"%>'<%=@param.name %>' => <%= @param.cfndsl_value %>,
16
19
  <% end %>})
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.10.1
4
+ version: 0.10.2.alpha.1572474493
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: 2019-08-07 00:00:00.000000000 Z
13
+ date: 2019-10-30 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: highline
@@ -56,42 +56,36 @@ dependencies:
56
56
  name: cfndsl
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - "~>"
60
- - !ruby/object:Gem::Version
61
- version: '0.17'
62
- - - "<"
59
+ - - '='
63
60
  - !ruby/object:Gem::Version
64
- version: '1'
61
+ version: 0.17.2
65
62
  type: :runtime
66
63
  prerelease: false
67
64
  version_requirements: !ruby/object:Gem::Requirement
68
65
  requirements:
69
- - - "~>"
70
- - !ruby/object:Gem::Version
71
- version: '0.17'
72
- - - "<"
66
+ - - '='
73
67
  - !ruby/object:Gem::Version
74
- version: '1'
68
+ version: 0.17.2
75
69
  - !ruby/object:Gem::Dependency
76
70
  name: rubyzip
77
71
  requirement: !ruby/object:Gem::Requirement
78
72
  requirements:
79
73
  - - ">="
80
74
  - !ruby/object:Gem::Version
81
- version: 1.2.1
75
+ version: 2.0.0
82
76
  - - "<"
83
77
  - !ruby/object:Gem::Version
84
- version: '2'
78
+ version: '3'
85
79
  type: :runtime
86
80
  prerelease: false
87
81
  version_requirements: !ruby/object:Gem::Requirement
88
82
  requirements:
89
83
  - - ">="
90
84
  - !ruby/object:Gem::Version
91
- version: 1.2.1
85
+ version: 2.0.0
92
86
  - - "<"
93
87
  - !ruby/object:Gem::Version
94
- version: '2'
88
+ version: '3'
95
89
  - !ruby/object:Gem::Dependency
96
90
  name: aws-sdk-core
97
91
  requirement: !ruby/object:Gem::Requirement
@@ -192,26 +186,6 @@ dependencies:
192
186
  - - "<"
193
187
  - !ruby/object:Gem::Version
194
188
  version: '2'
195
- - !ruby/object:Gem::Dependency
196
- name: netaddr
197
- requirement: !ruby/object:Gem::Requirement
198
- requirements:
199
- - - "~>"
200
- - !ruby/object:Gem::Version
201
- version: '1.5'
202
- - - ">="
203
- - !ruby/object:Gem::Version
204
- version: 1.5.1
205
- type: :runtime
206
- prerelease: false
207
- version_requirements: !ruby/object:Gem::Requirement
208
- requirements:
209
- - - "~>"
210
- - !ruby/object:Gem::Version
211
- version: '1.5'
212
- - - ">="
213
- - !ruby/object:Gem::Version
214
- version: 1.5.1
215
189
  - !ruby/object:Gem::Dependency
216
190
  name: duplicate
217
191
  requirement: !ruby/object:Gem::Requirement
@@ -297,9 +271,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
297
271
  version: '0'
298
272
  required_rubygems_version: !ruby/object:Gem::Requirement
299
273
  requirements:
300
- - - ">="
274
+ - - ">"
301
275
  - !ruby/object:Gem::Version
302
- version: '0'
276
+ version: 1.3.1
303
277
  requirements: []
304
278
  rubyforge_project:
305
279
  rubygems_version: 2.7.7