cosmosdb
Azure/cosmosdb/azurerm
Azure Cosmos DB Terraform Module and Samples
Getting Started The following cosmos db terraform module provides configurable baseline service capabilities to help simplify infrastructure as code deployment and accelerate workload enablement. The module is separate into relevant subresource groupings based on cosmos db api requirements. The input variables specified for the module will provision the appropriate database/api instances. This module does not create dependent resources for certain configurations, these resources should be provision external to the module. Ex. the module will not create a key vault for customer managed key encryption, this should be created external to the module and passed in as a parameter. Please see the examples for different configurations. Important: Please specify only the required database/api param
| Name | Type | Description | Default |
|---|---|---|---|
| cosmos_api | string | required | |
| resource_group_name | string | Name of the azure resource group. | required |
| storage_account | map(object({ storage_accou | Storage account parameters for one or more storage account to send daignostic lo | {} |
| azure_dc_access | list(string) | List of ip address to enable the Accept connections from within public Azure dat | [
"0.0.0.0"
] |
| gremlin_graphs | map(object({ graph_name | List of Cosmos DB Gremlin Graph to create. Some parameters are inherited from co | {} |
| private_endpoint | map(object({ name | Parameters for private endpoint creation | {} |
| backup_storage_redundancy | string | he storage redundancy which is used to indicate type of backup residency. This i | "Geo" |
| key_vault_name | string | Name of the existing key vault. It is needed for encryption using customer manag | "" |
| firewall_ip | list(string) | List of ip address to allow access from the internet or on-premisis network. | [] |
| consistency_level | string | The Consistency Level to use for this CosmosDB Account - can be either BoundedSt | "Eventual" |
| auto_failover | bool | Enable automatic fail over for this Cosmos DB account - can be either true or fa | false |
| free_tier | bool | Enable Free Tier pricing option for this Cosmos DB account - can be either true | false |
| multi_region_write | bool | Enable multiple write locations for this Cosmos DB account | false |
| cassandra_tables | map(object({ table_name | List of Cosmos DB Cassandra tables to create. Some parameters are inherited from | {} |
| public_network_access_enabled | bool | Enable public network access to cosmos db | false |
| ip_firewall_enabled | bool | Enable ip firewwall to allow connection to this cosmosdb from client's machine a | true |
| environment | string | Name of the environment. Example dev, test, qa, cert, prod etc.... | "dev" |
| key_vault_rg_name | string | Name of the resource group in which key vault exists. | "" |
| key_vault_key_name | string | Name of the existing key in key vault. It is needed for encryption using custome | "" |
| mongo_dbs | map(object({ db_name | Map of Cosmos DB Mongo DBs to create. Some parameters are inherited from cosmos | {} |
| mongo_db_collections | map(object({ collection_na | List of Cosmos DB Mongo collections to create. Some parameters are inherited fro | {} |
| pe_subresource | map(any) | Map of subresources to choose appropriate Private Endpoint sub resource for DB A | {
"cassandra": "Cassandra",
"gremlin |
| … and 6 more inputs | |||
cosmosdb_id — Cosmos DB Account IDcosmosdb_secondary_key — Cosmos DB Secondary Keysgremlin_graph_id — Gremlin API Graph IDsmongo_db_collection_id — Mongo API Collection IDscosmosdb_read_endpoint — Cosmos DB Read Endpointcosmosdb_secondary_readonly_key — Cosmos DB Secondary Read Only Keyscosmosdb_systemassigned_identity — Cosmos DB System Assigned Identity (Tenant ID and Principal ID)table_id — Table API Table IDscosmosdb_primary_readonly_key — Cosmos DB Primary Read Only Keyssql_db_id — SQL API DB IDssql_containers_id — SQL API Container IDsgremlin_db_id — Gremlin API DB IDsmongo_db_id — Mongo API DB IDscosmosdb_endpoint — Cosmos DB Endpointcosmosdb_write_endpoint — Cosmos DB Write Endpointcosmosdb_primary_key — Cosmos DB Primary Keyscosmosdb_connection_strings — Cosmos DB Connection Stringscassandra_keyspace_id — Cassandra API Keyspace IDscassandra_table_id — Cassandra API Table IDs