使用 terraform 如何将自定义域添加到 Azure 前门

use terraform how to add custom domain to Azure front door

我创建了 Auzre 前门,但有许多自定义域要添加到前门。 我可以使用 terraform 吗? 我的意思是不创建新的前门,只将域添加到现有的前门。 非常感谢!

不幸的是,目前还不可能,因为 data source 不支持 azurerm_frontdoor。您必须通过使用资源块添加多个域来创建具有动态端点和 custom_https_configuration 的新前门。

您可以参考以下代码使用 terraform 创建新的前门:

  1. Getting Started with Azure Front Door and Terraform | Coding With Taz
  2. terraform-azurerm-front-door/r-front-door.tf at master · claranet/terraform-azurerm-front-door (github.com)