Open yukccy opened 1 year ago
Can anyone follow up?
Hello, I think you need define security group. Look here https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/eks/client/create_cluster.html resourcesVpcConfig section is required and it contains SG
Hello, I think you need define security group. Look here https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/eks/client/create_cluster.html resourcesVpcConfig section is required and it contains SG
I agree a new cluster definitely need a SG. Just according to AWS docs, they said a SG will be created automatically. And I have tested the one AWS auto-created will be the default SG of the EKS cluster. Also, even if I define one in Ansible script, it will go to additional SG instead of default SG of EKS cluster. There's still one default SG created by AWS.
Also in your link, seems this field is not mandatory.
securityGroupIds (list) –
Specify one or more security groups for the cross-account elastic network interfaces that Amazon EKS creates to use that allow communication between your nodes and the Kubernetes control plane. If you don’t specify any security groups, then familiarize yourself with the difference between Amazon EKS defaults for clusters deployed with Kubernetes.
Summary
When I am trying to create an EKS cluster by using the
community.aws.eks_cluster
module, it showed an error that I need to specify the security groups. After I specified the security group in playbook, the result showed that the specified groups become the additional security groups of the cluster according to AWS console. And AWS created a new security group as the cluster security group.According to AWS docs here, AWS will create a security group automatically during EKS cluster creation. In my perspective, AWS is always handling the default cluster level security group.
Moreover, according to Ansible documentation here,
security_groups
has not stated to be mandatory whilestate
ispresent
.Therefore, if AWS is always creating security group for the new cluster, why we need the
security_groups
field when we are creating a new EKS cluster? It can be an option to allow us adding additional security group but should not be required.Issue Type
Bug Report
Component Name
community.aws.eks_cluster
Ansible Version
Collection Versions
AWS SDK versions
Configuration
OS / Environment
Playbook running on MacOS Ventura 13.3.1 (a)
Steps to Reproduce
Expected Results
An EKS cluster will be created.
Actual Results
Code of Conduct