azurermEventgridDomain
Manages an EventGrid Domain
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 azurermEventgridDomainExample =
new azurerm.eventgridDomain.EventgridDomain(this, "example_1", {
location: azurermResourceGroupExample.location,
name: "my-eventgrid-domain",
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.*/
azurermEventgridDomainExample.overrideLogicalId("example");
Argument Reference
The following arguments are supported:
-
name- (Required) Specifies the name of the EventGrid Domain resource. Changing this forces a new resource to be created. -
resourceGroupName- (Required) The name of the resource group in which the EventGrid Domain 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 Domain. Defaults totrue. -
autoCreateTopicWithFirstSubscription- (Optional) Whether to create the domain topic when the first event subscription at the scope of the domain topic is created. Defaults totrue. -
autoDeleteTopicWithLastSubscription- (Optional) Whether to delete the domain topic when the last event subscription at the scope of the domain topic is deleted. 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 Domain. Possible values aresystemAssigned,userAssigned. -
identityIds- (Optional) Specifies a list of User Assigned Managed Identity IDs to be assigned to this Event Grid Domain.
\~> 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 Domain 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 ID of the EventGrid Domain. -
endpoint- The Endpoint associated with the EventGrid Domain. -
primaryAccessKey- The Primary Shared Access Key associated with the EventGrid Domain. -
secondaryAccessKey- The Secondary Shared Access Key associated with the EventGrid Domain. -
identity- Anidentityblock as defined below, which contains the Managed Service Identity information for this Event Grid Domain.
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 Domain.update- (Defaults to 30 minutes) Used when updating the EventGrid Domain.read- (Defaults to 5 minutes) Used when retrieving the EventGrid Domain.delete- (Defaults to 30 minutes) Used when deleting the EventGrid Domain.
Import
EventGrid Domains can be imported using the resourceId, e.g.