I am having issues instantiating a `new aws.ec2.Na...
# general
m
I am having issues instantiating a
new aws.ec2.NatGateway
, receiving the error:
Copy code
error: aws:ec2/natGateway:NatGateway resource 'us-east-1c' has a problem: "allocation_id": required field is not set
I am providing to the input
allocationId
, a
pulumi.Output<string>
that is coming directly from a `new aws.ec2.Eip`'s
allocationId
output. I can't tell if this is a pulumi issue or not.
Well this seems to explain why it fails, but introduces another question:
Copy code
eips[0].allocationId.apply(a => console.log('ALLOCATION', a))
      eips[0].publicIp.apply(i => console.log('IP', i))
Copy code
Diagnostics:
  aws:ec2:NatGateway (us-east-1a):
    error: aws:ec2/natGateway:NatGateway resource 'us-east-1a' has a problem: "allocation_id": required field is not set

  pulumi:pulumi:Stack (infrastructure-dev):
    IP 54.86.50.185
    ALLOCATION undefined
Problem solved... the allocation ID seems to be on
eip.id
and not
eip.allocationId
. This definitely seems like either a bug in the documentation or AWS module though.
l
Ugh. Sorry i missed this. This was something i also ran into in the past. and it definitely is confusing
m
No problem, didn't take too long to figure out