From 8de2d0275ff182565079293adc8ef3f2f51218d8 Mon Sep 17 00:00:00 2001 From: Noah Spannbauer Date: Fri, 18 Apr 2025 15:19:29 -0500 Subject: [PATCH] adding static web to storage account --- modules/storage/storage_account.tf | 8 ++++++++ modules/storage/variables.tf | 7 +++++++ 2 files changed, 15 insertions(+) diff --git a/modules/storage/storage_account.tf b/modules/storage/storage_account.tf index ee5ac04..5b4a116 100644 --- a/modules/storage/storage_account.tf +++ b/modules/storage/storage_account.tf @@ -4,4 +4,12 @@ resource "azurerm_storage_account" "storage_account" { location = data.azurerm_resource_group.resource_group.location account_tier = var.account_tier account_replication_type = var.account_replication_type + + dynamic static_website { + for_each = var.static_websites + + content { + index_document = static_website.value.index_document + } + } } \ No newline at end of file diff --git a/modules/storage/variables.tf b/modules/storage/variables.tf index ae80179..e4da4fe 100644 --- a/modules/storage/variables.tf +++ b/modules/storage/variables.tf @@ -12,6 +12,13 @@ variable "resource_group_name" { type = string } +variable "static_websites" { + default = [] + type = list(object({ + index_document = string + })) +} + variable "storage_account_name" { type = string }