Skip to content

Commit

Permalink
fix: Event hub configuration -> namespace and resource group vars (#287)
Browse files Browse the repository at this point in the history
* fix rg and name variables

* pre-commit fixs
  • Loading branch information
diegolagospagopa authored Apr 30, 2024
1 parent 589369f commit 718a51f
Showing 1 changed file with 16 additions and 13 deletions.
29 changes: 16 additions & 13 deletions eventhub_configuration/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -20,20 +20,22 @@ locals {
resource "azurerm_eventhub" "events" {
for_each = local.hubs

name = each.key
namespace_name = var.event_hub_namespace_resource_group_name
resource_group_name = var.event_hub_namespace_name
partition_count = each.value.partitions
message_retention = each.value.message_retention
name = each.key
namespace_name = var.event_hub_namespace_name
partition_count = each.value.partitions
message_retention = each.value.message_retention

resource_group_name = var.event_hub_namespace_resource_group_name
}

resource "azurerm_eventhub_consumer_group" "events" {
for_each = local.consumers

name = each.value.name
namespace_name = var.event_hub_namespace_resource_group_name
eventhub_name = each.value.hub
resource_group_name = var.event_hub_namespace_name
name = each.value.name
namespace_name = var.event_hub_namespace_name
eventhub_name = each.value.hub

resource_group_name = var.event_hub_namespace_resource_group_name
user_metadata = "terraform"

depends_on = [azurerm_eventhub.events]
Expand All @@ -42,10 +44,11 @@ resource "azurerm_eventhub_consumer_group" "events" {
resource "azurerm_eventhub_authorization_rule" "events" {
for_each = local.keys

name = each.value.key.name
namespace_name = var.event_hub_namespace_resource_group_name
eventhub_name = each.value.hub
resource_group_name = var.event_hub_namespace_name
name = each.value.key.name
namespace_name = var.event_hub_namespace_name
eventhub_name = each.value.hub

resource_group_name = var.event_hub_namespace_resource_group_name

listen = each.value.key.listen
send = each.value.key.send
Expand Down

0 comments on commit 718a51f

Please sign in to comment.