azurermServicebusNamespace
Manages a ServiceBus 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.*/
new azurerm.provider.AzurermProvider(this, "azurerm", {
features: [{}],
});
const azurermResourceGroupExample = new azurerm.resourceGroup.ResourceGroup(
this,
"example",
{
location: "West Europe",
name: "terraform-servicebus",
}
);
const azurermServicebusNamespaceExample =
new azurerm.servicebusNamespace.ServicebusNamespace(this, "example_2", {
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");
Argument Reference
The following arguments are supported:
-
name
- (Required) Specifies the name of the ServiceBus Namespace resource . Changing this forces a new resource to be created. -
resourceGroupName
- (Required) The name of the resource group in which to Changing this forces a new resource to be created. create the namespace. -
location
- (Required) Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. -
sku
- (Required) Defines which tier to use. Options arebasic
,standard
orpremium
. Please note that setting this field topremium
will force the creation of a new resource. -
identity
- (Optional) Anidentity
block as defined below. -
capacity
- (Optional) Specifies the capacity. Whensku
ispremium
, capacity can be1
,2
,4
,8
or16
. Whensku
isbasic
orstandard
, capacity can be0
only. -
customerManagedKey
- (Optional) AncustomerManagedKey
block as defined below. -
localAuthEnabled
- (Optional) Whether or not SAS authentication is enabled for the Service Bus namespace. Defaults totrue
. -
publicNetworkAccessEnabled
- (Optional) Is public network access enabled for the Service Bus Namespace? Defaults totrue
. -
minimumTlsVersion
- (Optional) The minimum supported TLS version for this Service Bus Namespace. Valid values are:10
,11
and12
. The current default minimum TLS version is12
. -
zoneRedundant
- (Optional) Whether or not this resource is zone redundant.sku
needs to bepremium
. Changing this forces a new resource to be created. -
tags
- (Optional) A mapping of tags to assign to the resource.
An identity
block supports the following:
-
type
- (Required) Specifies the type of Managed Service Identity that should be configured on this ServiceBus Namespace. Possible values aresystemAssigned
,userAssigned
,systemAssigned,UserAssigned
(to enable both). -
identityIds
- (Optional) Specifies a list of User Assigned Managed Identity IDs to be assigned to this ServiceBus namespace.
\~> NOTE: This is required when type
is set to userAssigned
or systemAssigned,UserAssigned
.
-> Note: Once customer-managed key encryption has been enabled, it cannot be disabled.
A customerManagedKey
block supports the following:
-
keyVaultKeyId
- (Required) The ID of the Key Vault Key which should be used to Encrypt the data in this ServiceBus Namespace. -
identityId
- (Required) The ID of the User Assigned Identity that has access to the key. -
infrastructureEncryptionEnabled
- (Optional) Used to specify whether enable Infrastructure Encryption (Double Encryption). Changing this forces a new resource to be created.
Attributes Reference
The following attributes are exported:
-
id
- The ServiceBus Namespace ID. -
identity
- Anidentity
block as defined below, which contains the Managed Service Identity information for this ServiceBus Namespace. -
endpoint
- The URL to access the ServiceBus Namespace.
A identity
block exports the following:
-
principalId
- The Principal ID for the Service Principal associated with the Managed Service Identity of this ServiceBus Namespace. -
tenantId
- The Tenant ID for the Service Principal associated with the Managed Service Identity of this ServiceBus Namespace.
The following attributes are exported only if there is an authorization rule named rootManageSharedAccessKey
which is created automatically by Azure.
-
defaultPrimaryConnectionString
- The primary connection string for the authorization rulerootManageSharedAccessKey
. -
defaultSecondaryConnectionString
- The secondary connection string for the authorization rulerootManageSharedAccessKey
. -
defaultPrimaryKey
- The primary access key for the authorization rulerootManageSharedAccessKey
. -
defaultSecondaryKey
- The secondary access key for the authorization rulerootManageSharedAccessKey
.
A identity
block exports the following:
-
principalId
- The Principal ID for the Service Principal associated with the Managed Service Identity of this ServiceBus Namespace. -
tenantId
- The Tenant ID for the Service Principal associated with the Managed Service Identity of this ServiceBus Namespace.
Timeouts
The timeouts
block allows you to specify timeouts for certain actions:
create
- (Defaults to 30 minutes) Used when creating the ServiceBus Namespace.update
- (Defaults to 30 minutes) Used when updating the ServiceBus Namespace.read
- (Defaults to 5 minutes) Used when retrieving the ServiceBus Namespace.delete
- (Defaults to 30 minutes) Used when deleting the ServiceBus Namespace.
Import
Service Bus Namespace can be imported using the resourceId
, e.g.