This message was deleted.
# golang
s
This message was deleted.
s
If you use
awsx.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}“)
b
thanks is there any recommendation on what module etc to use? i had found this awsx (https://github.com/pulumi/pulumi-awsx) but had not much stars.. like i also found this: https://github.com/pulumi/pulumi-eks/ but i am not sure which is the most supported/recommened edit: typo in url
s
Maybe it’s just me, but those URLs look the same…? 🤔 Regardless, using the module that’s referenced in the templates is the right one to use (it’s the same one you linked to). It’s currently at version 1.0.1 and is supported by Pulumi.
Same goes for AWSX, which is now at version 1.0.2 and is supported by Pulumi.
b
you can just specify the subnets as an output
Copy code
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),
			},
		})
s
Exactly. In @billowy-army-68599’s example code above,
vpc
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).
Does that help?
b
@salmon-account-74572 i fixed the url thanks for all the info @billowy-army-68599 i will try with the module now But the questions regarding modules was like, we have this both for eks: https://github.com/pulumi/pulumi-eks and https://github.com/pulumi/pulumi-aws/tree/master/sdk/go/aws/eks either way, thanks for the info