rhythmic-flag-11093
06/29/2020, 2:58 AMimport * as awsx from "@pulumi/awsx";
// Allocate a new VPC with the default settings:
const vpc = new awsx.ec2.Vpc("custom");
// Export a few resulting fields to make them easy to use:
export const vpcId = vpc.id;
export const vpcPrivateSubnetIds = vpc.privateSubnetIds;
export const vpcPublicSubnetIds = vpc.publicSubnetIds;
from here:
https://www.pulumi.com/docs/guides/crosswalk/aws/vpc/
I get this error:
index.ts(6,13): error TS2554: Expected 2-3 arguments, but got 1.
It's referring to this line
const vpc = new awsx.ec2.Vpc("custom");
Any feedback is appreciatedlittle-cartoon-10569
06/29/2020, 3:26 AMconstructor(name: string, args: VpcArgs | ExistingVpcArgs | ExistingVpcIdArgs, opts?: pulumi.ComponentResourceOptions);
So you must have the args parameter (no ?
after args
). It looks like you can give it an empty args parameter though: haven't tried it, since the cidrBlock argument is essential for my use cases.rhythmic-flag-11093
06/29/2020, 11:31 PM