azure - 无法在 terraform 中为 FrontDoor 设置最低 TLS 版本
问题描述
我正在使用 terraform 1.44。当我尝试运行它时:
resource "azurerm_frontdoor" "frontdoor" {
name = "my-fd"
location = "${azurerm_resource_group.default.location}"
resource_group_name = "${azurerm_resource_group.default.name}"
enforce_backend_pools_certificate_name_check = false
routing_rule {
.....
}
backend_pool_load_balancing {
......
}
backend_pool_health_probe {
.....
}
backend_pool {
.......
}
frontend_endpoint {
name = "myFrontendEndpoint"
host_name = "my-custom.hostname.com"
custom_https_provisioning_enabled = true
custom_https_configuration {
certificate_source = "FrontDoor"
minimum_tls_version = "1.2"
}
}
}
它失败了
错误:“frontend_endpoint.custom_https_configuration.minimum_tls_version”:无法设置此字段
根据this GitHub issue它应该已经解决了,但是文档链接被破坏了......并且在当前文档中没有提到这个领域......
我怎样才能创建这个前端?没有设置minimum_tls_version
它的错误
为前端端点启用自定义域 HTTPS 时出错:frontdoor.FrontendEndpointsClient#EnableHTTPS:发送请求失败:StatusCode=400 -- 原始错误:Code="BadRequest" Message="\"minimumTlsVersion\" 是必需参数。"
解决方案
2019 年 9 月之后创建的所有 Front Door 配置文件都使用 TLS 1.2 作为默认最小值。
Front Door 支持 TLS 版本 1.0、1.1 和 1.2。尚不支持 TLS 1.3。
从terraform 文档中,该属性minimum_tls_version
只能从custom_https_configuration
块中导出。它不能像参数引用一样设置。
例如,
....
frontend_endpoint {
name = "exampleFrontendEndpoint1"
host_name = "example-FrontDoor.azurefd.net"
custom_https_provisioning_enabled = true
custom_https_configuration {
certificate_source = "FrontDoor"
}
}
}
output "minimum_tls_version" {
value = "${azurerm_frontdoor.example.frontend_endpoint[0].custom_https_configuration[0].minimum_tls_version}"
}
推荐阅读
- nginx - 配置Nginx回复http://my-domain.com/.well-known/acme-challenge/test.html
- c# - C# 应用程序无缘无故停止工作,无需更改代码或配置
- arrays - 创建矩阵 - “值更新不是 Example.Matrix 的成员”错误
- r - 在 R 中安装包时出现问题:“dyld:惰性符号绑定失败”
- foreach - Terraform GCP Secret Manager:对于每个多个秘密错误
- discord.js - 在 Discord 中查找具有 2 个角色的成员 [使用 Discordjs]
- symfony - Symfony 4 中间件验证 JWT 并将 idUser 发送到控制器
- amazon-web-services - AWS 交互式视频服务 - ivs.AccessDeniedException
- database - 数据库连接是否总是在 NestJS + TypeORM 中打开?
- visual-studio-code - 是否可以针对 VSCode 中的当前编辑器运行临时代码?