Skip to content

azurermDigitalTwinsEndpointEventgrid

Manages a Digital Twins Event Grid 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 azurermEventgridTopicExample = new azurerm.eventgridTopic.EventgridTopic(
  this,
  "example_3",
  {
    location: azurermResourceGroupExample.location,
    name: "example-topic",
    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.*/
azurermEventgridTopicExample.overrideLogicalId("example");
const azurermDigitalTwinsEndpointEventgridExample =
  new azurerm.digitalTwinsEndpointEventgrid.DigitalTwinsEndpointEventgrid(
    this,
    "example_4",
    {
      digital_twins_id: azurermDigitalTwinsInstanceExample.id,
      eventgrid_topic_endpoint: azurermEventgridTopicExample.endpoint,
      eventgrid_topic_primary_access_key:
        azurermEventgridTopicExample.primaryAccessKey,
      eventgrid_topic_secondary_access_key:
        azurermEventgridTopicExample.secondaryAccessKey,
      name: "example-EG",
    }
  );
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
azurermDigitalTwinsEndpointEventgridExample.overrideLogicalId("example");

Arguments Reference

The following arguments are supported:

  • name - (Required) The name which should be used for this Digital Twins Eventgrid Endpoint. Changing this forces a new Digital Twins Eventgrid Endpoint to be created.

  • digitalTwinsId - (Required) The resource ID of the Digital Twins Instance. Changing this forces a new Digital Twins Eventgrid Endpoint to be created.

  • eventgridTopicEndpoint - (Required) The endpoint of the Event Grid Topic.

  • eventgridTopicPrimaryAccessKey - (Required) The primary access key of the Event Grid Topic.

  • eventgridTopicSecondaryAccessKey - (Required) The secondary access key of the Event Grid Topic.

  • deadLetterStorageSecret - (Optional) The storage secret of the dead-lettering, whose format is https://<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 Grid Endpoint.

Timeouts

The timeouts block allows you to specify timeouts for certain actions:

  • create - (Defaults to 30 minutes) Used when creating the Digital Twins Eventgrid Endpoint.
  • read - (Defaults to 5 minutes) Used when retrieving the Digital Twins Eventgrid Endpoint.
  • update - (Defaults to 30 minutes) Used when updating the Digital Twins Eventgrid Endpoint.
  • delete - (Defaults to 30 minutes) Used when deleting the Digital Twins Eventgrid Endpoint.

Import

Digital Twins Eventgrid Endpoints can be imported using the resourceId, e.g.

terraform import azurerm_digital_twins_endpoint_eventgrid.example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.DigitalTwins/digitalTwinsInstances/dt1/endpoints/ep1