sparse-intern-71089
11/16/2020, 6:15 PMgentle-diamond-70147
11/16/2020, 6:21 PMsubnetID
is straightforward. If you have an existing Subnet you want to use can just set it as subnetid: 'subnet-abc123'
. Otherwise you can create a VPC, Subnet, etc. and then pass the subnetId
value in the same way.most-address-4174
11/16/2020, 6:28 PMconst stagingVpc = new awsx.ec2.Vpc(
'xyz-staging',
{
numberOfNatGateways: 2,
numberOfAvailabilityZones: 2,
subnets: [
{ type: 'public', name: '1' },
{ type: 'public', name: '2' },
{ type: 'private', name: '1' },
{ type: 'private', name: '2' },
],
},
{}
)
And have a variable: const stagingVpcPublicSubnetIds = stagingVpc.publicSubnetIds
I may be a bit rusty here, but I’m having difficulty taking one of those IDs into my EC2 instance, if I try:
Do you know if there’s an easy way to grab the ID of one of those subnets as a string?gentle-diamond-70147
11/16/2020, 7:22 PMsubnetId: pulumi.output(stagingVpc.publicSubnetIds).apply(it => it[0]),
most-address-4174
11/17/2020, 1:43 PM