Class: Convection::Model::Template::Resource::EC2VPC

Inherits:
Convection::Model::Template::Resource show all
Extended by:
Mixin::CIDRBlock
Includes:
DSL::Template::Resource::EC2VPC, Mixin::Taggable
Defined in:
lib/convection/model/template/resource/aws_ec2_vpc.rb

Overview

AWS::EC2::VPC

Instance Attribute Summary

Attributes inherited from Convection::Model::Template::Resource

#exist, #name, #parent, #properties, #resource_attributes, #template

Instance Method Summary collapse

Methods included from Mixin::CIDRBlock

cidr_property

Methods included from Mixin::Taggable

#immutable_metadata, #render_tags, #tag, #tags

Methods included from DSL::Template::Resource::EC2VPC

#add_internet_gateway, #add_network_acl, #add_route_table, #add_subnet

Methods included from DSL::Template::Resource

attach_resource

Methods inherited from Convection::Model::Template::Resource

#as_attribute, attach_method, #deletion_policy, #depends_on, properties, #property, property, #reference, type, #type, #with_output

Methods included from Mixin::Conditional

#condition, #render_condition

Methods included from DSL::Helpers

#camel_case, included, method_name, #screaming_snake_case, #snake_case

Methods included from DSL::IntrinsicFunctions

#base64, #find_in_map, #fn_and, #fn_equals, #fn_if, #fn_not, #fn_or, #fn_ref, #get_att, #get_azs, #join, #select

Constructor Details

#initialize(*args) ⇒ EC2VPC

Returns a new instance of EC2VPC



91
92
93
94
95
96
97
98
# File 'lib/convection/model/template/resource/aws_ec2_vpc.rb', line 91

def initialize(*args)
  super

  @subnet_allocated = 0
  @subnet_length = 24

  @internet_gateway = nil
end

Instance Method Details

#enable_dns(value = true) ⇒ Object



100
101
102
103
# File 'lib/convection/model/template/resource/aws_ec2_vpc.rb', line 100

def enable_dns(value = true)
  property('EnableDnsSupport', value)
  property('EnableDnsHostnames', value)
end

#instance_tenancyObject #instance_tenancy(value) ⇒ Object

Overloads:

  • #instance_tenancyObject

    Returns the value of the 'InstanceTenancy' CloudFormation property.

  • #instance_tenancy(value) ⇒ Object

    Sets the 'InstanceTenancy' CloudFormation property.

    Parameters:

    • value

      the value to set the 'InstanceTenancy' CloudFormation property to.



88
# File 'lib/convection/model/template/resource/aws_ec2_vpc.rb', line 88

property :instance_tenancy, 'InstanceTenancy'

#render(*args) ⇒ Object



105
106
107
108
109
# File 'lib/convection/model/template/resource/aws_ec2_vpc.rb', line 105

def render(*args)
  super.tap do |resource|
    render_tags(resource)
  end
end