adding static web to storage account
This commit is contained in:
6
modules/storage/static_website.tf
Normal file
6
modules/storage/static_website.tf
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
resource "azurerm_storage_account_static_website" "static_website" {
|
||||||
|
count = length(var.storage_tables)
|
||||||
|
storage_account_id = azurerm_storage_account.storage_account.id
|
||||||
|
error_404_document = var.static_websites[count.index].error_404_document
|
||||||
|
index_document = var.static_websites[count.index].index_document
|
||||||
|
}
|
||||||
@@ -4,12 +4,4 @@ resource "azurerm_storage_account" "storage_account" {
|
|||||||
location = data.azurerm_resource_group.resource_group.location
|
location = data.azurerm_resource_group.resource_group.location
|
||||||
account_tier = var.account_tier
|
account_tier = var.account_tier
|
||||||
account_replication_type = var.account_replication_type
|
account_replication_type = var.account_replication_type
|
||||||
|
|
||||||
dynamic static_website {
|
|
||||||
for_each = var.static_websites
|
|
||||||
|
|
||||||
content {
|
|
||||||
index_document = static_website.value.index_document
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -15,6 +15,7 @@ variable "resource_group_name" {
|
|||||||
variable "static_websites" {
|
variable "static_websites" {
|
||||||
default = []
|
default = []
|
||||||
type = list(object({
|
type = list(object({
|
||||||
|
error_404_document = string
|
||||||
index_document = string
|
index_document = string
|
||||||
}))
|
}))
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user