hi all, i've run in to an issue trying to create a...
# general
hi all, i've run in to an issue trying to create an AWS VPC via AWS Crosswalk. I'm not doing anything complex, just trying to create a VPC with all the defaults:
Copy code
import * as awsx from "@pulumi/awsx";

const vpc = new awsx.ec2.Vpc("my-vpc");

export const vpcId = vpc.id;
When I run
pulumi preview
I get the following error:
Copy code
Previewing update (dev):

     Type                                    Name                Plan       Info
 +   pulumi:pulumi:Stack                     pulumi-vpc-test  create
 +   ├─ awsx:x:ec2:Vpc                       my-vpc              create
 +   │  ├─ awsx:x:ec2:NatGateway             my-vpc-0            create
 +   │  │  └─ aws:ec2:Eip                    my-vpc-0            create
 +   │  ├─ awsx:x:ec2:NatGateway             my-vpc-1            create
 +   │  │  └─ aws:ec2:Eip                    my-vpc-1            create
 +   │  ├─ awsx:x:ec2:InternetGateway        my-vpc              create
 +   │  │  └─ aws:ec2:InternetGateway        my-vpc              create
 +   │  ├─ awsx:x:ec2:Subnet                 my-vpc-public-0     create
 +   │  │  ├─ aws:ec2:RouteTable             my-vpc-public-0     create
 +   │  │  ├─ aws:ec2:Subnet                 my-vpc-public-0     create
 +   │  │  ├─ aws:ec2:Route                  my-vpc-public-0-ig  create
 +   │  │  └─ aws:ec2:RouteTableAssociation  my-vpc-public-0     create
 +   │  ├─ awsx:x:ec2:Subnet                 my-vpc-public-1     create
 +   │  │  ├─ aws:ec2:Subnet                 my-vpc-public-1     create
 +   │  │  ├─ aws:ec2:RouteTable             my-vpc-public-1     create
 +   │  │  ├─ aws:ec2:Route                  my-vpc-public-1-ig  create
 +   │  │  └─ aws:ec2:RouteTableAssociation  my-vpc-public-1     create
 +   │  ├─ aws:ec2:Vpc                       my-vpc              create
 +   │  ├─ awsx:x:ec2:Subnet                 my-vpc-private-1    create
 +   │  │  ├─ aws:ec2:RouteTable             my-vpc-private-1    create
 +   │  │  ├─ aws:ec2:Subnet                 my-vpc-private-1    create
 +   │  │  └─ aws:ec2:RouteTableAssociation  my-vpc-private-1    create
 +   │  └─ awsx:x:ec2:Subnet                 my-vpc-private-0    create
 +   │     ├─ aws:ec2:Subnet                 my-vpc-private-0    create
 +   │     ├─ aws:ec2:RouteTable             my-vpc-private-0    create
 +   │     └─ aws:ec2:RouteTableAssociation  my-vpc-private-0    create
     └─ aws:ec2:NatGateway                   my-vpc-1                       1 error

  aws:ec2:NatGateway (my-vpc-1):
    error: aws:ec2/natGateway:NatGateway resource 'my-vpc-1' has a problem: Missing required property 'subnetId'
if I downgrade to v1.2.0 (from 1.3.1) of the pulumi npm module with
npm install @pulumi/pulumi@1.2.0
everything works as expected, the preview completes fine and I can create the VPC without issues. I've had a brief look over the changes between the two versions (https://github.com/pulumi/pulumi-aws/compare/81eb5b...09758c) but there doesn't appear to be any changes to the nodejs code that could explain this. The only thing that seems likely is the change of the terraform provider version used. Has anyone else ran into this issue?
Hey Luke, i don't believe this is something we've seen before. can you open an issue on pulumi/awsx about this and i'll try to get to it asap next week. Thanks!
hi Cyrus, thanks for the response. i started writing up an issue for this and in the process did a fresh
npm install
to try and reproduce the issue. to my surprise, everything worked! it turns out 1.3.1 of pulumi had been released since I tried on Friday which contains a revert of a previous change. The changelog reads:
- Revert “propagate resource inputs to resource state during preview”. These changes had a critical issue that needs further investigation.
I reinstalled 1.3.0 and the error occurred as expected, so looks like the ‘critical issue’ mentioned above was likely the cause of my problem too. In any case, looks like everything is working now, so I won’t submit an issue.
Oh that's good!