【问题标题】:Unable to use IAM Access control method using terraform aws_msk_cluster resource无法使用 terraform aws_msk_cluster 资源的 IAM 访问控制方法
【发布时间】:2021-08-06 23:44:25
【问题描述】:

我正在尝试开发一个模块来创建 AWS MSK。我想为 MSK 资源启用 IAM 身份验证 我正在关注以下链接,但没有看到与 IAM 身份验证相关的任何内容。 [(https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/msk_cluster#sasl)]

dynamic "client_authentication" {
   for_each = var.client_tls_auth_enabled || var.client_sasl_iam_enabled ? [1] : []
   content {
     dynamic "tls" {
       for_each = var.client_tls_auth_enabled ? [1] : []
       content {
         certificate_authority_arns = var.certificate_authority_arns
       }
     }
     dynamic "sasl" {
       for_each = var.client_sasl_iam_enabled ? [1] : []
       content {
         iam = var.client_sasl_iam_enabled
       }
     }
   }
 }

错误:此处不应出现名为“iam”的参数。

【问题讨论】:

标签: amazon-web-services terraform aws-msk


【解决方案1】:

至少需要更新您的 aws 提供程序 v3.43.0:see changelog

例如

terraform {
  required_version = ">= 0.13"
  required_providers {
    aws    = ">= 3.43.0"
  }
}

它真的对我有用。

【讨论】:

    【解决方案2】:

    你猜怎么着? CF也没有。有一个支持 tf 的 PR。 https://github.com/hashicorp/terraform-provider-aws/pull/19404

    【讨论】:

    • 谢谢弗兰克,我发现你能不能给 MR 点个赞:p
    猜你喜欢
    • 2012-06-22
    • 1970-01-01
    • 1970-01-01
    • 2021-12-08
    • 2012-09-09
    • 1970-01-01
    • 2016-03-18
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多