sumomo 0.10.2 → 0.10.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/sumomo/network.rb +29 -11
- data/lib/sumomo/stack.rb +1 -1
- data/lib/sumomo/version.rb +1 -1
- data/lib/sumomo.rb +1 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5dff05436b85279bb6170d658fd097514523cb2166f824d378143fa71bff31b2
|
4
|
+
data.tar.gz: 2718be07694fee619ad404da887092c33b0ec9e30cce7db17aecb04973cada10
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4f4f1340af06b597c2ddd8bfdfc5fdacfdc8954b1de7d517777f98ef5e3138ce78fab0f0e77879b37b70dca05ae26ccd15ea13794bf51a59b26d61220137d8bb
|
7
|
+
data.tar.gz: 4380be685d526763092cb9216eead4379c0ea5aef56f278b860f19881203a937fca97754ef2f862e9ed023aae2225300510a1996da14061399899b9e4c6cb68e
|
data/lib/sumomo/network.rb
CHANGED
@@ -5,29 +5,47 @@ require 'hashie'
|
|
5
5
|
|
6
6
|
module Sumomo
|
7
7
|
module Stack
|
8
|
-
def
|
9
|
-
|
10
|
-
|
11
|
-
region = @region
|
12
|
-
|
13
|
-
vpc = make 'AWS::EC2::VPC' do
|
8
|
+
def make_vpc
|
9
|
+
make 'AWS::EC2::VPC' do
|
14
10
|
CidrBlock '10.0.0.0/16'
|
15
11
|
EnableDnsSupport true
|
16
12
|
EnableDnsHostnames true
|
17
13
|
tag 'Name', call('Fn::Join', '-', [ref('AWS::StackName')])
|
18
14
|
end
|
15
|
+
end
|
19
16
|
|
20
|
-
|
17
|
+
def make_gateway
|
18
|
+
make 'AWS::EC2::InternetGateway' do
|
21
19
|
tag 'Name', call('Fn::Join', '-', [ref('AWS::StackName')])
|
22
20
|
end
|
21
|
+
end
|
23
22
|
|
24
|
-
|
25
|
-
|
26
|
-
|
23
|
+
def make_network(
|
24
|
+
layers: [],
|
25
|
+
use_vpc: nil,
|
26
|
+
use_gateway: nil
|
27
|
+
)
|
28
|
+
zones = get_azs
|
29
|
+
|
30
|
+
region = @region
|
31
|
+
|
32
|
+
vpc = use_vpc || make_vpc
|
33
|
+
|
34
|
+
gateway = use_gateway || make_gateway
|
35
|
+
|
36
|
+
attachment = nil
|
37
|
+
|
38
|
+
if !use_vpc && !use_gateway
|
39
|
+
attachment = make 'AWS::EC2::VPCGatewayAttachment' do
|
40
|
+
VpcId vpc
|
41
|
+
InternetGatewayId gateway
|
42
|
+
end
|
27
43
|
end
|
28
44
|
|
29
45
|
inet_route_table = make 'AWS::EC2::RouteTable' do
|
30
|
-
|
46
|
+
if attachment
|
47
|
+
depends_on attachment
|
48
|
+
end
|
31
49
|
VpcId vpc
|
32
50
|
tag 'Name', call('Fn::Join', '-', ['public', ref('AWS::StackName')])
|
33
51
|
end
|
data/lib/sumomo/stack.rb
CHANGED
data/lib/sumomo/version.rb
CHANGED
data/lib/sumomo.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sumomo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.10.
|
4
|
+
version: 0.10.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Siaw
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-09-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -2593,7 +2593,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
2593
2593
|
- !ruby/object:Gem::Version
|
2594
2594
|
version: '0'
|
2595
2595
|
requirements: []
|
2596
|
-
rubygems_version: 3.2
|
2596
|
+
rubygems_version: 3.1.2
|
2597
2597
|
signing_key:
|
2598
2598
|
specification_version: 4
|
2599
2599
|
summary: An advanced infrastructure description language for AWS
|