hashicorp / terraform-provider-azurerm

Terraform provider for Azure Resource Manager
https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs
Mozilla Public License 2.0
4.6k stars 4.64k forks source link

Support for "enterprise-grade edge" in azurerm_static_site #18498

Open baf opened 2 years ago

baf commented 2 years ago

Is there an existing issue for this?

Community Note

Description

Can an argument be added to set the enterprise-grade edge property on Azure Static Web Apps (azurerm_static_site)?

New or Affected Resource(s)/Data Source(s)

azurerm_static_site

Potential Terraform Configuration

No response

References

Microsoft feature documentation: https://learn.microsoft.com/en-us/azure/static-web-apps/enterprise-edge Microsoft API: https://learn.microsoft.com/en-us/rest/api/appservice/static-sites/create-or-update-static-site

MATTHEWTAYLOR1995 commented 1 year ago

Is there any update on this as I can't see any movement since 2022? It would be great if this was a feature.

mikemadeja commented 11 months ago

@baf and @MATTHEWTAYLOR1995. This might not be an easy fix. I have it working with AzAPI if you are interested.

The problem is azurerm_static_site with edge enabled relies on having a CNAME DNS entry. The CNAME DNS entry is done via the resource azurerm_static_site_custom_domain unless I am missing something so it looks like some re-work would need to be done with maybe collapsing the azurerm_static_site_custom_domain into azurerm_static_site to work out the dependency.