<p>I'm trying to create an AWS EKS private cluster using Terraform with the private subnet in VPC in AWS region <code>us-west-2</code> region, with default terraform eks module configurations.</p>
<p>When I set the <strong><code>endpoint_private_access=true</code></strong> and <strong><code>endpoint_public_access=false</code></strong>  ran the <code>terraform apply</code> command for provisioning the cluster and it fails and throws the error which is in the below error section.</p>
<p>I have followed the steps by deleting the .terraform folder and its contents and re-initiated the modules and applied the terraform plan and terraform apply, but still, it throws the same error.</p>
<p>But, when I set the public and private API endpoint to <code>true</code>, everything works well without any issues.
As have recommended in Terraform eks module git issues, I've applied the <code>terraform apply</code> second time but still, I'm seeing the same error <strong><code>data &quot;http&quot; &quot;wait_for_cluster&quot;</code></strong> error</p>
<p>I have waited for 35min to provisioned for <strong><code>coredns</code>, <code>aws-node</code> and <code>kube-proxy</code></strong>, but those are not provisioned</p>
<p>I'm using Terraform:v.1.02 with Terraform eks module 17.1.0 from terraform registry</p>
<p><strong>Error</strong></p>
<p><code>with module.app_eks.data.http.wait_for_cluster[0], on .terraform\modules\private_eks\data.tf line 89, in data &quot;http&quot; &quot;wait_for_cluster&quot;: 89: data &quot;http&quot; &quot;wait_for_cluster&quot; {</code></p>
<p>I have added variables as
<code>wait_for_cluster_timeout = var.wait_for_cluster_timeout</code> and set the timeout to 300 and 3000 also, but I'm seeing the same error</p>
<p>If someone gives any inputs or solutions or recommendations to this, it will help me and others who are facing this issue</p>

<p>When you are setting up your EKS Cluster and setting <code>endpoint_private_access = &quot;true&quot;</code> try using <code>public_access_cidrs = [&quot;&lt;your-ip&gt;/32&quot;, &lt;or-try 0.0.0.0/0&gt;]</code></p>
<p>You can also refer to my terraform code which creates the whole EKS Cluster:
<a href="https://github.com/lovedeepsh/aws_eks_terraform/tree/main/eks" rel="nofollow noreferrer">EKS TERRAFORM</a></p>
