Azure Front Door流水线执行失败:前端端点映射未找到指定密钥
Azure Front Door Terraform 流水线部署索引错误
背景信息
- 已部署的App Service名称:
azapp-af-advanced-braintreewebhook-callback-web-qc - 相关配置:
domain_fqdn = "events.staging.paynow.aon.com" key_vault_certificate_name = "uat-paynow-aon-com-cert"
- 上述域名与证书已成功应用到预发布环境的App Gateway,当前需要更新预发布环境的Azure Front Door。
错误详情
执行流水线时触发Terraform索引错误,具体报错信息如下:
Error: Invalid index │ │ on ..\..\..\..\..\infra-repo\main.tf line 125, in resource "azurerm_frontdoor_custom_https_configuration" "custom_domain_https_config": │ 125: frontend_endpoint_id = azurerm_frontdoor.frontdoor.frontend_endpoints["${each.value.custom_endpoint_name}"] │ ├──────────────── │ │ azurerm_frontdoor.frontdoor.frontend_endpoints is map of string with 18 elements │ │ each.value.custom_endpoint_name is "events-staging-paynow-aon-com" │ │ The given key does not identify an element in this collection value. ╵
当前状态
已在locals.tf的frontend_endpoints_list中添加events-staging-paynow-aon-com密钥,理论上映射应包含19个元素,但流水线执行时仍识别为18个元素,导致索引错误。
内容的提问来源于stack exchange,提问作者Aman Kumar
相关产品推荐
相关产品推荐

