我正在使用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问题,它应该已经解决,但是文档链接已损坏...而且在当前文档中没有提及此字段...
如何创建此前端?如果未设置minimum_tls_version
,则会出现
为前端端点启用自定义域HTTPS时出错:frontdoor.FrontendEndpointsClient#EnableHTTPS:发送请求失败:StatusCode = 400-原始错误:Code =“ BadRequest” Message =“ \” minimumTlsVersion \“是必填参数。” < / p>
答案 0 :(得分:1)
从Azure front door SSL configuration,
2019年9月之后创建的所有前门配置文件使用TLS 1.2作为 默认最小值。
Front Door支持TLS版本1.0、1.1和1.2。 TLS 1.3还没有 支持。
只能从minimum_tls_version
块中导出terraform document属性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}"
}