Skip to content

Commit

Permalink
Add example for the usage of creating eventhub with dedicated cluster (
Browse files Browse the repository at this point in the history
  • Loading branch information
Neil Ye authored Jul 8, 2020
1 parent 35ef83f commit ba42ccf
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 0 deletions.
31 changes: 31 additions & 0 deletions examples/eventhub/dedicated-eventhubs-cluster/main.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
provider "azurerm" {
features {}
}

resource "azurerm_resource_group" "example" {
name = "${var.prefix}-resources"
location = var.location
}

resource "azurerm_eventhub_cluster" "example" {
name = "${var.prefix}-ehcluster"
resource_group_name = azurerm_resource_group.example.name
location = azurerm_resource_group.example.location
sku_name = "Dedicated_1"
}

resource "azurerm_eventhub_namespace" "example" {
name = "${var.prefix}-ehnamespace"
location = azurerm_resource_group.example.location
resource_group_name = azurerm_resource_group.example.name
sku = "Standard"
dedicated_cluster_id = azurerm_eventhub_cluster.example.id
}

resource "azurerm_eventhub" "example" {
name = "${var.prefix}-eventhub"
resource_group_name = azurerm_resource_group.example.name
namespace_name = azurerm_eventhub_namespace.example.name
partition_count = 40
message_retention = 1
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
variable "prefix" {
description = "The Prefix used for all resources in this example"
}

variable "location" {
description = "The Azure Region in which all resources in this example should be created."
}

0 comments on commit ba42ccf

Please sign in to comment.