Azure CosmosDB (DocumentDB) SQL Stored Procedure
This page shows how to write Terraform and Azure Resource Manager for CosmosDB (DocumentDB) SQL Stored Procedure and write them securely.
azurerm_cosmosdb_sql_stored_procedure (Terraform)
The SQL Stored Procedure in CosmosDB (DocumentDB) can be configured in Terraform with the resource name azurerm_cosmosdb_sql_stored_procedure
. The following sections describe 2 examples of how to use the resource and its parameters.
Example Usage from GitHub
resource "azurerm_cosmosdb_sql_stored_procedure" "nextForState" {
name = "nextForState"
resource_group_name = azurerm_cosmosdb_account.edc-cosmos.resource_group_name
account_name = azurerm_cosmosdb_account.edc-cosmos.name
database_name = azurerm_cosmosdb_sql_database.edc-database.name
container_name = azurerm_cosmosdb_sql_container.transferprocess.name
resource "azurerm_cosmosdb_sql_stored_procedure" "nextForState" {
name = "nextForState"
resource_group_name = azurerm_cosmosdb_account.dagx-cosmos.resource_group_name
account_name = azurerm_cosmosdb_account.dagx-cosmos.name
database_name = azurerm_cosmosdb_sql_database.dagx-database.name
container_name = azurerm_cosmosdb_sql_container.transferprocess.name
Parameters
-
account_name
required - string -
body
required - string -
container_name
required - string -
database_name
required - string -
id
optional computed - string -
name
required - string -
resource_group_name
required - string -
timeouts
single block
Explanation in Terraform Registry
Manages a SQL Stored Procedure within a Cosmos DB Account SQL Database.
Microsoft.DocumentDB/databaseAccounts/sqlDatabases/containers/storedProcedures (Azure Resource Manager)
The databaseAccounts/sqlDatabases/containers/storedProcedures in Microsoft.DocumentDB can be configured in Azure Resource Manager with the resource name Microsoft.DocumentDB/databaseAccounts/sqlDatabases/containers/storedProcedures
. 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 storedProcedure 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 Stored Procedure
id
required - stringName of the Cosmos DB SQL storedProcedure
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
Frequently asked questions
What is Azure CosmosDB (DocumentDB) SQL Stored Procedure?
Azure CosmosDB (DocumentDB) SQL Stored Procedure is a resource for CosmosDB (DocumentDB) of Microsoft Azure. Settings can be wrote in Terraform.
Where can I find the example code for the Azure CosmosDB (DocumentDB) SQL Stored Procedure?
For Terraform, the mindsphere/DataSpaceConnector and microsoft/Data-Appliance-GX source code examples are useful. See the Terraform Example section for further details.