github.com/nathanielks/terraform@v0.6.1-0.20170509030759-13e1a62319dc/website/source/docs/providers/azurerm/r/eventhub_namespace.html.markdown (about)

     1  ---
     2  layout: "azurerm"
     3  page_title: "Azure Resource Manager: azurerm_eventhub_namespace"
     4  sidebar_current: "docs-azurerm-resource-eventhub-namespace"
     5  description: |-
     6    Create an EventHub Namespace.
     7  ---
     8  
     9  # azurerm\_eventhub\_namespace
    10  
    11  Create an EventHub Namespace.
    12  
    13  ## Example Usage
    14  
    15  ```hcl
    16  resource "azurerm_resource_group" "test" {
    17    name     = "resourceGroup1"
    18    location = "West US"
    19  }
    20  
    21  resource "azurerm_eventhub_namespace" "test" {
    22    name                = "acceptanceTestEventHubNamespace"
    23    location            = "West US"
    24    resource_group_name = "${azurerm_resource_group.test.name}"
    25    sku                 = "Basic"
    26    capacity            = 2
    27  
    28    tags {
    29      environment = "Production"
    30    }
    31  }
    32  ```
    33  
    34  ## Argument Reference
    35  
    36  The following arguments are supported:
    37  
    38  * `name` - (Required) Specifies the name of the EventHub Namespace resource . Changing this forces a
    39      new resource to be created.
    40  
    41  * `resource_group_name` - (Required) The name of the resource group in which to
    42      create the namespace. Changing this forces a new resource to be created.
    43  
    44  * `location` - (Required) Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
    45  
    46  * `sku` - (Required) Defines which tier to use. Options are Basic or Standard.
    47  
    48  * `capacity` - (Optional) Specifies the capacity of a Standard namespace. Can be 1, 2 or 4
    49  
    50  * `tags` - (Optional) A mapping of tags to assign to the resource.
    51  
    52  ## Attributes Reference
    53  
    54  The following attributes are exported:
    55  
    56  * `id` - The EventHub Namespace ID.
    57  
    58  The following attributes are exported only if there is an authorization rule named
    59  `RootManageSharedAccessKey` which is created automatically by Azure.
    60  
    61  * `default_primary_connection_string` - The primary connection string for the authorization
    62      rule `RootManageSharedAccessKey`.
    63  
    64  * `default_secondary_connection_string` - The secondary connection string for the
    65      authorization rule `RootManageSharedAccessKey`.
    66  
    67  * `default_primary_key` - The primary access key for the authorization rule `RootManageSharedAccessKey`.
    68  
    69  * `default_secondary_key` - The secondary access key for the authorization rule `RootManageSharedAccessKey`.
    70  
    71  ## Import
    72  
    73  EventHub Namespaces can be imported using the `resource id`, e.g.
    74  
    75  ```
    76  terraform import azurerm_eventhub_namespace.namespace1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.EventHub/namespaces/namespace1
    77  ```