{"id":27044152,"url":"https://github.com/libre-devops/terraform-azurerm-eventhub","last_synced_at":"2025-06-15T16:33:24.566Z","repository":{"id":285079209,"uuid":"957000461","full_name":"libre-devops/terraform-azurerm-eventhub","owner":"libre-devops","description":"A module used to deploy event hub 🗿","archived":false,"fork":false,"pushed_at":"2025-03-29T10:49:54.000Z","size":22,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-03-29T11:28:58.855Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PowerShell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/libre-devops.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-03-29T10:11:18.000Z","updated_at":"2025-03-29T10:49:56.000Z","dependencies_parsed_at":"2025-03-29T11:29:25.538Z","dependency_job_id":"e9d4a450-1676-48ed-be63-ad0332276e21","html_url":"https://github.com/libre-devops/terraform-azurerm-eventhub","commit_stats":null,"previous_names":["libre-devops/terraform-azurerm-eventhub"],"tags_count":1,"template":false,"template_full_name":"libre-devops/terraform-module-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/libre-devops%2Fterraform-azurerm-eventhub","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/libre-devops%2Fterraform-azurerm-eventhub/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/libre-devops%2Fterraform-azurerm-eventhub/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/libre-devops%2Fterraform-azurerm-eventhub/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/libre-devops","download_url":"https://codeload.github.com/libre-devops/terraform-azurerm-eventhub/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247289538,"owners_count":20914493,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-04-05T05:19:32.190Z","updated_at":"2025-04-05T05:19:32.814Z","avatar_url":"https://github.com/libre-devops.png","language":"PowerShell","funding_links":[],"categories":[],"sub_categories":[],"readme":"```hcl\n########################################\n# azurerm_eventhub_namespace\n########################################\n\nresource \"azurerm_eventhub_namespace\" \"eventhubs\" {\n  # Create a namespace for each entry in var.eventhubs\n  for_each                      = { for eh in var.eventhubs : eh.namespace_name =\u003e eh }\n  location                      = each.value.location\n  name                          = each.value.namespace_name\n  resource_group_name           = each.value.rg_name\n  tags                          = each.value.tags\n  sku                           = title(each.value.sku)\n  capacity                      = each.value.capacity\n  auto_inflate_enabled          = each.value.auto_inflate_enabled\n  dedicated_cluster_id          = each.value.dedicated_cluster_id\n  maximum_throughput_units      = each.value.maximum_throughput_units\n  local_authentication_enabled  = each.value.local_authentication_enabled\n  public_network_access_enabled = each.value.public_network_access_enabled\n\n  dynamic \"network_rulesets\" {\n    for_each = each.value.network_rulesets != null ? [each.value.network_rulesets] : []\n    content {\n      default_action                 = try(network_rulesets.value.default_action, null)\n      public_network_access_enabled  = try(network_rulesets.value.public_network_access_enabled, null)\n      trusted_service_access_enabled = try(network_rulesets.value.trusted_service_access_enabled, null)\n\n      dynamic \"virtual_network_rule\" {\n        for_each = network_rulesets.value.virtual_network_rule != null ? network_rulesets.value.virtual_network_rule : []\n        content {\n          subnet_id                                       = virtual_network_rule.value.subnet_id\n          ignore_missing_virtual_network_service_endpoint = try(virtual_network_rule.value.ignore_missing_virtual_network_service_endpoint, null)\n        }\n      }\n\n      dynamic \"ip_rule\" {\n        for_each = network_rulesets.value.ip_rule != null ? network_rulesets.value.ip_rule : []\n        content {\n          ip_mask = ip_rule.value.ip_mask\n          action  = try(ip_rule.value.action, null)\n        }\n      }\n    }\n  }\n\n  # Identity blocks\n  dynamic \"identity\" {\n    for_each = each.value.identity_type == \"SystemAssigned\" ? [each.value.identity_type] : []\n    content {\n      type = each.value.identity_type\n    }\n  }\n\n  dynamic \"identity\" {\n    for_each = each.value.identity_type == \"SystemAssigned, UserAssigned\" ? [each.value.identity_type] : []\n    content {\n      type         = each.value.identity_type\n      identity_ids = try(each.value.identity_ids, [])\n    }\n  }\n\n  dynamic \"identity\" {\n    for_each = each.value.identity_type == \"UserAssigned\" ? [each.value.identity_type] : []\n    content {\n      type         = each.value.identity_type\n      identity_ids = length(try(each.value.identity_ids, [])) \u003e 0 ? each.value.identity_ids : []\n    }\n  }\n}\n\n########################################\n# azurerm_eventhub\n########################################\n\nresource \"azurerm_eventhub\" \"eventhubs\" {\n  # Create an Event Hub only if `create_eventhub` is true\n  for_each = {\n    for eh in var.eventhubs :\n    eh.namespace_name =\u003e eh\n    if eh.create_eventhub == true\n  }\n\n  # Basic config\n  name              = try(each.value.eventhub_name, each.key) # fallback to namespace name if not provided\n  namespace_id      = azurerm_eventhub_namespace.eventhubs[each.key].id\n  partition_count   = try(each.value.partition_count, 2)   # default to 2\n  message_retention = try(each.value.message_retention, 1) # default to 1 day\n\n  # If `capture_description` is present, build a capture_description block\n  dynamic \"capture_description\" {\n    for_each = each.value.capture_description != null ? [each.value.capture_description] : []\n    content {\n      enabled             = try(capture_description.value.enabled, false)\n      encoding            = try(capture_description.value.encoding, null)\n      interval_in_seconds = try(capture_description.value.interval_in_seconds, null)\n      size_limit_in_bytes = try(capture_description.value.size_limit_in_bytes, null)\n      skip_empty_archives = try(capture_description.value.skip_empty_archives, false)\n\n      # Nested destination block within capture_description\n      dynamic \"destination\" {\n        for_each = capture_description.value.destination != null ? [capture_description.value.destination] : []\n        content {\n          name                = destination.value.name\n          storage_account_id  = destination.value.storage_account_id\n          blob_container_name = destination.value.blob_container_name\n          archive_name_format = destination.value.archive_name_format\n        }\n      }\n    }\n  }\n}\n```\n## Requirements\n\nNo requirements.\n\n## Providers\n\n| Name | Version |\n|------|---------|\n| \u003ca name=\"provider_azurerm\"\u003e\u003c/a\u003e [azurerm](#provider\\_azurerm) | n/a |\n\n## Modules\n\nNo modules.\n\n## Resources\n\n| Name | Type |\n|------|------|\n| [azurerm_eventhub.eventhubs](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/eventhub) | resource |\n| [azurerm_eventhub_namespace.eventhubs](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/eventhub_namespace) | resource |\n\n## Inputs\n\n| Name | Description | Type | Default | Required |\n|------|-------------|------|---------|:--------:|\n| \u003ca name=\"input_eventhubs\"\u003e\u003c/a\u003e [eventhubs](#input\\_eventhubs) | List of Eventhubs to create | \u003cpre\u003elist(object({\u003cbr/\u003e    namespace_name                = string\u003cbr/\u003e    location                      = optional(string, \"uksouth\")\u003cbr/\u003e    rg_name                       = string\u003cbr/\u003e    tags                          = optional(map(string))\u003cbr/\u003e    identity_type                 = optional(string)\u003cbr/\u003e    identity_ids                  = optional(list(string))\u003cbr/\u003e    sku                           = optional(string)\u003cbr/\u003e    capacity                      = optional(number)\u003cbr/\u003e    auto_inflate_enabled          = optional(bool)\u003cbr/\u003e    dedicated_cluster_id          = optional(string)\u003cbr/\u003e    maximum_throughput_units      = optional(number)\u003cbr/\u003e    local_authentication_enabled  = optional(bool)\u003cbr/\u003e    public_network_access_enabled = optional(bool)\u003cbr/\u003e    minimum_tls_version           = optional(string)\u003cbr/\u003e    network_rulesets = optional(object({\u003cbr/\u003e      default_action                 = optional(string)\u003cbr/\u003e      public_network_access_enabled  = optional(bool)\u003cbr/\u003e      trusted_service_access_enabled = optional(bool)\u003cbr/\u003e      virtual_network_rule = optional(list(object({\u003cbr/\u003e        subnet_id                                       = string\u003cbr/\u003e        ignore_missing_virtual_network_service_endpoint = optional(bool)\u003cbr/\u003e      })))\u003cbr/\u003e      ip_rule = optional(list(object({\u003cbr/\u003e        ip_mask = string\u003cbr/\u003e        action  = optional(string)\u003cbr/\u003e      })))\u003cbr/\u003e    }))\u003cbr/\u003e\u003cbr/\u003e    create_eventhub   = optional(bool, true)\u003cbr/\u003e    eventhub_name     = optional(string)\u003cbr/\u003e    partition_count   = optional(number)\u003cbr/\u003e    message_retention = optional(string)\u003cbr/\u003e\u003cbr/\u003e    capture_description = optional(object({\u003cbr/\u003e      enabled             = optional(bool)\u003cbr/\u003e      encoding            = optional(string)\u003cbr/\u003e      interval_in_seconds = optional(number)\u003cbr/\u003e      size_limit_in_bytes = optional(number)\u003cbr/\u003e      skip_empty_archives = optional(bool)\u003cbr/\u003e      destination = optional(object({\u003cbr/\u003e        name                = optional(string, \"EventHubArchive.AzureBlockBlob\")\u003cbr/\u003e        storage_account_id  = string\u003cbr/\u003e        blob_container_name = string\u003cbr/\u003e        archive_name_format = string\u003cbr/\u003e      }))\u003cbr/\u003e    }))\u003cbr/\u003e  }))\u003c/pre\u003e | n/a | yes |\n\n## Outputs\n\n| Name | Description |\n|------|-------------|\n| \u003ca name=\"output_eventhub_identities\"\u003e\u003c/a\u003e [eventhub\\_identities](#output\\_eventhub\\_identities) | The identities of the Event Hubs |\n| \u003ca name=\"output_eventhub_ids\"\u003e\u003c/a\u003e [eventhub\\_ids](#output\\_eventhub\\_ids) | The IDs of the Dev Centers |\n| \u003ca name=\"output_eventhub_namespace_names\"\u003e\u003c/a\u003e [eventhub\\_namespace\\_names](#output\\_eventhub\\_namespace\\_names) | The default name of the Dev Centers |\n| \u003ca name=\"output_eventhub_root_manage_shared_access_keys\"\u003e\u003c/a\u003e [eventhub\\_root\\_manage\\_shared\\_access\\_keys](#output\\_eventhub\\_root\\_manage\\_shared\\_access\\_keys) | RootManageSharedAccessKey values for each Event Hub Namespace |\n| \u003ca name=\"output_eventhubs\"\u003e\u003c/a\u003e [eventhubs](#output\\_eventhubs) | Details of the created Event Hubs (id, partition\\_ids, name, etc.) |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flibre-devops%2Fterraform-azurerm-eventhub","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flibre-devops%2Fterraform-azurerm-eventhub","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flibre-devops%2Fterraform-azurerm-eventhub/lists"}