Skip to content

Commit fa0885d

Browse files
authored
Merge pull request #1 from iamamitgera/support-for-publicDNS-for-privateAKScluster
support-for-publicDNS-for-privateAKScluster : adding private_dns_zone_id & private_cluster_public_fqdn_enabled vars to control private aks cluster
2 parents 0aa5eb3 + 8aa1f30 commit fa0885d

2 files changed

Lines changed: 23 additions & 0 deletions

File tree

main.tf

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ resource "azurerm_kubernetes_cluster" "main" {
1515
dns_prefix = var.prefix
1616
sku_tier = var.sku_tier
1717
private_cluster_enabled = var.private_cluster_enabled
18+
private_dns_zone_id = var.private_dns_zone_id
19+
private_cluster_public_fqdn_enabled = var.private_cluster_public_fqdn_enabled
20+
1821

1922
linux_profile {
2023
admin_username = var.admin_username

variables.tf

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -318,3 +318,23 @@ variable "enable_host_encryption" {
318318
type = bool
319319
default = false
320320
}
321+
322+
variable "private_dns_zone_id" {
323+
description = <<EOT
324+
(Optional) Either the ID of Private DNS Zone which should be delegated to this Cluster,
325+
or System to have AKS manage this or None.
326+
In case of None you will need to bring your own DNS server and set up resolving,
327+
otherwise cluster will have issues after provisioning.
328+
Changing this forces a new resource to be created.
329+
EOT
330+
type = string
331+
default = null
332+
}
333+
334+
variable "private_cluster_public_fqdn_enabled" {
335+
description = <<EOT
336+
(Optional) Specifies whether a Public FQDN for this Private Cluster should be added. Defaults to false.
337+
EOT
338+
type = bool
339+
default = false
340+
}

0 commit comments

Comments
 (0)