我的terraform文件如下。
- 模块eks版本:19.5.1
data "aws_eks_cluster" "cluster" {
name = module.eks.cluster_name
}
data "aws_eks_cluster_auth" "cluster" {
name = module.eks.cluster_name
}
provider "kubernetes" {
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 "eks" {
source = "terraform-aws-modules/eks/aws"
version = "19.5.1" //19.0 version created the ingress security group for us
...}
当运行'terraform plan'时,我得到错误:
│ Error: reading EKS Cluster (ccc): couldn't find resource
│
│ with data.aws_eks_cluster.cluster,
│ on main.tf line 7, in data "aws_eks_cluster" "cluster":
│ 7: data "aws_eks_cluster" "cluster" {
│
╵
1条答案
按热度按时间o7jaxewo1#
尝试删除数据资源并使用以下kubernetes提供程序: