sparkle-pack-aws-vpc 0.1.5 → 0.1.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 +4 -4
- data/lib/sparkleformation/nat_subnet_vpc.rb +11 -1
- data/lib/sparkleformation/public_subnet_vpc.rb +9 -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: 5c1c3f3f3856d8b19d0f61dcdbc289ce2b9fc533
|
4
|
+
data.tar.gz: 11a0abac85885ce0c44d47314deb64472a15172e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c08ac51d2cef91f9062c4a51611e79d914023504c408781128bc21859c9d63ca3d1b9af2575e80d4d7b6b46006b5aea8c12926a1e6051bfc63e76b5dbdfc586a
|
7
|
+
data.tar.gz: 8d6d4b03ccbaa29c3199b3d01359887316dab18e3957e8399077349ae7c99a6e2693e12d140960fa19207dbef6224a3154bb1e99e4a42cbad3268607bed5f089
|
@@ -5,6 +5,9 @@ SparkleFormation.new(:lazy_vpc__nat_subnet_vpc, :inherit => :public_subnet_vpc).
|
|
5
5
|
## Access the list of available Availability Zones via registry entry.
|
6
6
|
zones = registry!(:zones)
|
7
7
|
|
8
|
+
## Instantiate an empty array to collect our private subnet IDs
|
9
|
+
private_subnet_ids = []
|
10
|
+
|
8
11
|
nat_zone = zones.first.gsub('-','_')
|
9
12
|
## Iterate over each AZ creating a public subnet. Auto-generate
|
10
13
|
## Subnet CIDRs based on index.
|
@@ -25,9 +28,16 @@ SparkleFormation.new(:lazy_vpc__nat_subnet_vpc, :inherit => :public_subnet_vpc).
|
|
25
28
|
outputs("#{['private_', zone.gsub('-', '_') ].join}_subnet".to_sym) do
|
26
29
|
value ref!("#{['private_', zone.gsub('-', '_') ].join}_subnet".to_sym)
|
27
30
|
end
|
31
|
+
|
32
|
+
private_subnet_ids.push(ref!(['private_', zone.gsub('-', '_'), '_subnet'].join.to_sym))
|
33
|
+
end
|
34
|
+
|
35
|
+
outputs(:private_subnet_ids) do
|
36
|
+
value join!(private_subnet_ids, :options => { :delimiter => ',' })
|
28
37
|
end
|
29
38
|
|
30
39
|
dynamic!(:vpc_nat_routing, :nat_vpc,
|
31
40
|
:nat_subnet => ref!("public_#{nat_zone}_subnet".to_sym),
|
32
|
-
:nat_route_table => ref!(:private_route_table)
|
41
|
+
:nat_route_table => ref!(:private_route_table)
|
42
|
+
)
|
33
43
|
end
|
@@ -5,9 +5,12 @@ SparkleFormation.new(:lazy_vpc__public_subnet_vpc).load(:base, :vpc).overrides d
|
|
5
5
|
## Access the list of available Availability Zones via registry entry.
|
6
6
|
zones = registry!(:zones)
|
7
7
|
|
8
|
+
## Instantiate an empty array to collect our public subnet IDs
|
9
|
+
public_subnet_ids = []
|
10
|
+
|
8
11
|
## Iterate over each AZ creating a public subnet. Auto-generate
|
9
12
|
## Subnet CIDRs based on index.
|
10
|
-
|
13
|
+
zones.each_with_index do |zone, index|
|
11
14
|
|
12
15
|
dynamic!(:vpc_subnet, ['public_', zone.gsub('-', '_') ].join,
|
13
16
|
:vpc_id => ref!(:vpc),
|
@@ -19,6 +22,11 @@ SparkleFormation.new(:lazy_vpc__public_subnet_vpc).load(:base, :vpc).overrides d
|
|
19
22
|
default ['10.0.', index, '.0/24'].join
|
20
23
|
end
|
21
24
|
|
25
|
+
public_subnet_ids.push(ref!(['public_', zone.gsub('-', '_'), '_subnet'].join.to_sym))
|
26
|
+
end
|
27
|
+
|
28
|
+
outputs(:public_subnet_ids) do
|
29
|
+
value join!(public_subnet_ids, :options => { :delimiter => ',' })
|
22
30
|
end
|
23
31
|
|
24
32
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sparkle-pack-aws-vpc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Cameron Johnston
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2016-
|
12
|
+
date: 2016-04-06 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: sparkle-pack-aws-availability-zones
|