https://pulumi.com logo
Title
c

clever-lawyer-94920

05/16/2021, 7:06 PM
b

billowy-army-68599

05/16/2021, 7:17 PM
not at this time, have you tried our eks package?
c

clever-lawyer-94920

05/16/2021, 7:24 PM
Yes. But I couldn't find sample code in Python to create the cluster which deploys the worker nodes in private subnets. The terraform code I used creates around 52 resources, with 3 public subnets, 3 private subnets, nat gateways, security groups, iam roles, asgs, etc. What I am worried about is how to setup the networking for the cluster to work properly.
https://github.com/pulumi/examples/blob/master/aws-py-eks/vpc.py This uses public subnets to deploy worker nodes and the ingress rules uses
0.0.0.0/0
.
Does Pulumi has an equivalent concept of terraform modules?
What I am trying to do is create an equivalent infra to https://github.com/cshintov/localcloud/tree/tf-eks/terraform/eks
s

steep-toddler-94095

05/17/2021, 1:00 AM
create the cluster which deploys the worker nodes in private subnets.
use this package (go to Python tab): https://www.pulumi.com/docs/reference/pkg/eks/cluster/ and just leave
public_subnet_ids
empty. just from a quick scan, the API for the eks pulumi package is very similar to the TF module you linked. they might even be the same?
c

clever-lawyer-94920

05/17/2021, 5:50 AM
In
private_subnet_id
section its mentioned
Also consider setting nodeAssociatePublicIpAddress: true for fully private workers.
Shouldn't it be
nodeAssociatePublicIpAddress: false
s

steep-toddler-94095

05/17/2021, 6:12 AM
yeah that looks like a documentation error. it also should be changed to
node_associate_public_ip_address
in the python tab since the camelCase is for Typescript
👍 1