terraform-provider-azurerm
terraform-provider-azurerm copied to clipboard
unable to update publicnetworkaccess on azurerm_windows_web_app
Is there an existing issue for this?
- [X] I have searched the existing issues
Community Note
- Please vote on this issue by adding a :thumbsup: reaction to the original issue to help the community and maintainers prioritize this request
- Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
- If you are interested in working on this issue or have submitted a pull request, please leave a comment and review the contribution guide to help.
Terraform Version
1.0.7
AzureRM Provider Version
3.98.0
Affected Resource(s)/Data Source(s)
azurerm_windows_web_app
Terraform Configuration Files
resource "azurerm_windows_web_app" "webapp_windows" {
...
public_network_access_enabled = false
}
Debug Output/Panic Output
Error: updating Windows App Service (Subscription: "XXXX" Resource Group Name: "XXX" Site Name: "web-td04z6ixoqpwebapp0"): performing CreateOrUpdate: unexpected status 400 (400 Bad Request) with response: {"Code":"BadRequest","Message":"There was a conflict. SiteConfig.PublicNetworkAccess cannot be modified. Please modify the Site.PublicNetworkAccess property.","Target":null,"Details":[{"Message":"There was a conflict. SiteConfig.PublicNetworkAccess cannot be modified. Please modify the Site.PublicNetworkAccess property."},{"Code":"BadRequest"},{"ErrorEntity":{"ExtendedCode":"01020","MessageTemplate":"There was a conflict. {0}","Parameters":["SiteConfig.PublicNetworkAccess cannot be modified. Please modify the Site.PublicNetworkAccess property."],"Code":"BadRequest","Message":"There was a conflict. SiteConfig.PublicNetworkAccess cannot be modified. Please modify the Site.PublicNetworkAccess property."}}],"Innererror":null}
Expected Behaviour
set publicnetworkaccess explicitly to false, instead of leaving it as null
Actual Behaviour
we are modifying the PublicNetworkAccess field on an existing windows app service. the current value is null. not sure why terraform is seeing the value as "true".
when it tries to explicitly set it to false, we get the error mentioned above.
Steps to Reproduce
No response
Important Factoids
No response
References
No response
I'm seeing the same issue for azurerm_windows_web_app
I'm on azurerm 3.90
performing CreateOrUpdate: unexpected status 400 with response: {"Code":"BadRequest","Message":"There was a conflict. SiteConfig.PublicNetworkAccess cannot be modified. Please modify the Site.PublicNetworkAccess property.","Target":null,"Details":[{"Message":"There was a conflict. SiteConfig.PublicNetworkAccess cannot be modified. Please modify the Site.PublicNetworkAccess property."},{"Code":"BadRequest"},{"ErrorEntity":{"ExtendedCode":"01020","MessageTemplate":"There was a conflict. {0}","Parameters":["SiteConfig.PublicNetworkAccess cannot be modified. Please modify the Site.PublicNetworkAccess property."],"Code":"BadRequest","Message":"There was a conflict. SiteConfig.PublicNetworkAccess cannot be modified. Please modify the Site.PublicNetworkAccess property."}}],"Innererror":null}