This repository has been archived by the owner on Oct 19, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #133 from rapid7/support_vpn
Support vpn
- Loading branch information
Showing
6 changed files
with
145 additions
and
0 deletions.
There are no files selected for viewing
27 changes: 27 additions & 0 deletions
27
lib/convection/model/template/resource/aws_ec2_customer_gateway.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
require_relative '../resource' | ||
|
||
module Convection | ||
module Model | ||
class Template | ||
class Resource | ||
## | ||
# AWS::EC2::CustomerGateway | ||
## | ||
class EC2CustomerGateway < Resource | ||
include Model::Mixin::Taggable | ||
|
||
type 'AWS::EC2::CustomerGateway' | ||
property :connection_type, 'Type' | ||
property :bgp_asn, 'BgpAsn' | ||
property :ip_address, 'IpAddress' | ||
|
||
def render(*args) | ||
super.tap do |resource| | ||
render_tags(resource) | ||
end | ||
end | ||
end | ||
end | ||
end | ||
end | ||
end |
28 changes: 28 additions & 0 deletions
28
lib/convection/model/template/resource/aws_ec2_vpn_connection.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
require_relative '../resource' | ||
|
||
module Convection | ||
module Model | ||
class Template | ||
class Resource | ||
## | ||
# AWS::EC2::VPNConnection | ||
## | ||
class EC2VPNConnection < Resource | ||
include Model::Mixin::Taggable | ||
|
||
type 'AWS::EC2::VPNConnection' | ||
property :connection_type, 'Type' | ||
property :static_routes_only, 'StaticRoutesOnly' | ||
property :customer_gateway_id, 'CustomerGatewayId' | ||
property :vpn_gateway_id, 'VpnGatewayId' | ||
|
||
def render(*args) | ||
super.tap do |resource| | ||
render_tags(resource) | ||
end | ||
end | ||
end | ||
end | ||
end | ||
end | ||
end |
18 changes: 18 additions & 0 deletions
18
lib/convection/model/template/resource/aws_ec2_vpn_connection_route.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
require_relative '../resource' | ||
|
||
module Convection | ||
module Model | ||
class Template | ||
class Resource | ||
## | ||
# AWS::EC2::VPNConnectionRoute | ||
## | ||
class EC2VPNConnectionRoute < Resource | ||
type 'AWS::EC2::VPNConnectionRoute' | ||
property :destination, 'DestinationCidrBlock' | ||
property :vpn_connection_id, 'VpnConnectionId' | ||
end | ||
end | ||
end | ||
end | ||
end |
25 changes: 25 additions & 0 deletions
25
lib/convection/model/template/resource/aws_ec2_vpn_gateway.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
require_relative '../resource' | ||
|
||
module Convection | ||
module Model | ||
class Template | ||
class Resource | ||
## | ||
# AWS::EC2::VPNGateway | ||
## | ||
class EC2VPNGateway < Resource | ||
include Model::Mixin::Taggable | ||
|
||
type 'AWS::EC2::VPNGateway' | ||
property :connection_type, 'Type' | ||
|
||
def render(*args) | ||
super.tap do |resource| | ||
render_tags(resource) | ||
end | ||
end | ||
end | ||
end | ||
end | ||
end | ||
end |
18 changes: 18 additions & 0 deletions
18
lib/convection/model/template/resource/aws_ec2_vpn_gateway_route_propagation.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
require_relative '../resource' | ||
|
||
module Convection | ||
module Model | ||
class Template | ||
class Resource | ||
## | ||
# AWS::EC2::VPNGatewayRoutePropagation | ||
## | ||
class EC2VPNGatewayRoutePropagation < Resource | ||
type 'AWS::EC2::VPNGatewayRoutePropagation' | ||
property :route_table_ids, 'RouteTableIds' | ||
property :vpn_gateway_id, 'VpnGatewayId' | ||
end | ||
end | ||
end | ||
end | ||
end |
29 changes: 29 additions & 0 deletions
29
lib/convection/model/template/resource/aws_route53_hosted_zone.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
require_relative '../resource' | ||
|
||
module Convection | ||
module Model | ||
class Template | ||
class Resource | ||
## | ||
# AWS::Route53::HostedZone | ||
## | ||
class Route53HostedZone < Resource | ||
include Model::Mixin::Taggable | ||
|
||
type 'AWS::Route53::HostedZone', :route53_hosted_zone | ||
property :config, 'HostedZoneConfig' | ||
property :name, 'Name' | ||
property :vpcs, 'VPCs', :type => :list | ||
|
||
def render(*args) | ||
super.tap do |resource| | ||
resource.tap do |r| | ||
r['Properties']['HostedZoneTags'] = tags.render unless tags.empty? | ||
end | ||
end | ||
end | ||
end | ||
end | ||
end | ||
end | ||
end |