From bae7fab8e4530c9976b761022e230165e20ddbc2 Mon Sep 17 00:00:00 2001 From: Kegan Maher Date: Thu, 2 Nov 2023 16:13:26 -0700 Subject: [PATCH] feat(terraform): mount Azure file share into app container --- terraform/app_service.tf | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/terraform/app_service.tf b/terraform/app_service.tf index 6441f1274..3d62637b8 100644 --- a/terraform/app_service.tf +++ b/terraform/app_service.tf @@ -10,6 +10,10 @@ resource "azurerm_service_plan" "main" { } } +locals { + data_mount = "/home/calitp/app/data" +} + resource "azurerm_linux_web_app" "main" { name = "AS-CDT-PUB-VIP-CALITP-${local.env_letter}-001" location = data.azurerm_resource_group.main.location @@ -166,6 +170,15 @@ resource "azurerm_linux_web_app" "main" { "SBMTD_AGENCY_JWS_SIGNING_ALG" = "${local.secret_prefix}sbmtd-agency-jws-signing-alg)" } + storage_account { + access_key = azurerm_storage_account.main.primary_access_key + account_name = azurerm_storage_account.main.name + name = "benefits-data" + type = "AzureFiles" + share_name = azurerm_storage_share.data.name + mount_path = local.data_mount + } + lifecycle { prevent_destroy = true ignore_changes = [tags]