Skip to content

Instantly share code, notes, and snippets.

@ohlol
Created March 26, 2020 18:59
Show Gist options
  • Save ohlol/8d96d7305d32e20304051a6f5d89c801 to your computer and use it in GitHub Desktop.
Save ohlol/8d96d7305d32e20304051a6f5d89c801 to your computer and use it in GitHub Desktop.
def _manage_igw(self):
"""This works fine"""
name = f'{self.name}-igw'
print(f'VPC ID before ec2.InternetGateway: {self.vpc.id}')
ec2.InternetGateway(name,
tags=merge_tags_with_name(name, self._options.tags),
vpc_id=self.vpc.id)
def _manage_natgw(self):
"""This raises an exception on `get_subnet_ids`"""
name = f'{self.name}-natgw'
print(f'VPC ID before deriving subnets for ec2.NatGateway: {self.vpc.id}')
subnets = ec2.get_subnet_ids(vpc_id=self.vpc.id)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment