From 95faec523fc79006cd60007d715d6c8fa464682f Mon Sep 17 00:00:00 2001 From: Lucas Telles Date: Tue, 11 Feb 2025 14:02:03 -0300 Subject: [PATCH] [DEV-12976] Update azure storage module to allow create/load (#380) * Bump azure storage version and add load variables * Remove duplicate variable and add to storage module * Update fileshare_name variable * Change variables to override * Bump azure storage version * Fix storage variables --- azure/main.tf | 18 +++++++++++------- azure/variables.tf | 27 +++++++++++++++++++++++++++ 2 files changed, 38 insertions(+), 7 deletions(-) diff --git a/azure/main.tf b/azure/main.tf index be301573..5b5ac62e 100644 --- a/azure/main.tf +++ b/azure/main.tf @@ -271,13 +271,17 @@ module "storage" { depends_on = [ azurerm_resource_group.cod-cluster ] - source = "app.terraform.io/indico/indico-azure-blob/mod" - version = "0.1.145" # 0.1.144 is a branch off 0.1.14 - label = var.label - region = var.region - resource_group_name = local.resource_group_name - storage_account_name = local.storage_account_name - keyvault_name = var.keyvault_name + source = "app.terraform.io/indico/indico-azure-blob/mod" + version = "1.0.1" + label = var.label + region = var.region + resource_group_name = local.resource_group_name + storage_account_name = local.storage_account_name + keyvault_name = var.keyvault_name + blob_type = var.blob_type + fileshare_name_override = var.fileshare_name_override + blob_store_name_override = var.blob_store_name_override + crunchy_backup_name_override = var.crunchy_backup_name_override } resource "azurerm_user_assigned_identity" "cluster_dns" { diff --git a/azure/variables.tf b/azure/variables.tf index 3f397aca..13436590 100644 --- a/azure/variables.tf +++ b/azure/variables.tf @@ -817,3 +817,30 @@ variable "aks_storage_account_name" { default = "" description = "specifies the storage account name for the cluster if we don't want it generated automatically" } + +variable "blob_type" { + type = string + default = "create" + validation { + condition = var.blob_type == "create" || var.blob_type == "load" + error_message = "${var.blob_type} not valid. Type must be either create or load" + } +} + +variable "fileshare_name_override" { + type = string + default = null + description = "Override the default indico-user-data file share name" +} + +variable "blob_store_name_override" { + type = string + default = null + description = "Override the default indico-blob-store name" +} + +variable "crunchy_backup_name_override" { + type = string + default = null + description = "Override the default crunchy-backup name" +}