Skip to content

azurermDataFactoryTriggerCustomEvent

Manages a Custom Event Trigger inside an Azure Data Factory.

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: "example-resources",
  }
);
const azurermDataFactoryExample = new azurerm.dataFactory.DataFactory(
  this,
  "example_1",
  {
    location: azurermResourceGroupExample.location,
    name: "example",
    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.*/
azurermDataFactoryExample.overrideLogicalId("example");
const azurermDataFactoryPipelineExample =
  new azurerm.dataFactoryPipeline.DataFactoryPipeline(this, "example_2", {
    data_factory_id: azurermDataFactoryExample.id,
    name: "example",
  });
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
azurermDataFactoryPipelineExample.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 azurermDataFactoryTriggerCustomEventExample =
  new azurerm.dataFactoryTriggerCustomEvent.DataFactoryTriggerCustomEvent(
    this,
    "example_4",
    {
      additional_properties: [
        {
          bar: "bar2",
          foo: "foo1",
        },
      ],
      annotations: ["example1", "example2", "example3"],
      data_factory_id: azurermDataFactoryExample.id,
      description: "example description",
      eventgrid_topic_id: azurermEventgridTopicExample.id,
      events: ["event1", "event2"],
      name: "example",
      pipeline: [
        {
          name: azurermDataFactoryPipelineExample.name,
          parameters: [
            {
              Env: "Prod",
            },
          ],
        },
      ],
      subject_begins_with: "abc",
      subject_ends_with: "xyz",
    }
  );
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
azurermDataFactoryTriggerCustomEventExample.overrideLogicalId("example");

Argument Reference

The following arguments are supported:

  • name - (Required) Specifies the name of the Data Factory Custom Event Trigger. Changing this forces a new resource to be created.

  • dataFactoryId - (Required) The ID of Data Factory in which to associate the Trigger with. Changing this forces a new resource.

  • eventgridTopicId - (Required) The ID of Event Grid Topic in which event will be listened. Changing this forces a new resource.

  • events - (Required) List of events that will fire this trigger. At least one event must be specified.

  • pipeline - (Required) One or more pipeline blocks as defined below.

  • activated - (Optional) Specifies if the Data Factory Custom Event Trigger is activated. Defaults to true.

  • additionalProperties - (Optional) A map of additional properties to associate with the Data Factory Custom Event Trigger.

  • annotations - (Optional) List of tags that can be used for describing the Data Factory Custom Event Trigger.

  • description - (Optional) The description for the Data Factory Custom Event Trigger.

  • subjectBeginsWith - (Optional) The pattern that event subject starts with for trigger to fire.

  • subjectEndsWith - (Optional) The pattern that event subject ends with for trigger to fire.

\~> Note: At least one of subjectBeginsWith and subjectEndsWith must be set.


A pipeline block supports the following:

  • name - (Required) The Data Factory Pipeline name that the trigger will act on.

  • parameters - (Optional) The Data Factory Pipeline parameters that the trigger will act on.

Attributes Reference

The following attributes are exported:

  • id - The ID of the Data Factory Custom Event Trigger.

Timeouts

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

  • create - (Defaults to 30 minutes) Used when creating the Data Factory Custom Event Trigger.
  • update - (Defaults to 30 minutes) Used when updating the Data Factory Custom Event Trigger.
  • read - (Defaults to 5 minutes) Used when retrieving the Data Factory Custom Event Trigger.
  • delete - (Defaults to 30 minutes) Used when deleting the Data Factory Custom Event Trigger.

Import

Data Factory Custom Event Trigger can be imported using the resourceId, e.g.

terraform import azurerm_data_factory_trigger_custom_event.example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/example/providers/Microsoft.DataFactory/factories/example/triggers/example