From 0be4796e2574b172fd56b1c083eff18c4e39b17c Mon Sep 17 00:00:00 2001 From: Federico Sismondi Date: Tue, 14 Dec 2021 15:50:07 +0100 Subject: [PATCH] feat(aks): enable parametrization of storage account used by loki (#835) --- modules/aks/azure/main.tf | 6 +++--- modules/aks/azure/variables.tf | 12 ++++++++++++ modules/cce/opentelekomcloud/variables.tf | 1 - 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/modules/aks/azure/main.tf b/modules/aks/azure/main.tf index 77c033e201..4b577627fa 100644 --- a/modules/aks/azure/main.tf +++ b/modules/aks/azure/main.tf @@ -198,8 +198,8 @@ resource "azurerm_storage_account" "this" { name = random_string.storage_account.result resource_group_name = module.cluster.node_resource_group location = data.azurerm_resource_group.this.location - account_tier = "Standard" - account_replication_type = "GRS" + account_tier = var.storage_account_tier + account_replication_type = var.storage_account_replication_type } resource "azurerm_storage_container" "loki" { @@ -240,7 +240,7 @@ data "azurerm_client_config" "current" {} resource "azuread_application" "oauth2_apps" { count = var.oidc == null ? 1 : 0 - display_name = "oauth2-apps-${var.cluster_name}" + display_name = "oauth2-apps-${var.cluster_name}" required_resource_access { resource_app_id = random_uuid.resource_app_id.0.result diff --git a/modules/aks/azure/variables.tf b/modules/aks/azure/variables.tf index a05ba1abb2..7fec670840 100644 --- a/modules/aks/azure/variables.tf +++ b/modules/aks/azure/variables.tf @@ -75,3 +75,15 @@ variable "node_pools" { description = "List of node pools with minimal configuration" type = map(any) } + +variable "storage_account_tier" { + description = "Storage account tier used for storing loki logs" + default = "Standard" + type = string +} + +variable "storage_account_replication_type" { + description = "Storage account replication type for storing loki logs" + default = "GRS" + type = string +} diff --git a/modules/cce/opentelekomcloud/variables.tf b/modules/cce/opentelekomcloud/variables.tf index 9cc049e5bc..239430a500 100644 --- a/modules/cce/opentelekomcloud/variables.tf +++ b/modules/cce/opentelekomcloud/variables.tf @@ -40,4 +40,3 @@ variable "keycloak_users" { type = map(map(string)) default = {} } -