https://pulumi.com logo
#general
Title
# general
m

millions-judge-24978

03/07/2019, 3:30 PM
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

lemon-spoon-91807

03/07/2019, 9:08 PM
Ugh. Sorry i missed this. This was something i also ran into in the past. and it definitely is confusing
m

millions-judge-24978

03/07/2019, 9:18 PM
No problem, didn't take too long to figure out