Skip to content

Commit

Permalink
fix: Max Length of Storage Account name (#90)
Browse files Browse the repository at this point in the history
  • Loading branch information
zacharyblasczyk authored Aug 5, 2024
1 parent 513ce08 commit 38d012f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion modules/storage/main.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
locals {
postfix = "storage"
truncated_namespace = substr(replace(var.namespace, "-", ""), 0, 24 - length(local.postfix))
}
resource "azurerm_storage_account" "default" {
name = replace("${var.namespace}-storage", "-", "")
name = "${local.truncated_namespace}${local.postfix}"
resource_group_name = var.resource_group_name
location = var.location
account_tier = "Standard"
Expand Down

0 comments on commit 38d012f

Please sign in to comment.