Created
December 14, 2019 11:59
-
-
Save cdennig/8e2215415a69e23701b74568c344796c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# K8s cluster | |
resource "azurerm_kubernetes_cluster" "aks" { | |
name = "${var.clustername}" | |
location = "${var.location}" | |
resource_group_name = "${var.rg-name}" | |
dns_prefix = "${var.clustername}" | |
default_node_pool { | |
name = "default" | |
type = "VirtualMachineScaleSets" | |
node_count = 2 | |
vm_size = "Standard_B2s" | |
os_disk_size_gb = 30 | |
max_pods = 50 | |
} | |
service_principal { | |
client_id = "${azuread_application.aks_sp.application_id}" | |
client_secret = "${random_password.aks_sp_pwd.result}" | |
} | |
role_based_access_control { | |
azure_active_directory { | |
client_app_id = "${azuread_application.aks-aad-client.application_id}" | |
server_app_id = "${azuread_application.aks-aad-srv.application_id}" | |
server_app_secret = "${random_password.aks-aad-srv.result}" | |
tenant_id = "${data.azurerm_subscription.current.tenant_id}" | |
} | |
enabled = true | |
} | |
depends_on = [ | |
azurerm_role_assignment.aks_sp_role_assignment, | |
azuread_service_principal_password.aks_sp_pwd | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment