From 4d5a71dd271f23abc0550d58b39a01cabc50de87 Mon Sep 17 00:00:00 2001 From: Mateus Caruccio Date: Mon, 9 Oct 2023 20:26:51 +0100 Subject: [PATCH] aks: calc dns_service_ip and bump version --- templates/aks/locals-aks.tf | 3 ++- templates/aks/main.tf | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/templates/aks/locals-aks.tf b/templates/aks/locals-aks.tf index 7eeca7ea..cfca06e5 100644 --- a/templates/aks/locals-aks.tf +++ b/templates/aks/locals-aks.tf @@ -1,3 +1,4 @@ locals { - cluster_type = "aks" + cluster_type = "aks" + dns_service_ip = (var.service_cidr != null && var.dns_service_ip == null) ? cidrhost(var.service_cidr, 3) : var.dns_service_ip } diff --git a/templates/aks/main.tf b/templates/aks/main.tf index e8479304..ac4a9666 100644 --- a/templates/aks/main.tf +++ b/templates/aks/main.tf @@ -1,5 +1,5 @@ module "aks" { - source = "github.com/getupcloud/terraform-cluster-aks?ref=v2.0.5" + source = "github.com/getupcloud/terraform-cluster-aks?ref=v2.0.6" # cluster basics customer_name = var.customer_name @@ -29,7 +29,7 @@ module "aks" { client_id = var.client_id client_secret = var.client_secret docker_bridge_cidr = var.docker_bridge_cidr - dns_service_ip = var.dns_service_ip + dns_service_ip = local.dns_service_ip identity_type = var.identity_type identity_ids = var.identity_ids identity_name = var.identity_name