diff --git a/azurerm/resource_arm_kubernetes_cluster.go b/azurerm/resource_arm_kubernetes_cluster.go index f8b432f448b1..2e245b57d09c 100644 --- a/azurerm/resource_arm_kubernetes_cluster.go +++ b/azurerm/resource_arm_kubernetes_cluster.go @@ -39,12 +39,6 @@ func resourceArmKubernetesCluster() *schema.Resource { return nil } - podCidr := profile["pod_cidr"].(string) - - if networkPlugin == "azure" && podCidr != "" { - return fmt.Errorf("The `pod_cidr` field in the `network_profile` block can not be specified when `network_plugin` is set to `azure`. Please remove `pod_cidr` or set `network_plugin` to `kubenet`.") - } - dockerBridgeCidr := profile["docker_bridge_cidr"].(string) dnsServiceIP := profile["dns_service_ip"].(string) serviceCidr := profile["service_cidr"].(string) diff --git a/website/docs/r/kubernetes_cluster.html.markdown b/website/docs/r/kubernetes_cluster.html.markdown index 626f737be02e..49113a917c71 100644 --- a/website/docs/r/kubernetes_cluster.html.markdown +++ b/website/docs/r/kubernetes_cluster.html.markdown @@ -193,6 +193,7 @@ The following arguments are supported: * `kubernetes_version` - (Optional) Version of Kubernetes specified when creating the AKS managed cluster. If not specified, the latest recommended version will be used at provisioning time (but won't auto-upgrade). * `network_profile` - (Optional) A Network Profile block as documented below. +-> **NOTE:** If `network_profile` is not defined, `kubenet` profile will be used by default. * `tags` - (Optional) A mapping of tags to assign to the resource. @@ -265,7 +266,7 @@ A `network_profile` block supports the following: * `docker_bridge_cidr` - (Optional) IP address (in CIDR notation) used as the Docker bridge IP address on nodes. This is required when `network_plugin` is set to `kubenet`. Changing this forces a new resource to be created. -* `pod_cidr` - (Optional) The CIDR to use for pod IP addresses. Changing this forces a new resource to be created. +* `pod_cidr` - (Optional) The CIDR to use for pod IP addresses. This field can only be set when `network_plugin` is set to `kubenet`. Changing this forces a new resource to be created. Here's an example of configuring the `kubenet` Networking Profile: