Skip to content

Commit

Permalink
bit nicer
Browse files Browse the repository at this point in the history
  • Loading branch information
zc-hmcts committed Mar 5, 2024
1 parent e32f2c9 commit c48fe0c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ locals {
"mfa.html",
]
b2c_container_name = "${var.product}-b2c-container"
content_type = strcontains(each.value, ".html") ? "text/html" : strcontains(each.value, ".css") ? "text/css" : strcontains(each.value, ".png") ? "image/x-png" : strcontains(each.value, ".ico") ? "image/x-ico" : strcontains(each.value, ".svg") ? "image/svg+xml" : "application/octet-stream"
containers = [{
name = local.b2c_container_name
access_type = "container"
Expand Down
2 changes: 1 addition & 1 deletion sa-sa.tf
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ resource "azurerm_monitor_diagnostic_setting" "storageblobsa" {
resource "azurerm_storage_blob" "b2c_config" {
for_each = { for idx, file_name in local.b2c_files : idx => file_name }
name = each.value
content_type = strcontains(each.value, ".html") ? "text/html" : strcontains(each.value, ".css") ? "text/css" : strcontains(each.value, ".png") ? "image/x-png" : strcontains(each.value, ".ico") ? "image/x-ico" : strcontains(each.value, ".svg") ? "image/svg+xml" : "application/octet-stream"
content_type = local.content_type
content_md5 = filemd5("./b2c/assets/${each.value}")
storage_account_name = module.sa_storage_account.storageaccount_name
storage_container_name = local.b2c_container_name
Expand Down

0 comments on commit c48fe0c

Please sign in to comment.