https://github.com/ukho/tfmodule-azure-eventhubnamespace
https://github.com/ukho/tfmodule-azure-eventhubnamespace
Last synced: 5 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/ukho/tfmodule-azure-eventhubnamespace
- Owner: UKHO
- License: mit
- Created: 2025-07-24T14:37:41.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-08-08T08:48:19.000Z (12 months ago)
- Last Synced: 2025-08-08T10:26:53.376Z (12 months ago)
- Language: HCL
- Size: 13.7 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# tfmodule-azure-eventhubnamespace
Use this module to create an eventhub namespace and some associated event hubs, it is possible to create event hubs separately.
## Usage
```terraform
variable "product" {
type = string
description = "The product name (no spaces)"
}
variable "environment" {
type = string
description = "Environment name or resource (no spaces)"
}
variable "location" {
type = string
description = "Location the resource will run in"
}
variable "resource_group_name" {
type = string
description = "Resource Group name"
}
variable "sku" {
type = string
description = "SKU for the Event Hub Namespace"
default = "Standard"
}
variable "capacity" {
type = number
description = "Capacity for the Event Hub Namespace"
default = 1
}
variable "tags" {
type = map(string)
description = "Tags to be applied to the resource"
default = {}
}
#array of event hubs and settings
variable "event_hubs" {
type = list(object({
service = string
role = string
partition_count = number
message_retention = number
capture_description = optional(string)
}))
description = "List of Event Hubs with their settings"
default = []
}
module "producteventhub" {
source = "github.com/ukho/tfmodule-azure-eventhubnamespace?ref=[version]"
product = "myapp"
location = "UK South"
resource_group_name = "rg-myapp-prod"
environment = "prd"
# Optional variables with examples
sku = "Standard" # Basic, Standard, or Premium
capacity = 2 # Throughput units (1-20 for Standard)
tags = {}
# Event Hub configurations
event_hubs = [
{
service = "api"
role = "logging"
partition_count = 4
message_retention = 7
capture_description = "Capture logs for long-term storage"
},
{
service = "api"
role = "telemetry"
partition_count = 2
message_retention = 1
}
]
```