Skip to content

Commit

Permalink
Merge pull request #103 from Matthewsre/develop
Browse files Browse the repository at this point in the history
Changing how the iteration happens for service bus permissions
  • Loading branch information
Matthewsre authored Jun 16, 2021
2 parents 1a9dca1 + 3118df9 commit c2d49a1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions modules/microservice/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -334,15 +334,15 @@ resource "azurerm_servicebus_queue" "microservice" {
}

resource "azurerm_role_assignment" "microservice_servicebus_receiver" {
for_each = toset(azurerm_servicebus_queue.microservice)
for_each = { for queue in azurerm_servicebus_queue.microservice : "${queue.name}-${queue.namespace_name}" => queue }

scope = each.value.id
role_definition_name = "Azure Service Bus Data Receiver"
principal_id = azurerm_user_assigned_identity.microservice_servicebus[0].principal_id
}

resource "azurerm_role_assignment" "microservice_servicebus_sender" {
for_each = toset(azurerm_servicebus_queue.microservice)
for_each = { for queue in azurerm_servicebus_queue.microservice : "${queue.name}-${queue.namespace_name}" => queue }

scope = each.value.id
role_definition_name = "Azure Service Bus Data Sender"
Expand Down

0 comments on commit c2d49a1

Please sign in to comment.