Merge pull request #302 from spulec/fix-cloudformation-vpc-gateway-attachment-creation

Attach internet gateway to VPC when it is created through CloudFormation
This commit is contained in:
Steve Pulec 2015-02-11 18:26:00 -05:00
commit 2bc771349a
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):