azurermEventhubNamespaceAuthorizationRule
Manages an Authorization Rule for an Event Hub Namespace.
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: "resourcegroup",
}
);
const azurermEventhubNamespaceExample =
new azurerm.eventhubNamespace.EventhubNamespace(this, "example_1", {
capacity: 2,
location: azurermResourceGroupExample.location,
name: "acceptanceTestEventHubNamespace",
resource_group_name: azurermResourceGroupExample.name,
sku: "Basic",
tags: {
environment: "Production",
},
});
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
azurermEventhubNamespaceExample.overrideLogicalId("example");
const azurermEventhubNamespaceAuthorizationRuleExample =
new azurerm.eventhubNamespaceAuthorizationRule.EventhubNamespaceAuthorizationRule(
this,
"example_2",
{
listen: true,
manage: false,
name: "navi",
namespace_name: azurermEventhubNamespaceExample.name,
resource_group_name: azurermResourceGroupExample.name,
send: false,
}
);
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
azurermEventhubNamespaceAuthorizationRuleExample.overrideLogicalId("example");
Argument Reference
The following arguments are supported:
-
name
- (Required) Specifies the name of the Authorization Rule. Changing this forces a new resource to be created. -
namespaceName
- (Required) Specifies the name of the EventHub Namespace. Changing this forces a new resource to be created. -
resourceGroupName
- (Required) The name of the resource group in which the EventHub Namespace exists. 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 EventHub Namespace Authorization Rule ID. -
primaryConnectionStringAlias
- The alias of the Primary Connection String for the Authorization Rule, which is generated when disaster recovery is enabled. -
secondaryConnectionStringAlias
- The alias of the Secondary Connection String for the Authorization Rule, which is generated when disaster recovery is enabled. -
primaryConnectionString
- The Primary Connection String for the Authorization Rule. -
primaryKey
- The Primary Key for the Authorization Rule. -
secondaryConnectionString
- The Secondary Connection String for the Authorization Rule. -
secondaryKey
- The Secondary Key for the Authorization Rule.
Timeouts
The timeouts
block allows you to specify timeouts for certain actions:
create
- (Defaults to 30 minutes) Used when creating the EventHub Namespace Authorization Rule.update
- (Defaults to 30 minutes) Used when updating the EventHub Namespace Authorization Rule.read
- (Defaults to 5 minutes) Used when retrieving the EventHub Namespace Authorization Rule.delete
- (Defaults to 30 minutes) Used when deleting the EventHub Namespace Authorization Rule.
Import
EventHub Namespace Authorization Rules can be imported using the resourceId
, e.g.