From c93e63c933bbf8a3f3c23928c74d6f2435b9d63d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rge=20Solli?= Date: Fri, 9 Oct 2020 07:13:36 +0200 Subject: [PATCH] feature/private_cluster (#36) --- aks.tf | 12 ++++++------ outputs.tf | 5 +++++ variables.tf | 6 ++++++ 3 files changed, 17 insertions(+), 6 deletions(-) diff --git a/aks.tf b/aks.tf index fc377c1..02aa6e5 100644 --- a/aks.tf +++ b/aks.tf @@ -109,12 +109,12 @@ resource "azurerm_subnet" "k8s_agent_subnet" { } resource "azurerm_kubernetes_cluster" "k8s_cluster" { - name = var.cluster_name - location = var.resource_group_location - resource_group_name = var.resource_group_name - dns_prefix = var.dns_prefix - - kubernetes_version = var.k8s_version + name = var.cluster_name + location = var.resource_group_location + resource_group_name = var.resource_group_name + dns_prefix = var.dns_prefix + private_cluster_enabled = var.private_cluster_enabled + kubernetes_version = var.k8s_version linux_profile { admin_username = var.admin_username diff --git a/outputs.tf b/outputs.tf index 63c8104..3487e12 100644 --- a/outputs.tf +++ b/outputs.tf @@ -78,3 +78,8 @@ output "name" { output "id" { value = azurerm_kubernetes_cluster.k8s_cluster.id } + +output "private_fqdn" { + value = azurerm_kubernetes_cluster.k8s_cluster.private_fqdn +} + diff --git a/variables.tf b/variables.tf index 567fbbe..93d2e26 100644 --- a/variables.tf +++ b/variables.tf @@ -202,3 +202,9 @@ variable "metrics" { })) default = {} } + +variable "private_cluster_enabled" { + type = bool + default = false +} +