sparse-intern-71089
03/26/2020, 5:48 PMsparse-state-34229
03/26/2020, 6:47 PMec2.get_subnet_ids(vpc_id=vpc.id) callsparse-state-34229
03/26/2020, 6:47 PMvpc.id is valid and compared the object with its use in other methodssparse-state-34229
03/26/2020, 6:53 PMFile "/Users/scott/.pyenv/versions/infra/lib/python3.8/site-packages/pulumi/runtime/invoke.py", line 111, in do_invoke
raise Exception(f"invoke of {tok} failed: {resp.failures[0].reason} ({resp.failures[0].property})")
Exception: invoke of aws:ec2/getSubnetIds:getSubnetIds failed: "vpc_id": required field is not set ()
error: an unhandled error occurred: Program exited with non-zero exit code: 1
VPC ID before ec2.InternetGateway: <pulumi.output.Output object at 0x10e577970>
VPC ID before deriving subnets for ec2.NatGateway: <pulumi.output.Output object at 0x10e577970>sparse-state-34229
03/26/2020, 6:53 PMgentle-diamond-70147
03/26/2020, 6:55 PMsparse-state-34229
03/26/2020, 6:57 PMsparse-state-34229
03/26/2020, 6:59 PMsparse-state-34229
03/26/2020, 7:00 PMgentle-diamond-70147
03/26/2020, 8:35 PMself.vpc.id is set or even that self.vpc is set?
When I try this it works fine for me.sparse-state-34229
03/26/2020, 8:37 PMsparse-state-34229
03/26/2020, 8:37 PMsparse-state-34229
03/26/2020, 9:22 PM_manage_natgw which raises the exception abovesparse-state-34229
03/26/2020, 9:23 PMself.vpc in that file on L38 because self.vpc.id didn’t workgentle-diamond-70147
03/26/2020, 9:29 PMsparse-state-34229
03/26/2020, 9:31 PMsparse-state-34229
03/26/2020, 9:31 PMsparse-state-34229
03/26/2020, 9:32 PMgentle-diamond-70147
03/27/2020, 4:34 AM_manage_subnets create a list of subnets and set them to self
- in _manage_natgw use the list of subnets from self to create the NatGateway resources
- removed the ec2.get_subnet_ids() call entirelygentle-diamond-70147
03/27/2020, 4:35 AMself.vpc.id is an Output (e.g. a "future") and ec2.get_subnet_ids() expects a "prompt" string. We have an issue somewhere to allow for the get_X() function calls to accept outputs, but unfortunately they don't currently.gentle-diamond-70147
03/27/2020, 4:36 AMget_X() functions actually query the AWS APIs to get data and if this is the first time you're running a preview or up those subnets won't actually exist.gentle-diamond-70147
03/27/2020, 4:37 AMsparse-state-34229
03/27/2020, 4:39 AM