Module: Convection::DSL::Template::Resource::EC2InternetGateway

Included in:
Model::Template::Resource::EC2InternetGateway
Defined in:
lib/convection/model/template/resource/aws_ec2_internet_gateway.rb

Overview

Add DSL for VPCGatewayAttachment

Instance Method Summary collapse

Instance Method Details

#attach_to_vpc(vpc, &block) ⇒ Object



11
12
13
14
15
16
17
18
# File 'lib/convection/model/template/resource/aws_ec2_internet_gateway.rb', line 11

def attach_to_vpc(vpc, &block)
  a = Model::Template::Resource::EC2VPCGatewayAttachment.new("#{ name }VPCAttachment#{ vpc.name }", self)
  a.vpc(vpc)
  a.internet_gateway(self)

  a.instance_exec(&block) if block
  @template.resources[a.name] = a
end