ole, there is a “bug” in this sections first code ...
# docs
d
ole, there is a “bug” in this sections first code example https://www.pulumi.com/docs/reference/pkg/nodejs/pulumi/awsx/ec2/#subnets
t
d
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
why do you think so? it looks okay to me, also in line with the third example
d
example1:
Copy code
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:
Copy code
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
maybe the text isn't perfect? let's ask @lemon-spoon-91807