【问题标题】:Terraform errors deploying google_dns_managed_zone with rsasha1Terraform 使用 rsasha1 部署 google_dns_managed_zone 时出错
【发布时间】:2021-10-28 06:33:19
【问题描述】:

首先我明白 RSA SHA1 不被推荐,但对于这个特定的用例是必需的。其次,我可以毫无问题地部署以下内容:

resource "google_dns_managed_zone" "example-zone" {
  name        = "example-zone-02"
  dns_name    = "example-0123.com."
  description = "DNS Zone with DNSSEC"
  dnssec_config {
    default_key_specs {
      algorithm = "rsasha256"
      key_length = 2048
      key_type = "zoneSigning"
      kind = "dnsKeySpec"
    }
    default_key_specs {
      algorithm = "rsasha256"
      key_length = 2048
      key_type = "keySigning"
      kind = "dnsKeySpec"
    }
    kind = "managedZoneDnsSecConfig"
    non_existence = "nsec"
    state = "on"
  }
}

但是,一旦我将算法切换到 rsasha1,我就会得到以下信息:

googleapi: Error 400: Invalid value for 'entity.managedZone.dnssecConfig.defaultKeySpecs[0]': 'ZONE_SIGNING / RSASHA1 / 2048'
│ More details:
│ Reason: invalid, Message: Invalid value for 'entity.managedZone.dnssecConfig.defaultKeySpecs[0]': 'ZONE_SIGNING / RSASHA1 / 2048'
│ Reason: invalid, Message: Invalid value for 'entity.managedZone.dnssecConfig.defaultKeySpecs[1]': 'KEY_SIGNING / RSASHA1 / 2048'

根据文档here,密钥长度应该是可以接受的...我也尝试过 128、256、512 和 1024...没有运气。非常感谢任何帮助。

【问题讨论】:

    标签: google-cloud-platform terraform terraform-provider-gcp google-cloud-dns


    【解决方案1】:

    要使用 rsasha1,您的 Google Cloud 项目必须列入白名单。您必须联系 Google Cloud 支持以启用对 DNSSEC 的 SHA1 支持。这也意味着您需要一份 Google Cloud 支持合同。

    【讨论】:

      猜你喜欢
      • 2020-09-19
      • 2020-09-18
      • 2019-09-07
      • 2021-09-10
      • 2020-07-01
      • 2022-01-18
      • 2019-09-13
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多