-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add example for the usage of creating eventhub with dedicated cluster (…
- Loading branch information
Neil Ye
authored
Jul 8, 2020
1 parent
35ef83f
commit ba42ccf
Showing
5 changed files
with
38 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
7 changes: 7 additions & 0 deletions
7
examples/eventhub/shared-parent-eventhub-namespace/variables.tf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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." | ||
} |