Skip to content

Commit

Permalink
Adapt AKS infra for managed identity rather than explicit service acc…
Browse files Browse the repository at this point in the history
…ount creds (#1784)
  • Loading branch information
alexsomesan authored and BBBmau committed Aug 30, 2022
1 parent 1e6f817 commit 6b3618a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 14 deletions.
8 changes: 2 additions & 6 deletions kubernetes/test-infra/aks/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -78,13 +78,9 @@ resource "azurerm_kubernetes_cluster" "tf-k8s-acc" {
vnet_subnet_id = azurerm_subnet.tf-k8s-acc.id
}

service_principal {
client_id = var.aks_client_id
client_secret = var.aks_client_secret
}

role_based_access_control {
enabled = true
identity {
type = "SystemAssigned"
}

network_profile {
Expand Down
3 changes: 3 additions & 0 deletions kubernetes/test-infra/aks/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,6 @@ output "kubeconfig_path" {
value = local_file.kubeconfig.filename
}

output "cluster_name" {
value = azurerm_kubernetes_cluster.tf-k8s-acc.name
}
8 changes: 0 additions & 8 deletions kubernetes/test-infra/aks/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,6 @@ variable "workers_type" {
default = "Standard_DS4_v2"
}

variable "aks_client_id" {
description = "The Client ID for the Service Principal to use for this Managed Kubernetes Cluster"
}

variable "aks_client_secret" {
description = "The Client Secret for the Service Principal to use for this Managed Kubernetes Cluster"
}

# Uncomment to enable SSH access to nodes
#
# variable "public_ssh_key_path" {
Expand Down

0 comments on commit 6b3618a

Please sign in to comment.