Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
frasdav committed May 31, 2024
1 parent dd794f8 commit c206568
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
10 changes: 9 additions & 1 deletion modules/storage-account/src/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,19 @@ resource "azurerm_storage_account" "main" {
account_replication_type = var.account_replication_type
min_tls_version = "TLS1_2"

dynamic "custom_domain" {
for_each = var.custom_domain != null ? [var.custom_domain] : []
content {
name = custom_domain.value.name
use_subdomain = custom_domain.value.use_subdomain
}
}

dynamic "static_website" {
for_each = var.static_website != null ? [var.static_website] : []
content {
index_document = static_website.value.index_document
error_404_document = static_website.value.error_404_document
index_document = static_website.value.index_document
}
}

Expand Down
10 changes: 9 additions & 1 deletion modules/storage-account/src/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,14 @@ variable "account_replication_type" {
default = "ZRS"
}

variable "custom_domain" {
type = object({
name = string
use_subdomain = bool
})
default = null
}

variable "environment" {
type = string
}
Expand Down Expand Up @@ -38,8 +46,8 @@ variable "resource_group_name" {

variable "static_website" {
type = object({
index_document = string
error_404_document = string
index_document = string
})
default = null
}
Expand Down

0 comments on commit c206568

Please sign in to comment.