From 909377ea52e09a4c0b9d9abfb279a2b67ef2a576 Mon Sep 17 00:00:00 2001 From: kevindelmont <133667252+kevindelmont@users.noreply.github.com> Date: Tue, 23 Jul 2024 11:02:10 +0200 Subject: [PATCH] Support for the cost_analysis_enabled property on Aks (#2042) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Apply terraform fmt * add public_network_access_enabled for azurerm_postgresql_flexible_server (#21) add new argument public_network_access_enabled = try(var.settings.public_network_access_enabled, null) * Revert "add public_network_access_enabled for azurerm_postgresql_flexible_ser…" (#25) This reverts commit 79b2fdb48e53fb20a16a3349b52ecdad13f21216. * add cost_analysis_enabled * Updated example * fixed indentation * fix --------- Co-authored-by: GitHub Action --- .../compute/kubernetes_services/101-single-cluster/aks.tfvars | 2 ++ modules/compute/aks/aks.tf | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/examples/compute/kubernetes_services/101-single-cluster/aks.tfvars b/examples/compute/kubernetes_services/101-single-cluster/aks.tfvars index a55d375ee9..87218b10ff 100644 --- a/examples/compute/kubernetes_services/101-single-cluster/aks.tfvars +++ b/examples/compute/kubernetes_services/101-single-cluster/aks.tfvars @@ -18,6 +18,8 @@ aks_clusters = { resource_group_key = "aks_re1" os_type = "Linux" + cost_analysis_enabled = true + identity = { type = "SystemAssigned" } diff --git a/modules/compute/aks/aks.tf b/modules/compute/aks/aks.tf index 3ac8887a23..0ace42bb06 100644 --- a/modules/compute/aks/aks.tf +++ b/modules/compute/aks/aks.tf @@ -161,7 +161,7 @@ resource "azurerm_kubernetes_cluster" "aks" { subnet_name = aci_connector_linux.value.subnet_name } } - + cost_analysis_enabled = try(var.settings.cost_analysis_enabled, null) azure_policy_enabled = can(var.settings.addon_profile.azure_policy) || can(var.settings.azure_policy_enabled) == false ? try(var.settings.addon_profile.azure_policy.0.enabled, null) : var.settings.azure_policy_enabled http_application_routing_enabled = can(var.settings.addon_profile.http_application_routing) || can(var.settings.http_application_routing_enabled) == false ? try(var.settings.addon_profile.http_application_routing.0.enabled, null) : var.settings.http_application_routing_enabled