From f3d3aa0a1491467e551944882d5ad05eee423030 Mon Sep 17 00:00:00 2001 From: tomrss Date: Wed, 18 Sep 2024 17:00:37 +0200 Subject: [PATCH] feat: New vars on container --- src/core/21_appservice_container.tf | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/core/21_appservice_container.tf b/src/core/21_appservice_container.tf index 508fc4a..41769b1 100644 --- a/src/core/21_appservice_container.tf +++ b/src/core/21_appservice_container.tf @@ -31,6 +31,13 @@ locals { AZUREAD_ADGROUP = "fat-${var.env_short}-adgroup-" STORAGE_CONNECTIONSTRING = "@Microsoft.KeyVault(VaultName=${module.key_vault_app.name};SecretName=RelStorageConnectionString)" STORAGE_REL_FOLDER = "rel" + + STORAGE_DOCUMENTI_CONNECTIONSTRING = "@Microsoft.KeyVault(VaultName=${module.key_vault_app.name};SecretName=DlsStorageConnectionString)" + STORAGE_DOCUMENTI_FOLDER = "reportaccertamenti" + SYNAPSE_WORKSPACE_NAME = azurerm_synapse_workspace.this.name + PIPELINE_NAME_SAP = "SendJsonToSap", + SYNAPSE_SUBSCRIPTIONID = data.azurerm_client_config.current.subscription_id + SYNAPSE_RESOURCEGROUPNAME = azurerm_synapse_workspace.this.resource_group_name } } } @@ -93,6 +100,12 @@ resource "azurerm_linux_web_app" "app_api_container" { tags = var.tags } +resource "azurerm_synapse_role_assignment" "api_synapse_user_container" { + synapse_workspace_id = azurerm_synapse_workspace.this.id + role_name = "Synapse User" + principal_id = azurerm_linux_web_app.app_api_container.identity[0].principal_id +} + # vnet integration resource "azurerm_app_service_virtual_network_swift_connection" "app_api_container" { app_service_id = azurerm_linux_web_app.app_api_container.id