From e66f5d34196a6b6a8a6e6ea696a61a47cf1ae601 Mon Sep 17 00:00:00 2001 From: Zoe Cope Date: Tue, 5 Mar 2024 09:26:17 +0000 Subject: [PATCH] for --- main.tf | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/main.tf b/main.tf index b47c79b3..6b9d83c8 100644 --- a/main.tf +++ b/main.tf @@ -23,7 +23,16 @@ 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" + content_type = { + for file in local.b2c_files : file => + file == strcontains(each.value, ".html") ? "text/html" : + file == strcontains(each.value, ".css") ? "text/css" : + file == strcontains(each.value, ".png") ? "image/x-png" : + file == 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"