Skip to content

Commit 92d47e7

Browse files
committed
storage permissions
1 parent 5015aae commit 92d47e7

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

core/terraform/airlock/identity.tf

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,3 +52,11 @@ resource "azurerm_role_assignment" "api_sa_data_contributor" {
5252
role_definition_name = "Storage Blob Data Contributor"
5353
principal_id = var.api_principal_id
5454
}
55+
56+
# Permissions needed for the Function Host to work correctly.
57+
resource "azurerm_role_assignment" "function_host_storage" {
58+
for_each = toset(["Storage Account Contributor", "Storage Blob Data Owner", "Storage Queue Data Contributor"])
59+
scope = azurerm_storage_account.sa_airlock_processor_func_app.id
60+
role_definition_name = each.value
61+
principal_id = azurerm_user_assigned_identity.airlock_id.principal_id
62+
}

0 commit comments

Comments
 (0)