2022-06-21 17:50:24 +00:00
|
|
|
terraform {
|
|
|
|
required_providers {
|
|
|
|
azuread = {
|
|
|
|
source = "hashicorp/azuread"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
provider "azurerm" {
|
|
|
|
features {}
|
2023-10-29 20:51:39 +00:00
|
|
|
# set this to false when running locally
|
|
|
|
use_oidc = true
|
|
|
|
}
|
|
|
|
|
|
|
|
data "azurerm_kubernetes_cluster" "default" {
|
|
|
|
depends_on = [module.test_aks] # refresh cluster state before reading
|
|
|
|
name = var.cluster_name
|
|
|
|
resource_group_name = var.resource_group_name
|
2022-06-21 17:50:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
provider "helm" {
|
|
|
|
kubernetes {
|
2023-10-29 20:51:39 +00:00
|
|
|
host = data.azurerm_kubernetes_cluster.default.kube_config.0.host
|
|
|
|
client_certificate = base64decode(data.azurerm_kubernetes_cluster.default.kube_config.0.client_certificate)
|
|
|
|
client_key = base64decode(data.azurerm_kubernetes_cluster.default.kube_config.0.client_key)
|
|
|
|
cluster_ca_certificate = base64decode(data.azurerm_kubernetes_cluster.default.kube_config.0.cluster_ca_certificate)
|
2022-06-21 17:50:24 +00:00
|
|
|
}
|
|
|
|
}
|
2023-10-29 20:51:39 +00:00
|
|
|
|
2022-06-21 17:50:24 +00:00
|
|
|
provider "kubernetes" {
|
2023-10-29 20:51:39 +00:00
|
|
|
host = data.azurerm_kubernetes_cluster.default.kube_config.0.host
|
|
|
|
client_certificate = base64decode(data.azurerm_kubernetes_cluster.default.kube_config.0.client_certificate)
|
|
|
|
client_key = base64decode(data.azurerm_kubernetes_cluster.default.kube_config.0.client_key)
|
|
|
|
cluster_ca_certificate = base64decode(data.azurerm_kubernetes_cluster.default.kube_config.0.cluster_ca_certificate)
|
2022-06-21 17:50:24 +00:00
|
|
|
}
|