gpt4 book ai didi

terraform-provider-azure - terraform 0.12 应用程序网关 ssl 证书问题

转载 作者:行者123 更新时间:2023-12-04 07:14:08 25 4
gpt4 key购买 nike

我们正在尝试将 terraform 0.11 升级到 0.12,并且存在应用程序网关 ssl 证书问题。
当 terraform 0.11 像下面这样使用时,它工作正常:

  ssl_certificate {
name = "helm-mbw-int.mercedes-benz.com.cn"
data = "${base64encode(file("certificates/${var.helm_mbw_pfx_file}"))}"
password = "${var.helm_mbw_ssl_certificate_password}"
}
升级到 terraform 0.12.31 和 terragrunt 0.19.0 之后
出现错误:
调用函数"file"失败:证书/helm_mbw_pfx_file.pfx 的内容无效
UTF-8;使用 filebase64 函数获取 Base64 编码的内容或
其他文件函数(例如filemd5、filesha256)获取文件散列
结果取而代之
我应该如何更新数据字段?谢谢。

最佳答案

根据错误,您可以尝试使用以下内容:

  ssl_certificate {
name = "helm-mbw-int.mercedes-benz.com.cn"
data = "${filebase64("certificates/${var.helm_mbw_pfx_file}")}"
password = "${var.helm_mbw_ssl_certificate_password}"
}
代替
  ssl_certificate {
name = "helm-mbw-int.mercedes-benz.com.cn"
data = "${base64encode(file("certificates/${var.helm_mbw_pfx_file}"))}"
password = "${var.helm_mbw_ssl_certificate_password}"
}

关于terraform-provider-azure - terraform 0.12 应用程序网关 ssl 证书问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/68889308/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com