Attach internet gateway to VPC when it is created through CloudFormation

This commit is contained in:
Hugo Lopes Tavares 2015-02-11 18:19:40 -05:00
commit 1546635fcd
2 changed files with 51 additions and 1 deletions

View file

@ -2031,10 +2031,12 @@ class VPCGatewayAttachment(object):
properties = cloudformation_json['Properties']
ec2_backend = ec2_backends[region_name]
return ec2_backend.create_vpc_gateway_attachment(
attachment = ec2_backend.create_vpc_gateway_attachment(
gateway_id=properties['InternetGatewayId'],
vpc_id=properties['VpcId'],
)
ec2_backend.attach_internet_gateway(properties['InternetGatewayId'], properties['VpcId'])
return attachment
@property
def physical_resource_id(self):