From e3dc4d44ad86796a7ed5b5d8078b3ad947c269e8 Mon Sep 17 00:00:00 2001 From: matteopasa <146732818+matteopasa@users.noreply.github.com> Date: Tue, 12 Dec 2023 16:21:05 +0100 Subject: [PATCH] ensure event hub namespace uniqueness (#19) --- modules/services/event-hub-data-source/main.tf | 2 +- modules/services/event-hub-data-source/variables.tf | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/services/event-hub-data-source/main.tf b/modules/services/event-hub-data-source/main.tf index 669fb0a..12c1e1a 100644 --- a/modules/services/event-hub-data-source/main.tf +++ b/modules/services/event-hub-data-source/main.tf @@ -28,7 +28,7 @@ resource "azurerm_resource_group" "sysdig_resource_group" { # Create an Event Hub Namespace for Sysdig #--------------------------------------------------------------------------------------------- resource "azurerm_eventhub_namespace" "sysdig_event_hub_namespace" { - name = var.event_hub_namespace_name + name = "${var.event_hub_namespace_name}-${var.subscription_id}" location = azurerm_resource_group.sysdig_resource_group.location resource_group_name = azurerm_resource_group.sysdig_resource_group.name sku = var.namespace_sku diff --git a/modules/services/event-hub-data-source/variables.tf b/modules/services/event-hub-data-source/variables.tf index 5c111ae..ae6e64e 100644 --- a/modules/services/event-hub-data-source/variables.tf +++ b/modules/services/event-hub-data-source/variables.tf @@ -52,7 +52,7 @@ variable "namespace_sku" { variable "event_hub_namespace_name" { type = string description = "Name of the Event Hub Namespace to be created" - default = "sysdig-event-hub-namespace" + default = "sysdig" } variable "event_hub_name" {