https://pulumi.com logo
Title
d

damp-salesmen-75182

09/18/2019, 9:07 AM
ole, there is a “bug” in this sections first code example https://www.pulumi.com/docs/reference/pkg/nodejs/pulumi/awsx/ec2/#subnets
t

tall-librarian-49374

09/18/2019, 9:30 AM
d

damp-salesmen-75182

09/18/2019, 10:56 AM
thanks
but that is not the main problem
To specify your own subnet configuration you can do the following:
and code looks exactly the same as first example, it just has azs as a parameter
I think the author wanted to show here how to add a custom subnet by using new Subnet….
t

tall-librarian-49374

09/18/2019, 11:00 AM
why do you think so? it looks okay to me, also in line with the third example
d

damp-salesmen-75182

09/18/2019, 11:01 AM
example1:
import * as aws from "@pulumi/aws";
import * as awsx from "@pulumi/awsx";

const vpc = new awsx.ec2.Vpc("custom", {
   ...
   subnets: [{ type: "public" }, { type: "private" }],
});
example2:
import * as aws from "@pulumi/aws";
import * as awsx from "@pulumi/awsx";

const vpc = new awsx.ec2.Vpc("custom", {
   cidrBlock: "10.0.0.0/16",
   numberOfAvailabilityZones: 3,
   subnets: [{ type: "public" }, { type: "private" }, { type: isolated }],
});
text in the middle
To specify your own subnet configuration you can do the following:
only difference in subnets is that isolated was added
not sure, but I don’t see how that is ‘own subnet’, I was more expecting a direct access to subnet class from awsx
t

tall-librarian-49374

09/18/2019, 11:03 AM
maybe the text isn't perfect? let's ask @lemon-spoon-91807