Skip to content

Commit

Permalink
feat(terraform): mount Azure file share into app container
Browse files Browse the repository at this point in the history
  • Loading branch information
thekaveman committed Nov 2, 2023
1 parent b2836eb commit bae7fab
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions terraform/app_service.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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]
Expand Down

0 comments on commit bae7fab

Please sign in to comment.