Skip to content

Commit

Permalink
chore: make managed identity blob storage contributor (#507)
Browse files Browse the repository at this point in the history
chore: make maanaged identity blob storage contributor
  • Loading branch information
larwaa authored Mar 4, 2024
1 parent 4b8d4c2 commit 4b74e22
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
4 changes: 4 additions & 0 deletions infrastructure/modules/blob_storage/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,7 @@ output "storage_account_name" {
output "storage_container_name" {
value = azurerm_storage_container.main.name
}

output "storage_account_id" {
value = azurerm_storage_account.main.id
}
6 changes: 6 additions & 0 deletions infrastructure/modules/server/managed_identity.tf
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,9 @@ resource "azurerm_role_assignment" "key_vault_user" {
role_definition_name = "Key Vault Secrets User"
principal_id = module.managed_identity.principal_id
}

resource "azurerm_role_assignment" "blob_storage_contributor" {
scope = module.blob_storage.storage_account_id
role_definition_name = "Storage Blob Data Contributor"
principal_id = module.managed_identity.principal_id
}

0 comments on commit 4b74e22

Please sign in to comment.