azurermEventgridTopic
Manages an EventGrid Topic
\~> Note: at this time EventGrid Topic's are only available in a limited number of regions.
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 azurermEventgridTopicExample = new azurerm.eventgridTopic.EventgridTopic(
this,
"example_1",
{
location: azurermResourceGroupExample.location,
name: "my-eventgrid-topic",
resource_group_name: azurermResourceGroupExample.name,
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.*/
azurermEventgridTopicExample.overrideLogicalId("example");
Argument Reference
The following arguments are supported:
-
name- (Required) Specifies the name of the EventGrid Topic resource. Changing this forces a new resource to be created. -
resourceGroupName- (Required) The name of the resource group in which the EventGrid Topic exists. Changing this forces a new resource to be created. -
location- (Required) Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. -
identity- (Optional) Anidentityblock as defined below. -
inputSchema- (Optional) Specifies the schema in which incoming events will be published to this domain. Allowed values arecloudEventSchemaV10,customEventSchema, oreventGridSchema. Defaults toeventGridSchema. Changing this forces a new resource to be created. -
inputMappingFields- (Optional) AinputMappingFieldsblock as defined below. Changing this forces a new resource to be created. -
inputMappingDefaultValues- (Optional) AinputMappingDefaultValuesblock as defined below. Changing this forces a new resource to be created. -
publicNetworkAccessEnabled- (Optional) Whether or not public network access is allowed for this server. Defaults totrue. -
localAuthEnabled- (Optional) Whether local authentication methods is enabled for the EventGrid Topic. Defaults totrue. -
inboundIpRule- (Optional) One or moreinboundIpRuleblocks as defined below. -
tags- (Optional) A mapping of tags to assign to the resource.
A identity block supports the following:
-
type- (Required) Specifies the type of Managed Service Identity that should be configured on this Event Grid Topic. Possible values aresystemAssigned,userAssigned. -
identityIds- (Optional) Specifies a list of User Assigned Managed Identity IDs to be assigned to this Event Grid Topic.
\~> NOTE: This is required when type is set to userAssigned
\~> NOTE: When type is set to systemAssigned, The assigned principalId and tenantId can be retrieved after the Event Grid Topic has been created. More details are available below.
A inputMappingFields block supports the following:
-
id- (Optional) Specifies the id of the EventGrid Event to associate with the domain. Changing this forces a new resource to be created. -
topic- (Optional) Specifies the topic of the EventGrid Event to associate with the domain. Changing this forces a new resource to be created. -
eventType- (Optional) Specifies the event type of the EventGrid Event to associate with the domain. Changing this forces a new resource to be created. -
eventTime- (Optional) Specifies the event time of the EventGrid Event to associate with the domain. Changing this forces a new resource to be created. -
dataVersion- (Optional) Specifies the data version of the EventGrid Event to associate with the domain. Changing this forces a new resource to be created. -
subject- (Optional) Specifies the subject of the EventGrid Event to associate with the domain. Changing this forces a new resource to be created.
A inputMappingDefaultValues block supports the following:
-
eventType- (Optional) Specifies the default event type of the EventGrid Event to associate with the domain. Changing this forces a new resource to be created. -
dataVersion- (Optional) Specifies the default data version of the EventGrid Event to associate with the domain. Changing this forces a new resource to be created. -
subject- (Optional) Specifies the default subject of the EventGrid Event to associate with the domain. Changing this forces a new resource to be created.
A inboundIpRule block supports the following:
-
ipMask- (Required) The IP mask (CIDR) to match on. -
action- (Optional) The action to take when the rule is matched. Possible values areallow.
Attributes Reference
The following attributes are exported:
-
id- The EventGrid Topic ID. -
endpoint- The Endpoint associated with the EventGrid Topic. -
primaryAccessKey- The Primary Shared Access Key associated with the EventGrid Topic. -
secondaryAccessKey- The Secondary Shared Access Key associated with the EventGrid Topic. -
identity- Anidentityblock as defined below.
An identity block exports the following:
-
principalId- The Principal ID associated with this Managed Service Identity. -
tenantId- The Tenant ID associated with this Managed Service Identity.
Timeouts
The timeouts block allows you to specify timeouts for certain actions:
create- (Defaults to 30 minutes) Used when creating the EventGrid Topic.update- (Defaults to 30 minutes) Used when updating the EventGrid Topic.read- (Defaults to 5 minutes) Used when retrieving the EventGrid Topic.delete- (Defaults to 30 minutes) Used when deleting the EventGrid Topic.
Import
EventGrid Topic's can be imported using the resourceId, e.g.