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

     1  ---
     2  layout: "azurerm"
     3  page_title: "Azure Resource Manager: azurerm_servicebus_topic"
     4  sidebar_current: "docs-azurerm-resource-servicebus-topic"
     5  description: |-
     6    Create a ServiceBus Topic.
     7  ---
     8  
     9  # azurerm\_servicebus\_topic
    10  
    11  Create a ServiceBus Topic.
    12  
    13  **Note** Topics can only be created in Namespaces with an SKU or `standard` or
    14  higher.
    15  
    16  ## Example Usage
    17  
    18  ```hcl
    19  resource "azurerm_resource_group" "test" {
    20    name     = "resourceGroup1"
    21    location = "West US"
    22  }
    23  
    24  resource "azurerm_servicebus_namespace" "test" {
    25    name                = "acceptanceTestServiceBusNamespace"
    26    location            = "West US"
    27    resource_group_name = "${azurerm_resource_group.test.name}"
    28    sku                 = "standard"
    29  
    30    tags {
    31      environment = "Production"
    32    }
    33  }
    34  
    35  resource "azurerm_servicebus_topic" "test" {
    36    name                = "testTopic"
    37    location            = "West US"
    38    resource_group_name = "${azurerm_resource_group.test.name}"
    39    namespace_name      = "${azurerm_servicebus_namespace.test.name}"
    40  
    41    enable_partitioning = true
    42  }
    43  ```
    44  
    45  ## Argument Reference
    46  
    47  The following arguments are supported:
    48  
    49  * `name` - (Required) Specifies the name of the ServiceBus Topic resource. Changing this forces a
    50      new resource to be created.
    51  
    52  * `namespace_name` - (Required) The name of the ServiceBus Namespace to create
    53      this topic in. Changing this forces a new resource to be created.
    54  
    55  * `location` - (Required) Specifies the supported Azure location where the resource exists.
    56      Changing this forces a new resource to be created.
    57  
    58  * `resource_group_name` - (Required) The name of the resource group in which to
    59      create the namespace. Changing this forces a new resource to be created.
    60  
    61  * `auto_delete_on_idle` - (Optional) The idle interval after which the
    62      Topic is automatically deleted, minimum of 5 minutes. Provided in the [TimeSpan](#timespan-format)
    63      format.
    64  
    65  * `default_message_ttl` - (Optional) The TTL of messages sent to this topic if no
    66      TTL value is set on the message itself. Provided in the [TimeSpan](#timespan-format)
    67      format.
    68  
    69  * `duplicate_detection_history_time_window` - (Optional) The duration during which
    70      duplicates can be detected. Provided in the [TimeSpan](#timespan-format) format. Defaults to 10 minutes (`00:10:00`)
    71  
    72  * `enable_batched_operations` - (Optional) Boolean flag which controls if server-side
    73      batched operations are enabled. Defaults to false.
    74  
    75  * `enable_express` - (Optional) Boolean flag which controls whether Express Entities
    76      are enabled. An express topic holds a message in memory temporarily before writing
    77      it to persistent storage. Defaults to false.
    78  
    79  * `enable_filtering_messages_before_publishing` - (Optional) Boolean flag which
    80      controls whether messages should be filtered before publishing. Defaults to
    81      false.
    82  
    83  * `enable_partitioning` - (Optional) Boolean flag which controls whether to enable
    84      the topic to be partitioned across multiple message brokers. Defaults to false.
    85      Changing this forces a new resource to be created.
    86  
    87  * `max_size_in_megabytes` - (Optional) Integer value which controls the size of
    88      memory allocated for the topic. For supported values see the "Queue/topic size"
    89      section of [this document](https://docs.microsoft.com/en-us/azure/service-bus-messaging/service-bus-quotas).
    90  
    91  * `requires_duplicate_detection` - (Optional) Boolean flag which controls whether
    92      the Topic requires duplicate detection. Defaults to false. Changing this forces
    93      a new resource to be created.
    94  
    95  * `support_ordering` - (Optional) Boolean flag which controls whether the Topic
    96      supports ordering. Defaults to false.
    97  
    98  ### TimeSpan Format
    99  
   100  Some arguments for this resource are required in the TimeSpan format which is
   101  used to represent a lengh of time. The supported format is documented [here](https://msdn.microsoft.com/en-us/library/se73z7b9(v=vs.110).aspx#Anchor_2)
   102  
   103  ## Attributes Reference
   104  
   105  The following attributes are exported:
   106  
   107  * `id` - The ServiceBus Topic ID.
   108  
   109  ## Import
   110  
   111  Service Bus Topics can be imported using the `resource id`, e.g.
   112  
   113  ```
   114  terraform import azurerm_servicebus_topic.test /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/microsoft.servicebus/namespaces/sbns1/topics/sntopic1
   115  ```