azurermDigitalTwinsEndpointEventhub
Manages a Digital Twins Event Hub Endpoint.
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: "example_resources",
}
);
const azurermDigitalTwinsInstanceExample =
new azurerm.digitalTwinsInstance.DigitalTwinsInstance(this, "example_2", {
location: azurermResourceGroupExample.location,
name: "example-DT",
resource_group_name: azurermResourceGroupExample.name,
});
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
azurermDigitalTwinsInstanceExample.overrideLogicalId("example");
const azurermEventhubNamespaceExample =
new azurerm.eventhubNamespace.EventhubNamespace(this, "example_3", {
location: azurermResourceGroupExample.location,
name: "example-eh-ns",
resource_group_name: azurermResourceGroupExample.name,
sku: "Standard",
});
/*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 azurermEventhubExample = new azurerm.eventhub.Eventhub(
this,
"example_4",
{
message_retention: 1,
name: "example-eh",
namespace_name: azurermEventhubNamespaceExample.name,
partition_count: 2,
resource_group_name: azurermResourceGroupExample.name,
}
);
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
azurermEventhubExample.overrideLogicalId("example");
const azurermEventhubAuthorizationRuleExample =
new azurerm.eventhubAuthorizationRule.EventhubAuthorizationRule(
this,
"example_5",
{
eventhub_name: azurermEventhubExample.name,
listen: false,
manage: false,
name: "example-ar",
namespace_name: azurermEventhubNamespaceExample.name,
resource_group_name: azurermResourceGroupExample.name,
send: true,
}
);
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
azurermEventhubAuthorizationRuleExample.overrideLogicalId("example");
const azurermDigitalTwinsEndpointEventhubExample =
new azurerm.digitalTwinsEndpointEventhub.DigitalTwinsEndpointEventhub(
this,
"example_6",
{
digital_twins_id: azurermDigitalTwinsInstanceExample.id,
eventhub_primary_connection_string:
azurermEventhubAuthorizationRuleExample.primaryConnectionString,
eventhub_secondary_connection_string:
azurermEventhubAuthorizationRuleExample.secondaryConnectionString,
name: "example-EH",
}
);
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
azurermDigitalTwinsEndpointEventhubExample.overrideLogicalId("example");
Arguments Reference
The following arguments are supported:
-
name
- (Required) The name which should be used for this Digital Twins Event Hub Endpoint. Changing this forces a new Digital Twins Event Hub Endpoint to be created. -
digitalTwinsId
- (Required) The resource ID of the Digital Twins Instance. Changing this forces a new Digital Twins Event Hub Endpoint to be created. -
eventhubPrimaryConnectionString
- (Required) The primary connection string of the Event Hub Authorization Rule with a minimum ofsend
permission. -
eventhubSecondaryConnectionString
- (Required) The secondary connection string of the Event Hub Authorization Rule with a minimum ofsend
permission. -
deadLetterStorageSecret
- (Optional) The storage secret of the dead-lettering, whose format ishttps://<storageAccountname>BlobCoreWindowsNet/<containerName>?<sasToken>
. When an endpoint can't deliver an event within a certain time period or after trying to deliver the event a certain number of times, it can send the undelivered event to a storage account.
Attributes Reference
In addition to the Arguments listed above - the following Attributes are exported:
id
- The ID of the Digital Twins Event Hub Endpoint.
Timeouts
The timeouts
block allows you to specify timeouts for certain actions:
create
- (Defaults to 30 minutes) Used when creating the Digital Twins Eventhub Endpoint.read
- (Defaults to 5 minutes) Used when retrieving the Digital Twins Eventhub Endpoint.update
- (Defaults to 30 minutes) Used when updating the Digital Twins Eventhub Endpoint.delete
- (Defaults to 30 minutes) Used when deleting the Digital Twins Eventhub Endpoint.
Import
Digital Twins Eventhub Endpoints can be imported using the resourceId
, e.g.