You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何配置Terraform aws_eks_addon aws-ebs-csi-driver的volumeAttachLimit

解决AWS EBS CSI Driver EKS Addon配置值验证失败问题

我查阅了Terraform AWS Provider的aws_eks_addon文档,了解如何传递configuration_values;同时参考了AWS CLI的describe-addon-configuration文档,学习获取配置值Schema的方法。找到volumeAttachLimit配置项后,我参照Schema编写了以下Terraform代码:

resource "aws_eks_addon" "ebs_csi_driver" {
  addon_name    = "aws-ebs-csi-driver"
  cluster_name  = aws_eks_cluster.eks_cluster.name
  addon_version = try(var.addon_versions.ebs_csi_driver, null)
  configuration_values = jsonencode({
    properties = {
      node = {
        properties = {
          volumeAttachLimit = {
            minimum = 20
          }
        }
      }
    }
  })
}

执行terraform apply时遇到以下错误:

operation error EKS: UpdateAddon, https response error StatusCode: 400, RequestID: df42e7e0-f96b-48f1-9359-cf8c29a188cc, InvalidParameterException: ConfigurationValue provided in request is not supported: Json schema validation failed with error: [$.properties: is not defined in the schema and the schema does not allow additional properties]

我曾怀疑是遗漏了顶层结构或者需要用额外参数传递,但文档中并未提及相关内容。感谢@MedAgou提供了正确的配置代码:

resource "aws_eks_addon" "ebs_csi_driver" {
  addon_name    = "aws-ebs-csi-driver"
  cluster_name  = aws_eks_cluster.eks_cluster.name
  addon_version = try(var.addon_versions.ebs_csi_driver, null)
  configuration_values = jsonencode({
    node = {
      volumeAttachLimit = 20
    }
  })
}

内容的提问来源于stack exchange,提问作者Jack-of-some

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.06.18 22:41:08