Azure Messaging Topic
This page shows how to write Terraform and Azure Resource Manager for Messaging Topic and write them securely.
azurerm_eventgrid_topic (Terraform)
The Topic in Messaging can be configured in Terraform with the resource name azurerm_eventgrid_topic. The following sections describe 10 examples of how to use the resource and its parameters.
Example Usage from GitHub
resource "azurerm_eventgrid_topic" "event_grid_topic" {
name = var.name
location = var.location
resource_group_name = var.resource_group_name
resource "azurerm_eventgrid_topic" "TollboothEventGrid" {
name = var.TollboothEventGrid
location = var.location
resource_group_name = var.resource_group_name
tags = {
resource "azurerm_eventgrid_topic" "runway_ingestion_eventgrid" {
name = local.env.runway_event_grid_name
location = local.env.location
resource_group_name = local.env.ingest_resource_group_name
tags = {
resource "azurerm_eventgrid_topic" "topic" {
name = var.name
location = var.location
resource_group_name = var.resource_group_name
tags = {
resource "azurerm_eventgrid_topic" "default-event-grid" {
name = "default-eventgrid-topic"
location = var.v_location
resource_group_name = var.v_resource_group_name
tags = {
resource "azurerm_eventgrid_topic" "evnt_tpc" {
name = var.name
resource_group_name = var.resource_group_name
location = var.location
tags = var.tags
resource "azurerm_eventgrid_topic" "topic" {
name = var.service_settings.name
location = var.context.location
resource_group_name = var.context.resource_group_name
resource "azurerm_eventgrid_topic" "this" {
location = var.location
name = var.name
resource_group_name = var.resource_group_name
tags = var.tags
resource "azurerm_eventgrid_topic" "main" {
count = length(local.topics)
name = local.topics[count.index].name
resource_group_name = data.azurerm_resource_group.main.name
location = data.azurerm_resource_group.main.location
resource "azurerm_eventgrid_topic" "this" {
location = var.location
name = var.name
resource_group_name = var.resource_group_name
tags = var.tags
Parameters
-
endpointoptional computed - string -
idoptional computed - string -
inbound_ip_ruleoptional - list of object -
input_schemaoptional - string -
locationrequired - string -
namerequired - string -
primary_access_keyoptional computed - string -
public_network_access_enabledoptional - bool -
resource_group_namerequired - string -
secondary_access_keyoptional computed - string -
tagsoptional - map from string to string -
input_mapping_default_valueslist block-
data_versionoptional - string -
event_typeoptional - string -
subjectoptional - string
-
-
input_mapping_fieldslist block-
data_versionoptional - string -
event_timeoptional - string -
event_typeoptional - string -
idoptional - string -
subjectoptional - string -
topicoptional - string
-
-
timeoutssingle block
Explanation in Terraform Registry
Manages an EventGrid Topic
Note: at this time EventGrid Topic's are only available in a limited number of regions.
Microsoft.EventGrid/topics (Azure Resource Manager)
The topics in Microsoft.EventGrid can be configured in Azure Resource Manager with the resource name Microsoft.EventGrid/topics. The following sections describe how to use the resource and its parameters.
Example Usage from GitHub
An example could not be found in GitHub.
Parameters
apiVersionrequired - stringidentityoptionalprincipalIdoptional - stringThe principal ID of resource identity.
tenantIdoptional - stringThe tenant ID of resource.
typeoptional - stringThe type of managed identity used. The type 'SystemAssigned, UserAssigned' includes both an implicitly created identity and a set of user-assigned identities. The type 'None' will remove any identity.
userAssignedIdentitiesoptional - undefinedThe list of user identities associated with the resource. The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. This property is currently not used and reserved for future usage.
locationrequired - stringLocation of the resource.
namerequired - stringName of the topic.
propertiesrequireddisableLocalAuthoptional - booleanThis boolean is used to enable or disable local auth. Default value is false. When the property is set to true, only AAD token will be used to authenticate if user is allowed to publish to the topic.
inboundIpRulesoptional arrayactionoptional - stringAction to perform based on the match or no match of the IpMask.
ipMaskoptional - stringIP Address in CIDR notation e.g., 10.0.0.0/8.
inputSchemaoptional - stringThis determines the format that Event Grid should expect for incoming events published to the topic.
inputSchemaMappingoptionalpublicNetworkAccessoptional - stringThis determines if traffic is allowed over public network. By default it is enabled. You can further restrict to specific IPs by configuring <seealso cref="P:Microsoft.Azure.Events.ResourceProvider.Common.Contracts.TopicProperties.InboundIpRules" />.
tagsoptional - stringTags of the resource.
typerequired - string
Frequently asked questions
What is Azure Messaging Topic?
Azure Messaging Topic is a resource for Messaging of Microsoft Azure. Settings can be wrote in Terraform.
Where can I find the example code for the Azure Messaging Topic?
For Terraform, the KamenYovchev/terraform-azurerm-event-grid-topic, prajput35/Serverless-Terraform and adityareddy369/data-ingestion source code examples are useful. See the Terraform Example section for further details.