https://pulumi.com logo
#aws
Title
# aws
g

gifted-vase-28337

12/03/2020, 10:17 PM
I'm seeing this error:
Copy code
└─ aws:ec2:NatGateway    nat-gateway-nat-gateway  **failed**               1 error
 
Diagnostics:
  aws:ec2:NatGateway (nat-gateway-nat-gateway):
    error: aws:ec2/natGateway:NatGateway resource 'nat-gateway-nat-gateway' has a problem: Required attribute is not set
but it doesn't tell me what attribute is not set. Plus I've set all the required attributes per the documentation (resource_name, allocation_id, subnet_id). Here's the resource call:
Copy code
nat_gateway = aws.ec2.NatGateway(
    resource_name="foo",
    allocation_id=eip.allocation_id,
    subnet_id=subnet.id,
)
where
eip
is an
aws.ec2.Eip
and
subnet
is an
aws.ec2.Subnet
, both created above. Is the issue that the
eip.allocation_id
or
subnet.id
calls aren't resolving, and I should use
apply
or some such?
g

gentle-diamond-70147

12/03/2020, 10:53 PM
Can you try
eip.id
instead of
eip.allocation_id
?
g

gifted-vase-28337

12/03/2020, 11:00 PM
I did that and got this failure:
Copy code
aws:ec2:NatGateway (nat-gateway-nat-gateway):
    error: 1 error occurred:
...
        * Error waiting for NAT Gateway (nat-023838dcdab5f147b) to become available: unexpected state 'failed', wanted target 'available'. last error: %!s(<nil>)
In the AWS console for the failed NAT Gateway, the Elastic IP address section is empty. The eip allocation ID (
eip.id
) provided in pulumi was
eipalloc-09fd0295904b5b6fb
, and I've confirmed that this Eip exists.
g

gentle-diamond-70147

12/04/2020, 12:14 AM
Hmm, that's very strange.