From 31551e4f0b801786b09eaed1b7a1b77636604abb Mon Sep 17 00:00:00 2001 From: Al West Date: Tue, 26 Sep 2023 10:51:19 +0100 Subject: [PATCH] Move error page creation to bootstrap area --- .../Error-pages/403.html | 0 .../Error-pages/502.html | 0 Terraform-bootstrap/errorpage-blob.tf | 28 +++++++++++++++++++ Terraform/errorpage-blob.tf.bak | 25 ----------------- 4 files changed, 28 insertions(+), 25 deletions(-) rename {Terraform => Terraform-bootstrap}/Error-pages/403.html (100%) rename {Terraform => Terraform-bootstrap}/Error-pages/502.html (100%) create mode 100644 Terraform-bootstrap/errorpage-blob.tf delete mode 100644 Terraform/errorpage-blob.tf.bak diff --git a/Terraform/Error-pages/403.html b/Terraform-bootstrap/Error-pages/403.html similarity index 100% rename from Terraform/Error-pages/403.html rename to Terraform-bootstrap/Error-pages/403.html diff --git a/Terraform/Error-pages/502.html b/Terraform-bootstrap/Error-pages/502.html similarity index 100% rename from Terraform/Error-pages/502.html rename to Terraform-bootstrap/Error-pages/502.html diff --git a/Terraform-bootstrap/errorpage-blob.tf b/Terraform-bootstrap/errorpage-blob.tf new file mode 100644 index 00000000..fd9fe119 --- /dev/null +++ b/Terraform-bootstrap/errorpage-blob.tf @@ -0,0 +1,28 @@ +resource "azurerm_storage_account" "s185errorpage-sa" { + name = "s185errorpage" + resource_group_name = var.key_vault_rg[terraform.workspace] + account_replication_type = "LRS" + account_tier = "Standard" + location = azurerm_resource_group.rg.location +} + +resource "azurerm_storage_container" "s185errorpage-sc" { + name = "s185errorpage" + storage_account_name = azurerm_storage_account.s185errorpage-sa.name +} + +resource "azurerm_storage_blob" "error-403" { + name = "403.html" + storage_account_name = azurerm_storage_account.s185errorpage-sa.name + storage_container_name = azurerm_storage_container.s185errorpage-sc.name + type = "Block" + source = "./Error-pages/403.html" +} + +resource "azurerm_storage_blob" "error-502" { + name = "502.html" + storage_account_name = azurerm_storage_account.s185errorpage-sa.name + storage_container_name = azurerm_storage_container.s185errorpage-sc.name + type = "Block" + source = "./Error-pages/502.html" +} diff --git a/Terraform/errorpage-blob.tf.bak b/Terraform/errorpage-blob.tf.bak deleted file mode 100644 index f3bf8fc1..00000000 --- a/Terraform/errorpage-blob.tf.bak +++ /dev/null @@ -1,25 +0,0 @@ -data "azurerm_storage_account" "s185errorpage-sa" { - name = "s185errorpage" - resource_group_name = "s185d01-childrens-social-care-shared-rg" -} - -data "azurerm_storage_container" "s185errorpage-sc" { - name = "s185errorpage" - storage_account_name = data.azurerm_storage_account.s185errorpage-sa.name -} - -resource "azurerm_storage_blob" "error-403" { - name = "403.html" - storage_account_name = data.azurerm_storage_account.s185errorpage-sa.name - storage_container_name = data.azurerm_storage_container.s185errorpage-sc.name - type = "Block" - source = "./Error-pages/403.html" -} - -resource "azurerm_storage_blob" "error-502" { - name = "502.html" - storage_account_name = data.azurerm_storage_account.s185errorpage-sa.name - storage_container_name = data.azurerm_storage_container.s185errorpage-sc.name - type = "Block" - source = "./Error-pages/502.html" -}