Pulumi eks seems to create three security groups: ...
# aws
i
Pulumi eks seems to create three security groups: • eksClusterSecurityGroup with 443 between the nodes, available as
cluster.clusterSecurityGroup
• nodeSecurityGroup with who knows, available as
cluster.nodeSecurityGroup
• and eks-cluster-sg-cluster-name, where I actually need to add rules to expose for example nodeports. Anyone got any idea how I can get the id of the third one through pulumi? Is it hidden in some object?
Found a workaround for now. …not pretty, but it works 🙂
Copy code
const outwardSecurityGroups = pulumi.output(aws.ec2.getSecurityGroups({
      tags: { 'aws:eks:cluster-name': clusterName },
    }));


    new aws.ec2.SecurityGroupRule(`my-rule`, {
      ...
      securityGroupId: outwardSecurityGroups.ids[0],
    });