pulumi-eks
pulumi-eks copied to clipboard
Python: Can't set NodeGroup extra_node_security_groups
I'd like to specify extra_node_security_groups
. However, pulumi fails with:
raise _InactiveRpcError(state)
grpc._channel._InactiveRpcError: <_InactiveRpcError of RPC that terminated with:
status = StatusCode.UNKNOWN
details = "args.extraNodeSecurityGroups.map is not a function"
debug_error_string = "{"created":"@1622648157.791402868","description":"Error received from peer ipv4:127.0.0.1:37751","file":"src/core/lib/surface/call.cc","file_line":1066,"grpc_message":"args.extraNodeSecurityGroups.map is not a function","grpc_status":2}"
Steps to reproduce
I'm doing the straightforward thing
sg = aws.ec2.SecurityGroup(...)
ng = NodeGroup(
...,
extra_node_security_groups=[sg]
)
Possibly related to #585
It makes this library partially unusable
As a workaround, you can create an additional security group for the node group, set all necessary IPs into it and attach them to the node group as the primary security group. Here is an example:
NodeGroupV2(
cluster_ingress_rule=cluster.eks_cluster_ingress_rule,
node_security_group=sg_eks.sg
)