github.com/crossplane/upjet@v1.3.0/pkg/registry/testdata/azure/r/kubernetes_cluster.html.markdown (about)

     1  <!--
     2  SPDX-FileCopyrightText: 2023 The Crossplane Authors <https://crossplane.io>
     3  
     4  SPDX-License-Identifier: Apache-2.0
     5  -->
     6  
     7  ---
     8  
     9  subcategory: "Container"
    10  layout: "azurerm"
    11  page_title: "Azure Resource Manager: azurerm_kubernetes_cluster"
    12  description: |-
    13    Manages a managed Kubernetes Cluster (also known as AKS / Azure Kubernetes Service)
    14  ---
    15  
    16  # azurerm_kubernetes_cluster
    17  
    18  Manages a Managed Kubernetes Cluster (also known as AKS / Azure Kubernetes Service)
    19  
    20  -> **Note:** Due to the fast-moving nature of AKS, we recommend using the latest version of the Azure Provider when using AKS - you can find [the latest version of the Azure Provider here](https://registry.terraform.io/providers/hashicorp/azurerm/latest).
    21  
    22  ~> **Note:** All arguments including the client secret will be stored in the raw state as plain-text. [Read more about sensitive data in state](/docs/state/sensitive-data.html).
    23  
    24  ## Example Usage
    25  
    26  This example provisions a basic Managed Kubernetes Cluster. Other examples of the `azurerm_kubernetes_cluster` resource can be found in [the `./examples/kubernetes` directory within the GitHub Repository](https://github.com/hashicorp/terraform-provider-azurerm/tree/main/examples/kubernetes).
    27  
    28  An example on how to attach a specific Container Registry to a Managed Kubernetes Cluster can be found in the docs for [azurerm_container_registry](container_registry.html).
    29  
    30  ```hcl
    31  resource "azurerm_resource_group" "example" {
    32    name     = "example-resources"
    33    location = "West Europe"
    34  }
    35  
    36  resource "azurerm_kubernetes_cluster" "example" {
    37    name                = "example-aks1"
    38    location            = azurerm_resource_group.example.location
    39    resource_group_name = azurerm_resource_group.example.name
    40    dns_prefix          = "exampleaks1"
    41  
    42    default_node_pool {
    43      name       = "default"
    44      node_count = 1
    45      vm_size    = "Standard_D2_v2"
    46    }
    47  
    48    identity {
    49      type = "SystemAssigned"
    50    }
    51  
    52    tags = {
    53      Environment = "Production"
    54    }
    55  }
    56  
    57  output "client_certificate" {
    58    value     = azurerm_kubernetes_cluster.example.kube_config.0.client_certificate
    59    sensitive = true
    60  }
    61  
    62  output "kube_config" {
    63    value = azurerm_kubernetes_cluster.example.kube_config_raw
    64  
    65    sensitive = true
    66  }
    67  ```
    68  
    69  ## Argument Reference
    70  
    71  The following arguments are supported:
    72  
    73  * `name` - (Required) The name of the Managed Kubernetes Cluster to create. Changing this forces a new resource to be created.
    74  
    75  * `location` - (Required) The location where the Managed Kubernetes Cluster should be created. Changing this forces a new resource to be created.
    76  
    77  * `resource_group_name` - (Required) Specifies the Resource Group where the Managed Kubernetes Cluster should exist. Changing this forces a new resource to be created.
    78  
    79  * `default_node_pool` - (Required) A `default_node_pool` block as defined below.
    80  
    81  * `dns_prefix` - (Optional) DNS prefix specified when creating the managed cluster. Changing this forces a new resource to be created.
    82  
    83  * `dns_prefix_private_cluster` - (Optional) Specifies the DNS prefix to use with private clusters. Changing this forces a new resource to be created.
    84  
    85  -> **Note:** One of `dns_prefix` or `dns_prefix_private_cluster` must be specified.
    86  
    87  -> **Note:** The `dns_prefix` must contain between 3 and 45 characters, and can contain only letters, numbers, and hyphens. It must start with a letter and must end with a letter or a number.
    88  
    89  In addition, one of either `identity` or `service_principal` blocks must be specified.
    90  
    91  ---
    92  
    93  * `aci_connector_linux` - (Optional) A `aci_connector_linux` block as defined below. For more details, please visit [Create and configure an AKS cluster to use virtual nodes](https://docs.microsoft.com/azure/aks/virtual-nodes-portal).
    94  
    95  * `automatic_channel_upgrade` - (Optional) The upgrade channel for this Kubernetes Cluster. Possible values are `patch`, `rapid`, `node-image` and `stable`. Omitting this field sets this value to `none`.
    96  
    97  !> **Note:** Cluster Auto-Upgrade will update the Kubernetes Cluster (and its Node Pools) to the latest GA version of Kubernetes automatically - please [see the Azure documentation for more information](https://docs.microsoft.com/azure/aks/upgrade-cluster#set-auto-upgrade-channel).
    98  
    99  -> **Note:** Cluster Auto-Upgrade only updates to GA versions of Kubernetes and will not update to Preview versions.
   100  
   101  * `api_server_authorized_ip_ranges` - (Optional) The IP ranges to allow for incoming traffic to the server nodes.
   102  
   103  * `auto_scaler_profile` - (Optional) A `auto_scaler_profile` block as defined below.
   104  
   105  * `azure_active_directory_role_based_access_control` - (Optional) - A `azure_active_directory_role_based_access_control` block as defined below.
   106  
   107  * `azure_policy_enabled` - (Optional) Should the Azure Policy Add-On be enabled? For more details please visit [Understand Azure Policy for Azure Kubernetes Service](https://docs.microsoft.com/en-ie/azure/governance/policy/concepts/rego-for-aks)
   108  
   109  * `disk_encryption_set_id` - (Optional) The ID of the Disk Encryption Set which should be used for the Nodes and Volumes. More information [can be found in the documentation](https://docs.microsoft.com/azure/aks/azure-disk-customer-managed-keys).
   110  
   111  * `http_application_routing_enabled` - (Optional) Should HTTP Application Routing be enabled?
   112  
   113  -> **Note:** At this time HTTP Application Routing is not supported in Azure China or Azure US Government.
   114  
   115  * `http_proxy_config` - (Optional) A `http_proxy_config` block as defined below.
   116  
   117  -> **Note:** This requires that the Preview Feature `Microsoft.ContainerService/HTTPProxyConfigPreview` is enabled and the Resource Provider is re-registered, see [the documentation](https://docs.microsoft.com/azure/aks/http-proxy) for more information.
   118  
   119  * `identity` - (Optional) An `identity` block as defined below. One of either `identity` or `service_principal` must be specified.
   120  
   121  !> **Note:** A migration scenario from `service_principal` to `identity` is supported. When upgrading `service_principal` to `identity`, your cluster's control plane and addon pods will switch to use managed identity, but the kubelets will keep using your configured `service_principal` until you upgrade your Node Pool.
   122  
   123  * `ingress_application_gateway` - (Optional) A `ingress_application_gateway` block as defined below.
   124  
   125  * `key_vault_secrets_provider` - (Optional) A `key_vault_secrets_provider` block as defined below. For more details, please visit [Azure Keyvault Secrets Provider for AKS](https://docs.microsoft.com/azure/aks/csi-secrets-store-driver).
   126  
   127  * `kubelet_identity` - A `kubelet_identity` block as defined below. Changing this forces a new resource to be created.
   128  
   129  * `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).
   130  
   131  -> **Note:** Upgrading your cluster may take up to 10 minutes per node.
   132  
   133  * `linux_profile` - (Optional) A `linux_profile` block as defined below.
   134  
   135  * `local_account_disabled` - (Optional) - If `true` local accounts will be disabled. Defaults to `false`. See [the documentation](https://docs.microsoft.com/azure/aks/managed-aad#disable-local-accounts) for more information.
   136  
   137  -> **Note:** If `local_account_disabled` is set to `true`, it is required to enable Kubernetes RBAC and AKS-managed Azure AD integration. See [the documentation](https://docs.microsoft.com/azure/aks/managed-aad#azure-ad-authentication-overview) for more information.
   138  
   139  * `maintenance_window` - (Optional) A `maintenance_window` block as defined below.
   140  
   141  * `microsoft_defender` - (Optional) A `microsoft_defender` block as defined below.
   142  
   143  -> **Note:** This requires that the Preview Feature `Microsoft.ContainerService/AKS-AzureDefender` is enabled, see [the documentation](https://docs.microsoft.com/azure/defender-for-cloud/defender-for-containers-enable?tabs=aks-deploy-portal%2Ck8s-deploy-asc%2Ck8s-verify-asc%2Ck8s-remove-arc%2Caks-removeprofile-api&pivots=defender-for-container-aks) for more information.
   144  
   145  * `network_profile` - (Optional) A `network_profile` block as defined below.
   146  
   147  -> **Note:** If `network_profile` is not defined, `kubenet` profile will be used by default.
   148  
   149  * `node_resource_group` - (Optional) The name of the Resource Group where the Kubernetes Nodes should exist. Changing this forces a new resource to be created.
   150  
   151  -> **Note:** Azure requires that a new, non-existent Resource Group is used, as otherwise the provisioning of the Kubernetes Service will fail.
   152  
   153  * `oidc_issuer_enabled` - (Required) Enable or Disable the [OIDC issuer URL](https://docs.microsoft.com/azure/aks/cluster-configuration#oidc-issuer-preview)
   154  
   155  -> **Note:** This requires that the Preview Feature `Microsoft.ContainerService/EnableOIDCIssuerPreview` is enabled and the Resource Provider is re-registered, see [the documentation](https://docs.microsoft.com/azure/aks/cluster-configuration#oidc-issuer-preview) for more information.
   156  
   157  * `oms_agent` - (Optional) A `oms_agent` block as defined below.
   158  
   159  * `open_service_mesh_enabled` - (Optional) Is Open Service Mesh enabled? For more details, please visit [Open Service Mesh for AKS](https://docs.microsoft.com/azure/aks/open-service-mesh-about).
   160  
   161  * `private_cluster_enabled` - (Optional) Should this Kubernetes Cluster have its API server only exposed on internal IP addresses? This provides a Private IP Address for the Kubernetes API on the Virtual Network where the Kubernetes Cluster is located. Defaults to `false`. Changing this forces a new resource to be created.
   162  
   163  * `private_dns_zone_id` - (Optional) Either the ID of Private DNS Zone which should be delegated to this Cluster, `System` to have AKS manage this or `None`. In case of `None` you will need to bring your own DNS server and set up resolving, otherwise cluster will have issues after provisioning. Changing this forces a new resource to be created.
   164  
   165  * `private_cluster_public_fqdn_enabled` - (Optional) Specifies whether a Public FQDN for this Private Cluster should be added. Defaults to `false`.
   166  
   167  -> **Note:** This requires that the Preview Feature `Microsoft.ContainerService/EnablePrivateClusterPublicFQDN` is enabled and the Resource Provider is re-registered, see [the documentation](https://docs.microsoft.com/azure/aks/private-clusters#create-a-private-aks-cluster-with-a-public-dns-address) for more information.
   168  
   169  -> **Note:** If you use BYO DNS Zone, AKS cluster should either use a User Assigned Identity or a service principal (which is deprecated) with the `Private DNS Zone Contributor` role and access to this Private DNS Zone. If `UserAssigned` identity is used - to prevent improper resource order destruction - cluster should depend on the role assignment, like in this example:
   170  
   171  ```
   172  resource "azurerm_resource_group" "example" {
   173    name     = "example"
   174    location = "West Europe"
   175  }
   176  
   177  resource "azurerm_private_dns_zone" "example" {
   178    name                = "privatelink.eastus2.azmk8s.io"
   179    resource_group_name = azurerm_resource_group.example.name
   180  }
   181  
   182  resource "azurerm_user_assigned_identity" "example" {
   183    name                = "aks-example-identity"
   184    resource_group_name = azurerm_resource_group.example.name
   185    location            = azurerm_resource_group.example.location
   186  }
   187  
   188  resource "azurerm_role_assignment" "example" {
   189    scope                = azurerm_private_dns_zone.example.id
   190    role_definition_name = "Private DNS Zone Contributor"
   191    principal_id         = azurerm_user_assigned_identity.example.principal_id
   192  }
   193  
   194  resource "azurerm_kubernetes_cluster" "example" {
   195    name                    = "aksexamplewithprivatednszone1"
   196    location                = azurerm_resource_group.example.location
   197    resource_group_name     = azurerm_resource_group.example.name
   198    dns_prefix              = "aksexamplednsprefix1"
   199    private_cluster_enabled = true
   200    private_dns_zone_id     = azurerm_private_dns_zone.example.id
   201  
   202    ... rest of configuration omitted for brevity
   203  
   204    depends_on = [
   205      azurerm_role_assignment.example,
   206    ]
   207  }
   208  
   209  ```
   210  
   211  `public_network_access_enabled` - (Optional) Whether public network access is allowed for this Kubernetes Cluster. Defaults to `true`. Changing this forces a new resource to be created.
   212  
   213  -> **Note:** When `public_network_access_enabled` is set to `true`, `0.0.0.0/32` must be added to `api_server_authorized_ip_ranges`.
   214  
   215  * `role_based_access_control_enabled` (Optional) - Whether Role Based Access Control for the Kubernetes Cluster should be enabled. Defaults to `true`. Changing this forces a new resource to be created.
   216  
   217  * `run_command_enabled` - (Optional) Whether to enable run command for the cluster or not. Defaults to `true`.
   218  
   219  * `service_principal` - (Optional) A `service_principal` block as documented below. One of either `identity` or `service_principal` must be specified.
   220  
   221  !> **Note:** A migration scenario from `service_principal` to `identity` is supported. When upgrading `service_principal` to `identity`, your cluster's control plane and addon pods will switch to use managed identity, but the kubelets will keep using your configured `service_principal` until you upgrade your Node Pool.
   222  
   223  * `sku_tier` - (Optional) The SKU Tier that should be used for this Kubernetes Cluster. Possible values are `Free` and `Paid` (which includes the Uptime SLA). Defaults to `Free`.
   224  
   225  * `tags` - (Optional) A mapping of tags to assign to the resource.
   226  
   227  * `windows_profile` - (Optional) A `windows_profile` block as defined below.
   228  
   229  ---
   230  
   231  A `aci_connector_linux` block supports the following:
   232  
   233  * `subnet_name` - (Required) The subnet name for the virtual nodes to run.
   234  
   235  -> **Note:** At this time ACI Connectors are not supported in Azure China.
   236  
   237  -> **Note:** AKS will add a delegation to the subnet named here. To prevent further runs from failing you should make sure that the subnet you create for virtual nodes has a delegation, like so.
   238  
   239  ```
   240  resource "azurerm_subnet" "virtual" {
   241  
   242    #...
   243  
   244    delegation {
   245      name = "aciDelegation"
   246      service_delegation {
   247        name    = "Microsoft.ContainerInstance/containerGroups"
   248        actions = ["Microsoft.Network/virtualNetworks/subnets/action"]
   249      }
   250    }
   251  }
   252  ```
   253  
   254  ---
   255  
   256  An `auto_scaler_profile` block supports the following:
   257  
   258  * `balance_similar_node_groups` - Detect similar node groups and balance the number of nodes between them. Defaults to `false`.
   259  
   260  * `expander` - Expander to use. Possible values are `least-waste`, `priority`, `most-pods` and `random`. Defaults to `random`.
   261  
   262  * `max_graceful_termination_sec` - Maximum number of seconds the cluster autoscaler waits for pod termination when trying to scale down a node. Defaults to `600`.
   263  
   264  * `max_node_provisioning_time` - Maximum time the autoscaler waits for a node to be provisioned. Defaults to `15m`.
   265  
   266  * `max_unready_nodes` - Maximum Number of allowed unready nodes. Defaults to `3`.
   267  
   268  * `max_unready_percentage` - Maximum percentage of unready nodes the cluster autoscaler will stop if the percentage is exceeded. Defaults to `45`.
   269  
   270  * `new_pod_scale_up_delay` - For scenarios like burst/batch scale where you don't want CA to act before the kubernetes scheduler could schedule all the pods, you can tell CA to ignore unscheduled pods before they're a certain age. Defaults to `10s`.
   271  
   272  * `scale_down_delay_after_add` - How long after the scale up of AKS nodes the scale down evaluation resumes. Defaults to `10m`.
   273  
   274  * `scale_down_delay_after_delete` - How long after node deletion that scale down evaluation resumes. Defaults to the value used for `scan_interval`.
   275  
   276  * `scale_down_delay_after_failure` - How long after scale down failure that scale down evaluation resumes. Defaults to `3m`.
   277  
   278  * `scan_interval` - How often the AKS Cluster should be re-evaluated for scale up/down. Defaults to `10s`.
   279  
   280  * `scale_down_unneeded` - How long a node should be unneeded before it is eligible for scale down. Defaults to `10m`.
   281  
   282  * `scale_down_unready` - How long an unready node should be unneeded before it is eligible for scale down. Defaults to `20m`.
   283  
   284  * `scale_down_utilization_threshold` - Node utilization level, defined as sum of requested resources divided by capacity, below which a node can be considered for scale down. Defaults to `0.5`.
   285  
   286  * `empty_bulk_delete_max` - Maximum number of empty nodes that can be deleted at the same time. Defaults to `10`.
   287  
   288  * `skip_nodes_with_local_storage` - If `true` cluster autoscaler will never delete nodes with pods with local storage, for example, EmptyDir or HostPath. Defaults to `true`.
   289  
   290  * `skip_nodes_with_system_pods` - If `true` cluster autoscaler will never delete nodes with pods from kube-system (except for DaemonSet or mirror pods). Defaults to `true`.
   291  
   292  ---
   293  
   294  An `azure_active_directory_role_based_access_control` block supports the following:
   295  
   296  * `managed` - (Optional) Is the Azure Active Directory integration Managed, meaning that Azure will create/manage the Service Principal used for integration.
   297  
   298  * `tenant_id` - (Optional) The Tenant ID used for Azure Active Directory Application. If this isn't specified the Tenant ID of the current Subscription is used.
   299  
   300  When `managed` is set to `true` the following properties can be specified:
   301  
   302  * `admin_group_object_ids` - (Optional) A list of Object IDs of Azure Active Directory Groups which should have Admin Role on the Cluster.
   303  
   304  * `azure_rbac_enabled` - (Optional) Is Role Based Access Control based on Azure AD enabled?
   305  
   306  When `managed` is set to `false` the following properties can be specified:
   307  
   308  * `client_app_id` - (Required) The Client ID of an Azure Active Directory Application.
   309  
   310  * `server_app_id` - (Required) The Server ID of an Azure Active Directory Application.
   311  
   312  * `server_app_secret` - (Required) The Server Secret of an Azure Active Directory Application.
   313  
   314  ---
   315  
   316  A `default_node_pool` block supports the following:
   317  
   318  * `name` - (Required) The name which should be used for the default Kubernetes Node Pool. Changing this forces a new resource to be created.
   319  
   320  * `vm_size` - (Required) The size of the Virtual Machine, such as `Standard_DS2_v2`. Changing this forces a new resource to be created.
   321  
   322  * `enable_auto_scaling` - (Optional) Should [the Kubernetes Auto Scaler](https://docs.microsoft.com/azure/aks/cluster-autoscaler) be enabled for this Node Pool? Defaults to `false`.
   323  
   324  -> **Note:** This requires that the `type` is set to `VirtualMachineScaleSets`.
   325  
   326  -> **Note:** If you're using AutoScaling, you may wish to use [Terraform's `ignore_changes` functionality](https://www.terraform.io/docs/language/meta-arguments/lifecycle.html#ignore_changes) to ignore changes to the `node_count` field.
   327  
   328  * `enable_host_encryption` - (Optional) Should the nodes in the Default Node Pool have host encryption enabled? Defaults to `false`.
   329  
   330  * `enable_node_public_ip` - (Optional) Should nodes in this Node Pool have a Public IP Address? Defaults to `false`. Changing this forces a new resource to be created.
   331  
   332  * `kubelet_config` - (Optional) A `kubelet_config` block as defined below.
   333  
   334  * `linux_os_config` - (Optional) A `linux_os_config` block as defined below.
   335  
   336  * `fips_enabled` - (Optional) Should the nodes in this Node Pool have Federal Information Processing Standard enabled? Changing this forces a new resource to be created.
   337  
   338  ~> **Note:** FIPS support is in Public Preview - more information and details on how to opt into the Preview can be found in [this article](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#add-a-fips-enabled-node-pool-preview).
   339  
   340  * `kubelet_disk_type` - (Optional) The type of disk used by kubelet. Possible values are `OS` and `Temporary`.
   341  
   342  * `max_pods` - (Optional) The maximum number of pods that can run on each agent. Changing this forces a new resource to be created.
   343  
   344  * `node_public_ip_prefix_id` - (Optional) Resource ID for the Public IP Addresses Prefix for the nodes in this Node Pool. `enable_node_public_ip` should be `true`. Changing this forces a new resource to be created.
   345  
   346  * `node_labels` - (Optional) A map of Kubernetes labels which should be applied to nodes in the Default Node Pool.
   347  
   348  * `only_critical_addons_enabled` - (Optional) Enabling this option will taint default node pool with `CriticalAddonsOnly=true:NoSchedule` taint. Changing this forces a new resource to be created.
   349  
   350  * `orchestrator_version` - (Optional) Version of Kubernetes used for the Agents. If not specified, the default node pool will be created with the version specified by `kubernetes_version`. If both are unspecified, the latest recommended version will be used at provisioning time (but won't auto-upgrade)
   351  
   352  -> **Note:** This version must be supported by the Kubernetes Cluster - as such the version of Kubernetes used on the Cluster/Control Plane may need to be upgraded first.
   353  
   354  * `os_disk_size_gb` - (Optional) The size of the OS Disk which should be used for each agent in the Node Pool. Changing this forces a new resource to be created.
   355  
   356  * `os_disk_type` - (Optional) The type of disk which should be used for the Operating System. Possible values are `Ephemeral` and `Managed`. Defaults to `Managed`. Changing this forces a new resource to be created.
   357  
   358  * `os_sku` - (Optional) OsSKU to be used to specify Linux OSType. Not applicable to Windows OSType. Possible values include: `Ubuntu`, `CBLMariner`. Defaults to `Ubuntu`. Changing this forces a new resource to be created.
   359  
   360  * `pod_subnet_id` - (Optional) The ID of the Subnet where the pods in the default Node Pool should exist. Changing this forces a new resource to be created.
   361  
   362  -> **Note:** This requires that the Preview Feature `Microsoft.ContainerService/PodSubnetPreview` is enabled and the Resource Provider is re-registered, see [the documentation](https://docs.microsoft.com/azure/aks/configure-azure-cni#register-the-podsubnetpreview-preview-feature) for more information.
   363  
   364  * `type` - (Optional) The type of Node Pool which should be created. Possible values are `AvailabilitySet` and `VirtualMachineScaleSets`. Defaults to `VirtualMachineScaleSets`.
   365  
   366  * `tags` - (Optional) A mapping of tags to assign to the Node Pool.
   367  
   368  ~> At this time there's a bug in the AKS API where Tags for a Node Pool are not stored in the correct case - you [may wish to use Terraform's `ignore_changes` functionality to ignore changes to the casing](https://www.terraform.io/docs/configuration/resources.html#ignore_changes) until this is fixed in the AKS API.
   369  
   370  * `ultra_ssd_enabled` - (Optional) Used to specify whether the UltraSSD is enabled in the Default Node Pool. Defaults to `false`. See [the documentation](https://docs.microsoft.com/azure/aks/use-ultra-disks) for more information.
   371  
   372  * `upgrade_settings` - (Optional) A `upgrade_settings` block as documented below.
   373  
   374  * `vnet_subnet_id` - (Optional) The ID of a Subnet where the Kubernetes Node Pool should exist. Changing this forces a new resource to be created.
   375  
   376  ~> **Note:** A Route Table must be configured on this Subnet.
   377  
   378  If `enable_auto_scaling` is set to `true`, then the following fields can also be configured:
   379  
   380  * `max_count` - (Required) The maximum number of nodes which should exist in this Node Pool. If specified this must be between `1` and `1000`.
   381  
   382  * `min_count` - (Required) The minimum number of nodes which should exist in this Node Pool. If specified this must be between `1` and `1000`.
   383  
   384  * `node_count` - (Optional) The initial number of nodes which should exist in this Node Pool. If specified this must be between `1` and `1000` and between `min_count` and `max_count`.
   385  
   386  -> **Note:** If specified you may wish to use [Terraform's `ignore_changes` functionality](https://www.terraform.io/docs/configuration/resources.html#ignore_changes) to ignore changes to this field.
   387  
   388  If `enable_auto_scaling` is set to `false`, then the following fields can also be configured:
   389  
   390  * `node_count` - (Required) The number of nodes which should exist in this Node Pool. If specified this must be between `1` and `1000`.
   391  
   392  -> **Note:** If `enable_auto_scaling` is set to `false` both `min_count` and `max_count` fields need to be set to `null` or omitted from the configuration.
   393  
   394  * `zones` - (Optional) Specifies a list of Availability Zones in which this Kubernetes Cluster should be located. Changing this forces a new Kubernetes Cluster to be created.
   395  
   396  -> **Note:** This requires that the `type` is set to `VirtualMachineScaleSets` and that `load_balancer_sku` is set to `standard`.
   397  
   398  ---
   399  
   400  An `identity` block supports the following:
   401  
   402  * `type` - (Required) Specifies the type of Managed Service Identity that should be configured on this Kubernetes Cluster. Possible values are `SystemAssigned`, `UserAssigned`, `SystemAssigned, UserAssigned` (to enable both).
   403  
   404  * `identity_ids` - (Optional) Specifies a list of User Assigned Managed Identity IDs to be assigned to this Kubernetes Cluster.
   405  
   406  ~> **NOTE:** This is required when `type` is set to `UserAssigned` or `SystemAssigned, UserAssigned`.
   407  
   408  ---
   409  
   410  A `key_vault_secrets_provider` block supports the following:
   411  
   412  * `secret_rotation_enabled` - (Required) Is secret rotation enabled?
   413  
   414  * `secret_rotation_interval` - (Required) The interval to poll for secret rotation. This attribute is only set when `secret_rotation` is true and defaults to `2m`.
   415  
   416  ---
   417  
   418  A `kubelet_config` block supports the following:
   419  
   420  * `allowed_unsafe_sysctls` - (Optional) Specifies the allow list of unsafe sysctls command or patterns (ending in `*`). Changing this forces a new resource to be created.
   421  
   422  * `container_log_max_line` - (Optional) Specifies the maximum number of container log files that can be present for a container. must be at least 2. Changing this forces a new resource to be created.
   423  
   424  * `container_log_max_size_mb` - (Optional) Specifies the maximum size (e.g. 10MB) of container log file before it is rotated. Changing this forces a new resource to be created.
   425  
   426  * `cpu_cfs_quota_enabled` - (Optional) Is CPU CFS quota enforcement for containers enabled? Changing this forces a new resource to be created.
   427  
   428  * `cpu_cfs_quota_period` - (Optional) Specifies the CPU CFS quota period value. Changing this forces a new resource to be created.
   429  
   430  * `cpu_manager_policy` - (Optional) Specifies the CPU Manager policy to use. Possible values are `none` and `static`, Changing this forces a new resource to be created.
   431  
   432  * `image_gc_high_threshold` - (Optional) Specifies the percent of disk usage above which image garbage collection is always run. Must be between `0` and `100`. Changing this forces a new resource to be created.
   433  
   434  * `image_gc_low_threshold` - (Optional) Specifies the percent of disk usage lower than which image garbage collection is never run. Must be between `0` and `100`. Changing this forces a new resource to be created.
   435  
   436  * `pod_max_pid` - (Optional) Specifies the maximum number of processes per pod. Changing this forces a new resource to be created.
   437  
   438  * `topology_manager_policy` - (Optional) Specifies the Topology Manager policy to use. Possible values are `none`, `best-effort`, `restricted` or `single-numa-node`. Changing this forces a new resource to be created.
   439  
   440  ---
   441  
   442  The `kubelet_identity` block supports the following:
   443  
   444  * `client_id` - (Required) The Client ID of the user-defined Managed Identity to be assigned to the Kubelets. If not specified a Managed Identity is created automatically.
   445  
   446  * `object_id` - (Required) The Object ID of the user-defined Managed Identity assigned to the Kubelets.If not specified a Managed Identity is created automatically.
   447  
   448  * `user_assigned_identity_id` - (Required) The ID of the User Assigned Identity assigned to the Kubelets. If not specified a Managed Identity is created automatically.
   449  
   450  ---
   451  
   452  A `linux_os_config` block supports the following:
   453  
   454  * `swap_file_size_mb` - (Optional) Specifies the size of swap file on each node in MB. Changing this forces a new resource to be created.
   455  
   456  * `sysctl_config` - (Optional) A `sysctl_config` block as defined below. Changing this forces a new resource to be created.
   457  
   458  * `transparent_huge_page_defrag` - (Optional) specifies the defrag configuration for Transparent Huge Page. Possible values are `always`, `defer`, `defer+madvise`, `madvise` and `never`. Changing this forces a new resource to be created.
   459  
   460  * `transparent_huge_page_enabled` - (Optional) Specifies the Transparent Huge Page enabled configuration. Possible values are `always`, `madvise` and `never`. Changing this forces a new resource to be created.
   461  
   462  ---
   463  
   464  A `linux_profile` block supports the following:
   465  
   466  * `admin_username` - (Required) The Admin Username for the Cluster. Changing this forces a new resource to be created.
   467  
   468  * `ssh_key` - (Required) An `ssh_key` block. Only one is currently allowed. Changing this forces a new resource to be created.
   469  
   470  ---
   471  
   472  A `maintenance_window` block supports the following:
   473  
   474  * `allowed` - (Optional) One or more `allowed` block as defined below.
   475  
   476  * `not_allowed` - (Optional) One or more `not_allowed` block as defined below.
   477  
   478  ---
   479  
   480  An `allowed` block exports the following:
   481  
   482  * `day` - (Required) A day in a week. Possible values are `Sunday`, `Monday`, `Tuesday`, `Wednesday`, `Thursday`, `Friday` and `Saturday`.
   483  
   484  * `hours` - (Required) An array of hour slots in a day. For example, specifying `1` will allow maintenance from 1:00am to 2:00am. Specifying `1`, `2` will allow maintenance from 1:00am to 3:00m. Possible values are between `0` and `23`.
   485  
   486  ---
   487  
   488  A `not_allowed` block exports the following:
   489  
   490  * `end` - (Required) The end of a time span, formatted as an RFC3339 string.
   491  
   492  * `start` - (Required) The start of a time span, formatted as an RFC3339 string.
   493  
   494  ---
   495  
   496  A `microsoft_defender` block supports the following:
   497  
   498  * `log_analytics_workspace_id` - (Required) Specifies the ID of the Log Analytics Workspace where the audit logs collected by Microsoft Defender should be sent to.
   499  
   500  ---
   501  
   502  A `network_profile` block supports the following:
   503  
   504  * `network_plugin` - (Required) Network plugin to use for networking. Currently supported values are `azure`, `kubenet` and `none`. Changing this forces a new resource to be created.
   505  
   506  -> **Note:** When `network_plugin` is set to `azure` - the `vnet_subnet_id` field in the `default_node_pool` block must be set and `pod_cidr` must not be set.
   507  
   508  * `network_mode` - (Optional) Network mode to be used with Azure CNI. Possible values are `bridge` and `transparent`. Changing this forces a new resource to be created.
   509  
   510  ~> **Note:** `network_mode` can only be set to `bridge` for existing Kubernetes Clusters and cannot be used to provision new Clusters - this will be removed by Azure in the future.
   511  
   512  ~> **Note:** This property can only be set when `network_plugin` is set to `azure`.
   513  
   514  * `network_policy` - (Optional) Sets up network policy to be used with Azure CNI. [Network policy allows us to control the traffic flow between pods](https://docs.microsoft.com/azure/aks/use-network-policies). Currently supported values are `calico` and `azure`. Changing this forces a new resource to be created.
   515  
   516  ~> **Note:** When `network_policy` is set to `azure`, the `network_plugin` field can only be set to `azure`.
   517  
   518  * `dns_service_ip` - (Optional) IP address within the Kubernetes service address range that will be used by cluster service discovery (kube-dns). Changing this forces a new resource to be created.
   519  
   520  * `docker_bridge_cidr` - (Optional) IP address (in CIDR notation) used as the Docker bridge IP address on nodes. Changing this forces a new resource to be created.
   521  
   522  * `outbound_type` - (Optional) The outbound (egress) routing method which should be used for this Kubernetes Cluster. Possible values are `loadBalancer`, `userDefinedRouting`, `managedNATGateway` and `userAssignedNATGateway`. Defaults to `loadBalancer`.
   523  
   524  ~> **Note:** Outbound NAT Gateway is in Public Preview - more information and details on how to opt into the Preview [can be found in this article](https://docs.microsoft.com/azure/aks/nat-gateway#register-the-aks-natgatewaypreview-feature-flag).
   525  
   526  * `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.
   527  
   528  * `service_cidr` - (Optional) The Network Range used by the Kubernetes service. Changing this forces a new resource to be created.
   529  
   530  ~> **Note:** This range should not be used by any network element on or connected to this VNet. Service address CIDR must be smaller than /12. `docker_bridge_cidr`, `dns_service_ip` and `service_cidr` should all be empty or all should be set.
   531  
   532  Examples of how to use [AKS with Advanced Networking](https://docs.microsoft.com/azure/aks/networking-overview#advanced-networking) can be [found in the `./examples/kubernetes/` directory in the GitHub repository](https://github.com/hashicorp/terraform-provider-azurerm/tree/main/examples/kubernetes).
   533  
   534  * `ip_versions` - (Optional) Specifies a list of IP versions the Kubernetes Cluster will use to assign IP addresses to its nodes and pods. Possible values are `IPv4` and/or `IPv6`. `IPv4` must always be specified. Changing this forces a new resource to be created.
   535  
   536  ->**Note:** To configure dual-stack networking `ip_versions` should be set to `["IPv4", "IPv6"]`
   537  
   538  ->**Note:** Dual-stack networking requires that the Preview Feature `Microsoft.ContainerService/AKS-EnableDualStack` is enabled and the Resource Provider is re-registered, see [the documentation](https://docs.microsoft.com/azure/aks/configure-kubenet-dual-stack?tabs=azure-cli%2Ckubectl#register-the-aks-enabledualstack-preview-feature) for more information.
   539  
   540  * `load_balancer_sku` - (Optional) Specifies the SKU of the Load Balancer used for this Kubernetes Cluster. Possible values are `basic` and `standard`. Defaults to `standard`.
   541  
   542  * `load_balancer_profile` - (Optional) A `load_balancer_profile` block. This can only be specified when `load_balancer_sku` is set to `standard`.
   543  
   544  * `nat_gateway_profile` - (Optional) A `nat_gateway_profile` block. This can only be specified when `load_balancer_sku` is set to `standard` and `outbound_type` is set to `managedNATGateway` or `userAssignedNATGateway`.
   545  
   546  ---
   547  
   548  A `load_balancer_profile` block supports the following:
   549  
   550  ~> **Note:** The fields `managed_outbound_ip_count`, `outbound_ip_address_ids` and `outbound_ip_prefix_ids` are mutually exclusive. Note that when specifying `outbound_ip_address_ids` ([azurerm_public_ip](/docs/providers/azurerm/r/public_ip.html)) the SKU must be `standard`.
   551  
   552  * `idle_timeout_in_minutes` - (Optional) Desired outbound flow idle timeout in minutes for the cluster load balancer. Must be between `4` and `120` inclusive. Defaults to `30`.
   553  
   554  * `managed_outbound_ip_count` - (Optional) Count of desired managed outbound IPs for the cluster load balancer. Must be between `1` and `100` inclusive.
   555  
   556  * `outbound_ip_address_ids` - (Optional) The ID of the Public IP Addresses which should be used for outbound communication for the cluster load balancer.
   557  
   558  -> **Note:** Set `outbound_ip_address_ids` to an empty slice `[]` in order to unlink it from the cluster. Unlinking a `outbound_ip_address_ids` will revert the load balancing for the cluster back to a managed one.
   559  
   560  * `outbound_ip_prefix_ids` - (Optional) The ID of the outbound Public IP Address Prefixes which should be used for the cluster load balancer.
   561  
   562  -> **Note:** Set `outbound_ip_prefix_ids` to an empty slice `[]` in order to unlink it from the cluster. Unlinking a `outbound_ip_prefix_ids` will revert the load balancing for the cluster back to a managed one.
   563  
   564  * `outbound_ports_allocated` - (Optional) Number of desired SNAT port for each VM in the clusters load balancer. Must be between `0` and `64000` inclusive. Defaults to `0`.
   565  
   566  ---
   567  
   568  A `nat_gateway_profile` block supports the following:
   569  
   570  * `idle_timeout_in_minutes` - (Optional) Desired outbound flow idle timeout in minutes for the cluster load balancer. Must be between `4` and `120` inclusive. Defaults to `4`.
   571  
   572  * `managed_outbound_ip_count` - (Optional) Count of desired managed outbound IPs for the cluster load balancer. Must be between `1` and `100` inclusive.
   573  
   574  ---
   575  
   576  An `oms_agent` block supports the following:
   577  
   578  * `log_analytics_workspace_id` - (Required) The ID of the Log Analytics Workspace which the OMS Agent should send data to.
   579  
   580  ---
   581  
   582  An `ingress_application_gateway` block supports the following:
   583  
   584  * `gateway_id` - (Optional) The ID of the Application Gateway to integrate with the ingress controller of this Kubernetes Cluster. See [this](https://docs.microsoft.com/azure/application-gateway/tutorial-ingress-controller-add-on-existing) page for further details.
   585  
   586  * `gateway_name` - (Optional) The name of the Application Gateway to be used or created in the Nodepool Resource Group, which in turn will be integrated with the ingress controller of this Kubernetes Cluster. See [this](https://docs.microsoft.com/azure/application-gateway/tutorial-ingress-controller-add-on-new) page for further details.
   587  
   588  * `subnet_cidr` - (Optional) The subnet CIDR to be used to create an Application Gateway, which in turn will be integrated with the ingress controller of this Kubernetes Cluster. See [this](https://docs.microsoft.com/azure/application-gateway/tutorial-ingress-controller-add-on-new) page for further details.
   589  
   590  * `subnet_id` - (Optional) The ID of the subnet on which to create an Application Gateway, which in turn will be integrated with the ingress controller of this Kubernetes Cluster. See [this](https://docs.microsoft.com/azure/application-gateway/tutorial-ingress-controller-add-on-new) page for further details.
   591  
   592  -> **Note:** If specifying `ingress_application_gateway` in conjunction with `only_critical_addons_enabled`, the AGIC pod will fail to start. A separate `azurerm_kubernetes_cluster_node_pool` is required to run the AGIC pod successfully. This is because AGIC is classed as a "non-critical addon".
   593  
   594  ---
   595  
   596  A `service_principal` block supports the following:
   597  
   598  * `client_id` - (Required) The Client ID for the Service Principal.
   599  
   600  * `client_secret` - (Required) The Client Secret for the Service Principal.
   601  
   602  ---
   603  
   604  A `ssh_key` block supports the following:
   605  
   606  * `key_data` - (Required) The Public SSH Key used to access the cluster. Changing this forces a new resource to be created.
   607  
   608  ---
   609  
   610  A `sysctl_config` block supports the following:
   611  
   612  ~> For more information, please refer to [Linux Kernel Doc](https://www.kernel.org/doc/html/latest/admin-guide/sysctl/index.html).
   613  
   614  * `fs_aio_max_nr` - (Optional) The sysctl setting fs.aio-max-nr. Must be between `65536` and `6553500`. Changing this forces a new resource to be created.
   615  
   616  * `fs_file_max` - (Optional) The sysctl setting fs.file-max. Must be between `8192` and `12000500`. Changing this forces a new resource to be created.
   617  
   618  * `fs_inotify_max_user_watches` - (Optional) The sysctl setting fs.inotify.max_user_watches. Must be between `781250` and `2097152`. Changing this forces a new resource to be created.
   619  
   620  * `fs_nr_open` - (Optional) The sysctl setting fs.nr_open. Must be between `8192` and `20000500`. Changing this forces a new resource to be created.
   621  
   622  * `kernel_threads_max` - (Optional) The sysctl setting kernel.threads-max. Must be between `20` and `513785`. Changing this forces a new resource to be created.
   623  
   624  * `net_core_netdev_max_backlog` - (Optional) The sysctl setting net.core.netdev_max_backlog. Must be between `1000` and `3240000`. Changing this forces a new resource to be created.
   625  
   626  * `net_core_optmem_max` - (Optional) The sysctl setting net.core.optmem_max. Must be between `20480` and `4194304`. Changing this forces a new resource to be created.
   627  
   628  * `net_core_rmem_default` - (Optional) The sysctl setting net.core.rmem_default. Must be between `212992` and `134217728`. Changing this forces a new resource to be created.
   629  
   630  * `net_core_rmem_max` - (Optional) The sysctl setting net.core.rmem_max. Must be between `212992` and `134217728`. Changing this forces a new resource to be created.
   631  
   632  * `net_core_somaxconn` - (Optional) The sysctl setting net.core.somaxconn. Must be between `4096` and `3240000`. Changing this forces a new resource to be created.
   633  
   634  * `net_core_wmem_default` - (Optional) The sysctl setting net.core.wmem_default. Must be between `212992` and `134217728`. Changing this forces a new resource to be created.
   635  
   636  * `net_core_wmem_max` - (Optional) The sysctl setting net.core.wmem_max. Must be between `212992` and `134217728`. Changing this forces a new resource to be created.
   637  
   638  * `net_ipv4_ip_local_port_range_max` - (Optional) The sysctl setting net.ipv4.ip_local_port_range max value. Must be between `1024` and `60999`. Changing this forces a new resource to be created.
   639  
   640  * `net_ipv4_ip_local_port_range_min` - (Optional) The sysctl setting net.ipv4.ip_local_port_range min value. Must be between `1024` and `60999`. Changing this forces a new resource to be created.
   641  
   642  * `net_ipv4_neigh_default_gc_thresh1` - (Optional) The sysctl setting net.ipv4.neigh.default.gc_thresh1. Must be between `128` and `80000`. Changing this forces a new resource to be created.
   643  
   644  * `net_ipv4_neigh_default_gc_thresh2` - (Optional) The sysctl setting net.ipv4.neigh.default.gc_thresh2. Must be between `512` and `90000`. Changing this forces a new resource to be created.
   645  
   646  * `net_ipv4_neigh_default_gc_thresh3` - (Optional) The sysctl setting net.ipv4.neigh.default.gc_thresh3. Must be between `1024` and `100000`. Changing this forces a new resource to be created.
   647  
   648  * `net_ipv4_tcp_fin_timeout` - (Optional) The sysctl setting net.ipv4.tcp_fin_timeout. Must be between `5` and `120`. Changing this forces a new resource to be created.
   649  
   650  * `net_ipv4_tcp_keepalive_intvl` - (Optional) The sysctl setting net.ipv4.tcp_keepalive_intvl. Must be between `10` and `75`. Changing this forces a new resource to be created.
   651  
   652  * `net_ipv4_tcp_keepalive_probes` - (Optional) The sysctl setting net.ipv4.tcp_keepalive_probes. Must be between `1` and `15`. Changing this forces a new resource to be created.
   653  
   654  * `net_ipv4_tcp_keepalive_time` - (Optional) The sysctl setting net.ipv4.tcp_keepalive_time. Must be between `30` and `432000`. Changing this forces a new resource to be created.
   655  
   656  * `net_ipv4_tcp_max_syn_backlog` - (Optional) The sysctl setting net.ipv4.tcp_max_syn_backlog. Must be between `128` and `3240000`. Changing this forces a new resource to be created.
   657  
   658  * `net_ipv4_tcp_max_tw_buckets` - (Optional) The sysctl setting net.ipv4.tcp_max_tw_buckets. Must be between `8000` and `1440000`. Changing this forces a new resource to be created.
   659  
   660  * `net_ipv4_tcp_tw_reuse` - (Optional) The sysctl setting net.ipv4.tcp_tw_reuse. Changing this forces a new resource to be created.
   661  
   662  * `net_netfilter_nf_conntrack_buckets` - (Optional) The sysctl setting net.netfilter.nf_conntrack_buckets. Must be between `65536` and `147456`. Changing this forces a new resource to be created.
   663  
   664  * `net_netfilter_nf_conntrack_max` - (Optional) The sysctl setting net.netfilter.nf_conntrack_max. Must be between `131072` and `1048576`. Changing this forces a new resource to be created.
   665  
   666  * `vm_max_map_count` - (Optional) The sysctl setting vm.max_map_count. Must be between `65530` and `262144`. Changing this forces a new resource to be created.
   667  
   668  * `vm_swappiness` - (Optional) The sysctl setting vm.swappiness. Must be between `0` and `100`. Changing this forces a new resource to be created.
   669  
   670  * `vm_vfs_cache_pressure` - (Optional) The sysctl setting vm.vfs_cache_pressure. Must be between `0` and `100`. Changing this forces a new resource to be created.
   671  
   672  ---
   673  
   674  A `windows_profile` block supports the following:
   675  
   676  * `admin_username` - (Required) The Admin Username for Windows VMs.
   677  
   678  * `admin_password` - (Required) The Admin Password for Windows VMs. Length must be between 14 and 123 characters.
   679  
   680  * `license` - (Optional) Specifies the type of on-premise license which should be used for Node Pool Windows Virtual Machine. At this time the only possible value is `Windows_Server`.
   681  
   682  ---
   683  
   684  A `http_proxy_config` block supports the following:
   685  
   686  * `http_proxy` - (Optional) The proxy address to be used when communicating over HTTP.
   687  
   688  * `https_proxy` - (Optional) The proxy address to be used when communicating over HTTPS.
   689  
   690  * `no_proxy` - (Optional) The list of domains that will not use the proxy for communication.
   691  
   692  -> **Note:** If you specify the `default_node_pool.0.vnet_subnet_id`, be sure to include the Subnet CIDR in the `no_proxy` list.
   693  
   694  -> **Note:** You may wish to use [Terraform's `ignore_changes` functionality](https://www.terraform.io/docs/language/meta-arguments/lifecycle.html#ignore_changes) to ignore the changes to this field.
   695  
   696  * `trusted_ca` - (Optional) The base64 encoded alternative CA certificate content in PEM format.
   697  
   698  ---
   699  
   700  A `upgrade_settings` block supports the following:
   701  
   702  * `max_surge` - (Required) The maximum number or percentage of nodes which will be added to the Node Pool size during an upgrade.
   703  
   704  -> **Note:** If a percentage is provided, the number of surge nodes is calculated from the `node_count` value on the current cluster. Node surge can allow a cluster to have more nodes than `max_count` during an upgrade. Ensure that your cluster has enough [IP space](https://docs.microsoft.com/azure/aks/upgrade-cluster#customize-node-surge-upgrade) during an upgrade.
   705  
   706  ## Attributes Reference
   707  
   708  The following attributes are exported:
   709  
   710  * `id` - The Kubernetes Managed Cluster ID.
   711  
   712  * `fqdn` - The FQDN of the Azure Kubernetes Managed Cluster.
   713  
   714  * `private_fqdn` - The FQDN for the Kubernetes Cluster when private link has been enabled, which is only resolvable inside the Virtual Network used by the Kubernetes Cluster.
   715  
   716  * `portal_fqdn` - The FQDN for the Azure Portal resources when private link has been enabled, which is only resolvable inside the Virtual Network used by the Kubernetes Cluster.
   717  
   718  * `kube_admin_config` - A `kube_admin_config` block as defined below. This is only available when Role Based Access Control with Azure Active Directory is enabled and local accounts enabled.
   719  
   720  * `kube_admin_config_raw` - Raw Kubernetes config for the admin account to be used by [kubectl](https://kubernetes.io/docs/reference/kubectl/overview/) and other compatible tools. This is only available when Role Based Access Control with Azure Active Directory is enabled and local accounts enabled.
   721  
   722  * `kube_config` - A `kube_config` block as defined below.
   723  
   724  * `kube_config_raw` - Raw Kubernetes config to be used by [kubectl](https://kubernetes.io/docs/reference/kubectl/overview/) and other compatible tools.
   725  
   726  * `http_application_routing_zone_name` - The Zone Name of the HTTP Application Routing.
   727  
   728  * `oidc_issuer_url` - The OIDC issuer URL that is associated with the cluster.
   729  
   730  * `node_resource_group` - The auto-generated Resource Group which contains the resources for this Managed Kubernetes Cluster.
   731  
   732  ---
   733  
   734  A `load_balancer_profile` block exports the following:
   735  
   736  * `effective_outbound_ips` - The outcome (resource IDs) of the specified arguments.
   737  
   738  ---
   739  
   740  A `nat_gateway_profile` block exports the following:
   741  
   742  * `effective_outbound_ips` - The outcome (resource IDs) of the specified arguments.
   743  
   744  ---
   745  
   746  An `identity` block exports the following:
   747  
   748  * `principal_id` - The Principal ID associated with this Managed Service Identity.
   749  
   750  * `tenant_id` - The Tenant ID associated with this Managed Service Identity.
   751  
   752  ---
   753  
   754  The `kube_admin_config` and `kube_config` blocks export the following:
   755  
   756  * `client_key` - Base64 encoded private key used by clients to authenticate to the Kubernetes cluster.
   757  
   758  * `client_certificate` - Base64 encoded public certificate used by clients to authenticate to the Kubernetes cluster.
   759  
   760  * `cluster_ca_certificate` - Base64 encoded public CA certificate used as the root of trust for the Kubernetes cluster.
   761  
   762  * `host` - The Kubernetes cluster server host.
   763  
   764  * `username` - A username used to authenticate to the Kubernetes cluster.
   765  
   766  * `password` - A password or token used to authenticate to the Kubernetes cluster.
   767  
   768  -> **Note:** It's possible to use these credentials with [the Kubernetes Provider](/providers/hashicorp/kubernetes/latest/docs) like so:
   769  
   770  ```
   771  provider "kubernetes" {
   772    host                   = azurerm_kubernetes_cluster.main.kube_config.0.host
   773    username               = azurerm_kubernetes_cluster.main.kube_config.0.username
   774    password               = azurerm_kubernetes_cluster.main.kube_config.0.password
   775    client_certificate     = base64decode(azurerm_kubernetes_cluster.main.kube_config.0.client_certificate)
   776    client_key             = base64decode(azurerm_kubernetes_cluster.main.kube_config.0.client_key)
   777    cluster_ca_certificate = base64decode(azurerm_kubernetes_cluster.main.kube_config.0.cluster_ca_certificate)
   778  }
   779  ```
   780  
   781  ---
   782  
   783  The `ingress_application_gateway` block exports the following:
   784  
   785  * `effective_gateway_id` - The ID of the Application Gateway associated with the ingress controller deployed to this Kubernetes Cluster.
   786  
   787  * `ingress_application_gateway_identity` - An `ingress_application_gateway_identity` block is exported. The exported attributes are defined below.  
   788  
   789  ---
   790  
   791  The `ingress_application_gateway_identity` block exports the following:
   792  
   793  * `client_id` - The Client ID of the user-defined Managed Identity used by the Application Gateway.
   794  
   795  * `object_id` - The Object ID of the user-defined Managed Identity used by the Application Gateway.
   796  
   797  * `user_assigned_identity_id` - The ID of the User Assigned Identity used by the Application Gateway.
   798  
   799  ---
   800  
   801  The `oms_agent` block exports the following:
   802  
   803  * `oms_agent_identity` - An `oms_agent_identity` block is exported. The exported attributes are defined below.  
   804  
   805  ---
   806  
   807  The `oms_agent_identity` block exports the following:
   808  
   809  * `client_id` - The Client ID of the user-defined Managed Identity used by the OMS Agents.
   810  
   811  * `object_id` - The Object ID of the user-defined Managed Identity used by the OMS Agents.
   812  
   813  * `user_assigned_identity_id` - The ID of the User Assigned Identity used by the OMS Agents.
   814  
   815  ---
   816  
   817  The `key_vault_secrets_provider` block exports the following:
   818  
   819  * `secret_identity` - An `secret_identity` block is exported. The exported attributes are defined below.
   820  
   821  ---
   822  
   823  The `secret_identity` block exports the following:
   824  
   825  * `client_id` - The Client ID of the user-defined Managed Identity used by the Secret Provider.
   826  
   827  * `object_id` - The Object ID of the user-defined Managed Identity used by the Secret Provider.
   828  
   829  * `user_assigned_identity_id` - The ID of the User Assigned Identity used by the Secret Provider.
   830  
   831  ---
   832  
   833  ## Timeouts
   834  
   835  The `timeouts` block allows you to specify [timeouts](https://www.terraform.io/docs/configuration/resources.html#timeouts) for certain actions:
   836  
   837  * `create` - (Defaults to 90 minutes) Used when creating the Kubernetes Cluster.
   838  * `update` - (Defaults to 90 minutes) Used when updating the Kubernetes Cluster.
   839  * `read` - (Defaults to 5 minutes) Used when retrieving the Kubernetes Cluster.
   840  * `delete` - (Defaults to 90 minutes) Used when deleting the Kubernetes Cluster.
   841  
   842  ## Import
   843  
   844  Managed Kubernetes Clusters can be imported using the `resource id`, e.g.
   845  
   846  ```shell
   847  terraform import azurerm_kubernetes_cluster.cluster1 /subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/group1/providers/Microsoft.ContainerService/managedClusters/cluster1
   848  ```