github.com/minamijoyo/terraform@v0.7.8-0.20161029001309-18b3736ba44b/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 ``` 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. 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. Supported values are multiples of 1024 up to 89 5120, if `enable_partitioning` is enabled then 16 partitions will be created 90 per GB, making the maximum possible topic size 81920 (5120 * 16). 91 92 * `requires_duplicate_detection` - (Optional) Boolean flag which controls whether 93 the Topic requires duplicate detection. Defaults to false. Changing this forces 94 a new resource to be created. 95 96 * `support_ordering` - (Optional) Boolean flag which controls whether the Topic 97 supports ordering. Defaults to false. 98 99 ### TimeSpan Format 100 101 Some arguments for this resource are required in the TimeSpan format which is 102 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) 103 104 ## Attributes Reference 105 106 The following attributes are exported: 107 108 * `id` - The ServiceBus Topic ID.