diff --git a/aws-ts-eks-hello-world/index.ts b/aws-ts-eks-hello-world/index.ts index b61829709..13bad254e 100644 --- a/aws-ts-eks-hello-world/index.ts +++ b/aws-ts-eks-hello-world/index.ts @@ -8,10 +8,11 @@ import * as pulumi from "@pulumi/pulumi"; const name = "helloworld"; // Create an EKS cluster with non-default configuration -const vpc = new awsx.Network("vpc", { usePrivateSubnets: false }); +const vpc = new awsx.ec2.Vpc("vpc", { numberOfAvailabilityZones: 2 }); + const cluster = new eks.Cluster(name, { - vpcId: vpc.vpcId, - subnetIds: vpc.subnetIds, + vpcId: vpc.id, + subnetIds: vpc.publicSubnetIds, desiredCapacity: 2, minSize: 1, maxSize: 2, diff --git a/aws-ts-eks/index.ts b/aws-ts-eks/index.ts index 2ae1bf5d5..4ede3c687 100644 --- a/aws-ts-eks/index.ts +++ b/aws-ts-eks/index.ts @@ -4,12 +4,12 @@ import * as awsx from "@pulumi/awsx"; import * as eks from "@pulumi/eks"; // Create a VPC for our cluster. -const vpc = new awsx.Network("vpc"); +const vpc = new awsx.ec2.Vpc("vpc", { numberOfAvailabilityZones: 2 }); // Create the EKS cluster itself, including a "gp2"-backed StorageClass and a deployment of the Kubernetes dashboard. const cluster = new eks.Cluster("cluster", { - vpcId: vpc.vpcId, - subnetIds: vpc.subnetIds, + vpcId: vpc.id, + subnetIds: vpc.publicSubnetIds, instanceType: "t2.medium", desiredCapacity: 2, minSize: 1,