infrastructure/terraform/modules/storageaccount/variables.tf (100 lines of code) (raw):

variable "location" { description = "Specifies the location for all Azure resources." type = string sensitive = false } variable "resource_group_name" { description = "Specifies the name of the resource group." type = string sensitive = false validation { condition = length(var.resource_group_name) >= 2 error_message = "Please specify a valid name." } } variable "tags" { description = "Specifies the tags that you want to apply to all resources." type = map(string) sensitive = false default = {} } variable "storage_account_name" { description = "Specifies the name of the storage account." type = string sensitive = false validation { condition = length(var.storage_account_name) >= 2 error_message = "Please specify a valid name." } } # Service variables variable "storage_account_container_names" { description = "Specifies the container names of the storage account." type = list(string) sensitive = false default = [] validation { condition = alltrue([ length([for storage_account_container_name in var.storage_account_container_names : storage_account_container_name if length(storage_account_container_name) < 2]) <= 0 ]) error_message = "Please specify a valid name." } } variable "storage_account_share_names" { description = "Specifies the share names of the storage account." type = list(string) sensitive = false default = [] validation { condition = alltrue([ length([for storage_account_share_name in var.storage_account_share_names : storage_account_share_name if length(storage_account_share_name) < 2]) <= 0 ]) error_message = "Please specify a valid name." } } variable "storage_account_shared_access_key_enabled" { description = "Specifies the key auth setting of the storage account." type = bool sensitive = false default = false } variable "storage_account_hns_enabled" { description = "Specifies the hns setting of the storage account." type = bool sensitive = false default = false } # Monitoring variables variable "log_analytics_workspace_id" { description = "Specifies the resource ID of the log analytics workspace used for the stamp" type = string sensitive = false validation { condition = length(split("/", var.log_analytics_workspace_id)) == 9 error_message = "Please specify a valid resource ID." } } # Network variables variable "subnet_id" { description = "Specifies the subnet ID." type = string sensitive = false } # Customer-managed key variables variable "customer_managed_key" { description = "Specifies the customer managed key configurations." type = object({ key_vault_id = string, key_vault_key_versionless_id = string, user_assigned_identity_id = string, user_assigned_identity_client_id = string, }) sensitive = false nullable = true default = null validation { condition = alltrue([ var.customer_managed_key == null || length(split("/", try(var.customer_managed_key.key_vault_id, ""))) == 9, var.customer_managed_key == null || startswith(try(var.customer_managed_key.key_vault_key_versionless_id, ""), "https://"), var.customer_managed_key == null || length(split("/", try(var.customer_managed_key.user_assigned_identity_id, ""))) == 9, var.customer_managed_key == null || length(try(var.customer_managed_key.user_assigned_identity_client_id, "")) >= 2, ]) error_message = "Please specify a valid resource ID." } }