azurermServicebusTopicAuthorizationRule
Manages a ServiceBus Topic authorization Rule within a ServiceBus Topic.
Example Usage
/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as azurerm from "./.gen/providers/azurerm";
/*The following providers are missing schema information and might need manual adjustments to synthesize correctly: azurerm.
For a more precise conversion please use the --provider flag in convert.*/
const azurermResourceGroupExample = new azurerm.resourceGroup.ResourceGroup(
this,
"example",
{
location: "West Europe",
name: "tfex-servicebus",
}
);
const azurermServicebusNamespaceExample =
new azurerm.servicebusNamespace.ServicebusNamespace(this, "example_1", {
location: azurermResourceGroupExample.location,
name: "tfex-servicebus-namespace",
resource_group_name: azurermResourceGroupExample.name,
sku: "Standard",
tags: {
source: "terraform",
},
});
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
azurermServicebusNamespaceExample.overrideLogicalId("example");
const azurermServicebusTopicExample =
new azurerm.servicebusTopic.ServicebusTopic(this, "example_2", {
name: "tfex_servicebus_topic",
namespace_id: azurermServicebusNamespaceExample.id,
});
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
azurermServicebusTopicExample.overrideLogicalId("example");
const azurermServicebusTopicAuthorizationRuleExample =
new azurerm.servicebusTopicAuthorizationRule.ServicebusTopicAuthorizationRule(
this,
"example_3",
{
listen: true,
manage: false,
name: "tfex_servicebus_topic_sasPolicy",
send: false,
topic_id: azurermServicebusTopicExample.id,
}
);
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
azurermServicebusTopicAuthorizationRuleExample.overrideLogicalId("example");
Argument Reference
The following arguments are supported:
-
name
- (Required) Specifies the name of the ServiceBus Topic Authorization Rule resource. Changing this forces a new resource to be created. -
topicId
- (Required) Specifies the ID of the ServiceBus Topic. Changing this forces a new resource to be created.
\~> NOTE At least one of the 3 permissions below needs to be set.
-
listen
- (Optional) Grants listen access to this this Authorization Rule. Defaults tofalse
. -
send
- (Optional) Grants send access to this this Authorization Rule. Defaults tofalse
. -
manage
- (Optional) Grants manage access to this this Authorization Rule. When this property istrue
- bothlisten
andsend
must be too. Defaults tofalse
.
Attributes Reference
The following attributes are exported:
-
id
- The ServiceBus Topic ID. -
primaryKey
- The Primary Key for the ServiceBus Topic authorization Rule. -
primaryConnectionString
- The Primary Connection String for the ServiceBus Topic authorization Rule. -
secondaryKey
- The Secondary Key for the ServiceBus Topic authorization Rule. -
secondaryConnectionString
- The Secondary Connection String for the ServiceBus Topic authorization Rule. -
primaryConnectionStringAlias
- The alias Primary Connection String for the ServiceBus Namespace, if the namespace is Geo DR paired. -
secondaryConnectionStringAlias
- The alias Secondary Connection String for the ServiceBus Namespace
Timeouts
The timeouts
block allows you to specify timeouts for certain actions:
create
- (Defaults to 30 minutes) Used when creating the ServiceBus Topic Authorization Rule.update
- (Defaults to 30 minutes) Used when updating the ServiceBus Topic Authorization Rule.read
- (Defaults to 5 minutes) Used when retrieving the ServiceBus Topic Authorization Rule.delete
- (Defaults to 30 minutes) Used when deleting the ServiceBus Topic Authorization Rule.
Import
ServiceBus Topic authorization rules can be imported using the resourceId
, e.g.