Closed rvdouderaa closed 2 weeks ago
@rvdouderaa thanks for opening this issue. Since Terraform relies on the Azure rest API for Azure resource management. Per the latest Azure API, privateEndpointNetworkPolicies
only supports Enabled
and Disabled
. So Terraform could not support NetworkSecurityGroupEnabled
and RouteTableEnabled
until the Azure API includes them.
@sinbai The learn link in the issue describes 4 options.
The possible values for the privateEndpointNetworkPolicies are Disabled, NetworkSecurityGroupEnabled, RouteTableEnabled, and Enabled.
It show a JSON example with a 2019 API version?
@rvdouderaa I have filed an API issue to track this inconsistency. Let's wait for the response from the API team.
@sinbai meanwhile the API is now capable for more options for PrivateEndpointNetworkPolicies, therefore the azurerm provider could be updated. Thank you!
@sinbai It looks like the API side has been fixed. https://github.com/Azure/azure-rest-api-specs/blob/main/specification/network/resource-manager/Microsoft.Network/stable/2023-09-01/virtualNetwork.json#L1602
When this gets updated? Also as per documentation, if we just enabled it, it still work for network security group to restrict network for private endpoint , right ?
+1 on this one..
It seems the options are available now:
closing based on @pascalkrielen 's comment
Is there an existing issue for this?
Community Note
Description
In
azurem_subnet
there is the optionprivate_endpoint_network_policies_enabled
, which accepts (obviously) only true or false.However, there are more options. Eg. when setting
PrivateEndpointNetworkPolicies
using powershell the options are:disabled
NetworkSecurityGroupEnabled
RouteTableEnabled
enabled
When setting
NetworkingSecurityGroupEnabled
using powershell, Terraform wants to revert this on the next runNew or Affected Resource(s)/Data Source(s)
azurerm_subnet
Potential Terraform Configuration