From ebf12371ae6d51a62a09e532d0af09b9bebb592b Mon Sep 17 00:00:00 2001 From: Gabriel GUILLON Date: Fri, 5 Aug 2022 16:21:09 +0200 Subject: [PATCH 1/2] Use powershell to upload static content This should make this plateform independent --- main.tf | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/main.tf b/main.tf index 7e8d5c6..d647dc2 100644 --- a/main.tf +++ b/main.tf @@ -59,7 +59,16 @@ resource "azurerm_storage_account" "storeacc" { resource "null_resource" "copyfilesweb" { count = var.upload_to_static_website ? 1 : 0 provisioner "local-exec" { - command = "az storage blob upload-batch --no-progress --account-name ${azurerm_storage_account.storeacc.name} -s ${var.static_website_source_folder} -d '$web' --output none" + command = < Date: Wed, 10 Aug 2022 12:02:27 +0200 Subject: [PATCH 2/2] Guess mime type of uploaded files Could be slow, as it processes one by one, and incomplete, as the mime-type map is limited... --- main.tf | 33 ++++++++++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) diff --git a/main.tf b/main.tf index d647dc2..def48f3 100644 --- a/main.tf +++ b/main.tf @@ -60,12 +60,43 @@ resource "null_resource" "copyfilesweb" { count = var.upload_to_static_website ? 1 : 0 provisioner "local-exec" { command = <