Data Source: azurerm_kubernetes_cluster

Use this data source to access information about an existing Managed Kubernetes Cluster (AKS).

Example Usage

data "azurerm_kubernetes_cluster" "example" {
  name                = "myakscluster"
  resource_group_name = "my-example-resource-group"
}

Argument Reference

The following arguments are supported:

Attributes Reference

The following attributes are exported:


An aci_connector_linux block exports the following:


An agent_pool_profile block exports the following:


An azure_active_directory_role_based_access_control block exports the following:


A upgrade_settings block exports the following:


A key_management_service block supports the following:


A key_vault_secrets_provider block exports the following:


The kube_admin_config and kube_config blocks export the following:

provider "kubernetes" {
  host                   = data.azurerm_kubernetes_cluster.main.kube_config[0].host
  username               = data.azurerm_kubernetes_cluster.main.kube_config[0].username
  password               = data.azurerm_kubernetes_cluster.main.kube_config[0].password
  client_certificate     = base64decode(data.azurerm_kubernetes_cluster.main.kube_config[0].client_certificate)
  client_key             = base64decode(data.azurerm_kubernetes_cluster.main.kube_config[0].client_key)
  cluster_ca_certificate = base64decode(data.azurerm_kubernetes_cluster.main.kube_config[0].cluster_ca_certificate)
}

A linux_profile block exports the following:


A microsoft_defender block exports the following:


A windows_profile block exports the following:


A network_profile block exports the following:


An oms_agent block exports the following:


The oms_agent_identity block exports the following:


An ingress_application_gateway block supports the following:


The ingress_application_gateway_identity block exports the following:


The secret_identity block exports the following:


A service_principal block exports the following:


A storage_profile block exports the following:


An identity block exports the following:


The kubelet_identity block exports the following:


A ssh_key block exports the following:


A service_mesh_profile block exports the following:


Timeouts

The timeouts block allows you to specify timeouts for certain actions: