<p>My terraform file is as following.</p>
<ul>
<li>module eks version: 19.5.1</li>
</ul>
<pre class="lang-js prettyprint-override"><code>data &quot;aws_eks_cluster&quot; &quot;cluster&quot; {
  name = module.eks.cluster_name
}

data &quot;aws_eks_cluster_auth&quot; &quot;cluster&quot; {
  name = module.eks.cluster_name
}

provider &quot;kubernetes&quot; {
  host                   = data.aws_eks_cluster.cluster.endpoint
  cluster_ca_certificate = base64decode(data.aws_eks_cluster.cluster.certificate_authority.0.data)
  token                  = data.aws_eks_cluster_auth.cluster.token
}

module &quot;eks&quot; {
  source  = &quot;terraform-aws-modules/eks/aws&quot;
  version = &quot;19.5.1&quot; //19.0 version created the ingress security group for us
...}
</code></pre>
<p>When running 'terraform plan', I get the error:</p>
<pre class="lang-js prettyprint-override"><code>
│ Error: reading EKS Cluster (ccc): couldn't find resource
│ 
│   with data.aws_eks_cluster.cluster,
│   on main.tf line 7, in data &quot;aws_eks_cluster&quot; &quot;cluster&quot;:
│    7: data &quot;aws_eks_cluster&quot; &quot;cluster&quot; {
│ 
╵
</code></pre>

s00103898-276165-15433
<p>Try removing the data resources and using the following kubernetes provider:</p>
<pre><code>provider &quot;kubernetes&quot; {
  host                   = module.eks.cluster_endpoint
  cluster_ca_certificate = base64decode(module.eks.cluster_certificate_authority_data)
  exec {
    api_version = &quot;client.authentication.k8s.io/v1beta1&quot;
    command     = &quot;aws&quot;
    args = [&quot;eks&quot;, &quot;get-token&quot;, &quot;--cluster-name&quot;, module.eks.cluster_name]
  }
}
</code></pre>
