PR #26345 for azurerm_static_web_app
setting public_network_access_enabled
breaks resource behavior
#28226
Labels
azurerm_static_web_app
setting public_network_access_enabled
breaks resource behavior
#28226
Is there an existing issue for this?
Community Note
Terraform Version
1.10.0
AzureRM Provider Version
4.8.0
Affected Resource(s)/Data Source(s)
azurerm_static_web_app
Terraform Configuration Files
Debug Output/Panic Output
Expected Behaviour
The default value for this property should be
null
, and the user should be able to setnull
as a value.Actual Behaviour
Value can only be
true
orfalse
.This setting is not configurable via the azure portal nor the azure cli. It is only configurable via an ARM/Bicep template.
https://learn.microsoft.com/en-us/azure/templates/microsoft.web/staticsites?pivots=deployment-language-bicep#staticsite
According to the template, an empty string is a legal value, and should set the resource configuration property to
null
.The default value when creating a static web app via the azure portal is
null
.This affects the behavior of the static web app when adding a private endpoint. The expected behavior, and the behavior that I believe the
null
value achieves, is that public network access is allowed in the absence of a private endpoint, and it is blocked when a private endpoint is configured. This lines up with the azure documentation about securing a static web app on a private subnet.However when the property is explicitly set to "Enabled" (
true
value in terraform) it overrides this behavior and you cannot disable public network access except by applying the explicitfalse
value via terraform.Steps to Reproduce
No response
Important Factoids
No response
References
No response
The text was updated successfully, but these errors were encountered: