Azure CosmosDB (DocumentDB) SQL Trigger
This page shows how to write Terraform and Azure Resource Manager for CosmosDB (DocumentDB) SQL Trigger and write them securely.
azurerm_cosmosdb_sql_trigger (Terraform)
The SQL Trigger in CosmosDB (DocumentDB) can be configured in Terraform with the resource name azurerm_cosmosdb_sql_trigger
. 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
The following arguments are supported:
name
- (Required) The name which should be used for this SQL Trigger. Changing this forces a new SQL Trigger to be created.container_id
- (Required) The id of the Cosmos DB SQL Container to create the SQL Trigger within. Changing this forces a new SQL Trigger to be created.body
- (Required) Body of the Trigger.operation
- (Required) The operation the trigger is associated with. Possible values areAll
,Create
,Update
,Delete
andReplace
.type
- (Required) Type of the Trigger. Possible values arePre
andPost
.
In addition to the Arguments listed above - the following Attributes are exported:
id
- The ID of the SQL Trigger.
Explanation in Terraform Registry
Manages an SQL Trigger.
Microsoft.DocumentDB/databaseAccounts/sqlDatabases/containers/triggers (Azure Resource Manager)
The databaseAccounts/sqlDatabases/containers/triggers in Microsoft.DocumentDB can be configured in Azure Resource Manager with the resource name Microsoft.DocumentDB/databaseAccounts/sqlDatabases/containers/triggers
. 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
apiVersion
required - stringlocation
optional - stringThe location of the resource group to which the resource belongs.
name
required - stringCosmos DB trigger name.
properties
requiredoptions
optionalautoscaleSettings
optionalmaxThroughput
optional - integerRepresents maximum throughput, the resource can scale up to.
throughput
optional - integerRequest Units per second. For example, "throughput": 10000.
resource
requiredbody
optional - stringBody of the Trigger
id
required - stringName of the Cosmos DB SQL trigger
triggerOperation
optional - stringThe operation the trigger is associated with.
triggerType
optional - stringType of the Trigger.
tags
optional - stringTags are a list of key-value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 characters and value no greater than 256 characters. For example, the default experience for a template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", "Graph", "DocumentDB", and "MongoDB".
type
required - string