Hi all, A pulumi / aws incongruency I'm seeing, I...
# aws
Hi all, A pulumi / aws incongruency I'm seeing, I'm running this pulumi code, The screenshot clearly shows 6 subnets being created, 3 public 3 private, and confirmed in AWS, however pulumi only seems to report 2 are being created in the log messages. This is causing me issues trying to do loops for mounting filesystems etc. Anyone know if this is a pulumi bug or am I missing something more fundamental?
Copy code
import * as awsx from "@pulumi/awsx";
import * as pulumi from '@pulumi/pulumi';


// Create a new VPC with 3 public and private subnets
const vpc = new awsx.ec2.Vpc(`${SERVICE}-VPC`);

// logs a count of 2 errrenously
<http://pulumi.log.info|pulumi.log.info>(`publicSubNetID Count = ${vpc.publicSubnetIds.apply.length.toString()}`);
<http://pulumi.log.info|pulumi.log.info>(`privateSubNetID Count = ${vpc.privateSubnetIds.apply.length.toString()}`);
could it be that crosswalk does "By default, however, the
resource will only use 2 of them when allocating subnets and the associated gateways" ?
Well they all have subnets and gateways associated
where are you quoting the line from?
In the screenshot we do see three VPCs. If you output the publicSubnetIds what do you see?
Ah I see the bug now
Copy code
This non function call version of .apply.length is returning the number of parameters to apply, which = 2!
Ha. The downside of using a programming language for your IaC, I guess.