2016-10-25 16:50:07 +02:00
|
|
|
---
|
|
|
|
layout: "azurerm"
|
|
|
|
page_title: "Azure Resource Manager: azurerm_eventhub_namespace"
|
|
|
|
sidebar_current: "docs-azurerm-resource-eventhub-namespace"
|
|
|
|
description: |-
|
|
|
|
Create an EventHub Namespace.
|
|
|
|
---
|
|
|
|
|
|
|
|
# azurerm\_eventhub\_namespace
|
|
|
|
|
|
|
|
Create an EventHub Namespace.
|
|
|
|
|
|
|
|
## Example Usage
|
|
|
|
|
|
|
|
```
|
|
|
|
resource "azurerm_resource_group" "test" {
|
2017-02-18 23:48:50 +01:00
|
|
|
name = "resourceGroup1"
|
|
|
|
location = "West US"
|
2016-10-25 16:50:07 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
resource "azurerm_eventhub_namespace" "test" {
|
2017-02-18 23:48:50 +01:00
|
|
|
name = "acceptanceTestEventHubNamespace"
|
|
|
|
location = "West US"
|
|
|
|
resource_group_name = "${azurerm_resource_group.test.name}"
|
|
|
|
sku = "Basic"
|
|
|
|
capacity = 2
|
|
|
|
|
|
|
|
tags {
|
|
|
|
environment = "Production"
|
|
|
|
}
|
2016-10-25 16:50:07 +02:00
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
## Argument Reference
|
|
|
|
|
|
|
|
The following arguments are supported:
|
|
|
|
|
|
|
|
* `name` - (Required) Specifies the name of the EventHub Namespace resource . Changing this forces a
|
|
|
|
new resource to be created.
|
|
|
|
|
|
|
|
* `resource_group_name` - (Required) The name of the resource group in which to
|
2016-11-07 11:19:59 +01:00
|
|
|
create the namespace. Changing this forces a new resource to be created.
|
2016-10-25 16:50:07 +02:00
|
|
|
|
|
|
|
* `location` - (Required) Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
|
|
|
|
|
2016-11-07 11:19:59 +01:00
|
|
|
* `sku` - (Required) Defines which tier to use. Options are Basic or Standard.
|
2016-10-25 16:50:07 +02:00
|
|
|
|
2016-11-07 11:19:59 +01:00
|
|
|
* `capacity` - (Optional) Specifies the capacity of a Standard namespace. Can be 1, 2 or 4
|
2016-10-25 16:50:07 +02:00
|
|
|
|
|
|
|
* `tags` - (Optional) A mapping of tags to assign to the resource.
|
|
|
|
|
|
|
|
## Attributes Reference
|
|
|
|
|
|
|
|
The following attributes are exported:
|
|
|
|
|
|
|
|
* `id` - The EventHub Namespace ID.
|
|
|
|
|
|
|
|
The following attributes are exported only if there is an authorization rule named
|
|
|
|
`RootManageSharedAccessKey` which is created automatically by Azure.
|
|
|
|
|
|
|
|
* `default_primary_connection_string` - The primary connection string for the authorization
|
|
|
|
rule `RootManageSharedAccessKey`.
|
|
|
|
|
|
|
|
* `default_secondary_connection_string` - The secondary connection string for the
|
|
|
|
authorization rule `RootManageSharedAccessKey`.
|
|
|
|
|
|
|
|
* `default_primary_key` - The primary access key for the authorization rule `RootManageSharedAccessKey`.
|
|
|
|
|
|
|
|
* `default_secondary_key` - The secondary access key for the authorization rule `RootManageSharedAccessKey`.
|
2016-11-07 11:19:59 +01:00
|
|
|
|
|
|
|
## Import
|
|
|
|
|
|
|
|
EventHub Namespaces can be imported using the `resource id`, e.g.
|
|
|
|
|
|
|
|
```
|
|
|
|
terraform import azurerm_eventhub_namespace.namespace1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.EventHub/namespaces/namespace1
|
|
|
|
```
|