sparse-intern-71089
04/12/2023, 6:16 PMsalmon-account-74572
04/12/2023, 6:19 PMawsx.ec2.NewVpc
then you’ll get a VPC, subnets, gateways, routes, route tables, etc. Right now you’re using aws.ec2.NewVpc
, which creates just the VPC.
For an example of how create a VPC using AWSX and then creating an EKS cluster, take a look at our Kubernetes on AWS template: https://www.pulumi.com/templates/kubernetes/aws/
The referenced template is found in our “templates” repository on GitHub: https://github.com/pulumi/templates/ (look for “kubernetes-aws-{lang}“)brash-painting-89833
04/12/2023, 6:25 PMsalmon-account-74572
04/12/2023, 6:31 PMsalmon-account-74572
04/12/2023, 6:32 PMbillowy-army-68599
nodeGroup, err := eks.NewNodeGroup(ctx, "node-group-2", &eks.NodeGroupArgs{
ClusterName: eksCluster.Name,
NodeGroupName: pulumi.String("demo-eks-nodegroup-2"),
NodeRoleArn: pulumi.StringInput(nodeGroupRole.Arn),
SubnetIds: vpc.privateSubnetIds,
ScalingConfig: &eks.NodeGroupScalingConfigArgs{
DesiredSize: <http://pulumi.Int|pulumi.Int>(2),
MaxSize: <http://pulumi.Int|pulumi.Int>(2),
MinSize: <http://pulumi.Int|pulumi.Int>(1),
},
})
salmon-account-74572
04/12/2023, 6:34 PMvpc
would be the name of the VPC created using AWSX, so vpc.privateSubnetIds
references the private subnets created in the VPC by Crosswalk for AWS (AWSX).salmon-account-74572
04/12/2023, 6:34 PMbrash-painting-89833
04/13/2023, 2:04 AM