You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
azurerm_kubernetes_cluster - add advanced_network_policies property to advanced_networking block
This change adds support for the `advanced_network_policies` property within the
`network_profile.advanced_networking` block for Azure Kubernetes Service clusters.
Changes:
- Add `advanced_network_policies` field with valid values: `FQDN`, `L7`, `None`
- Add validation to ensure `advanced_network_policies` can only be set to `FQDN` or `L7`
when `security_enabled` is `true`
- Upgrade managedclusters SDK from 2025-07-01 to 2025-10-01 API version to support the new field
- Add tests for the new property and validation
- Update documentation to note Cilium cluster requirement
Signed-off-by: Quang Nguyen <nguyenquang@microsoft.com>
ExpectError: regexp.MustCompile("`network_profile.0.advanced_networking.0.advanced_network_policies` can only be set to `FQDN` or `L7` when `network_profile.0.advanced_networking.0.security_enabled` is set to `true`"),
ExpectError: regexp.MustCompile("`network_profile.0.advanced_networking.0.advanced_network_policies` can only be set to `FQDN` or `L7` when `network_profile.0.advanced_networking.0.security_enabled` is set to `true`"),
ExpectError: regexp.MustCompile("`network_profile.0.advanced_networking.0.advanced_network_policies` cannot be set to `FQDN` or `L7` when `service_mesh_profile.0.mode` is set to `Istio`"),
returnfmt.Errorf("when `network_profile.0.advanced_networking` is set, `network_profile.0.network_plugin` must be set to `%s`", managedclusters.NetworkPluginAzure)
returnfmt.Errorf("`network_profile.0.advanced_networking.0.advanced_network_policies` can only be set to `%s` or `%s` when `network_profile.0.advanced_networking.0.security_enabled` is set to `true`", managedclusters.AdvancedNetworkPoliciesFQDN, managedclusters.AdvancedNetworkPoliciesLSeven)
returnfmt.Errorf("`network_profile.0.advanced_networking.0.advanced_network_policies` cannot be set to `%s` or `%s` when `service_mesh_profile.0.mode` is set to `%s`", managedclusters.AdvancedNetworkPoliciesFQDN, managedclusters.AdvancedNetworkPoliciesLSeven, managedclusters.ServiceMeshModeIstio)
Copy file name to clipboardExpand all lines: website/docs/r/kubernetes_cluster.html.markdown
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -728,6 +728,8 @@ An `advanced_networking` block supports the following:
728
728
729
729
*`security_enabled` - (Optional) Is security enabled? Defaults to `false`.
730
730
731
+
*`advanced_network_policies` - (Optional) Specifies the advanced network policy for the cluster. Possible values are `FQDN`, `L7` and `None`. This can only be set to `FQDN` or `L7` when `security_enabled` is set to `true` and `network_data_plane` is set to `cilium`. This cannot be set to `FQDN` or `L7` when `service_mesh_profile``mode` is set to `Istio`. Defaults to `FQDN` when `security_enabled` is set to `true`.
732
+
731
733
---
732
734
733
735
A `load_balancer_profile` block supports the following:
0 commit comments