cosmosdb

Azure/cosmosdb/azurerm

Terraform Module HCL AZURERM

Azure Cosmos DB Terraform Module and Samples

Install
module "cosmosdb" {
source = "Azure/cosmosdb/azurerm"
version = "1.0.0"
}
⭐ Source on GitHub 📦 Registry page
README

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

Inputs (46)
NameTypeDescriptionDefault
cosmos_apistring required
resource_group_namestringName of the azure resource group. required
storage_accountmap(object({ storage_accouStorage account parameters for one or more storage account to send daignostic lo{}
azure_dc_accesslist(string)List of ip address to enable the Accept connections from within public Azure dat[ "0.0.0.0" ]
gremlin_graphsmap(object({ graph_name List of Cosmos DB Gremlin Graph to create. Some parameters are inherited from co{}
private_endpointmap(object({ name Parameters for private endpoint creation{}
backup_storage_redundancystringhe storage redundancy which is used to indicate type of backup residency. This i"Geo"
key_vault_namestringName of the existing key vault. It is needed for encryption using customer manag""
firewall_iplist(string)List of ip address to allow access from the internet or on-premisis network.[]
consistency_levelstringThe Consistency Level to use for this CosmosDB Account - can be either BoundedSt"Eventual"
auto_failoverboolEnable automatic fail over for this Cosmos DB account - can be either true or fafalse
free_tierboolEnable Free Tier pricing option for this Cosmos DB account - can be either true false
multi_region_writeboolEnable multiple write locations for this Cosmos DB accountfalse
cassandra_tablesmap(object({ table_name List of Cosmos DB Cassandra tables to create. Some parameters are inherited from{}
public_network_access_enabledboolEnable public network access to cosmos dbfalse
ip_firewall_enabledboolEnable ip firewwall to allow connection to this cosmosdb from client's machine atrue
environmentstringName of the environment. Example dev, test, qa, cert, prod etc...."dev"
key_vault_rg_namestringName of the resource group in which key vault exists.""
key_vault_key_namestringName of the existing key in key vault. It is needed for encryption using custome""
mongo_dbsmap(object({ db_name Map of Cosmos DB Mongo DBs to create. Some parameters are inherited from cosmos {}
mongo_db_collectionsmap(object({ collection_naList of Cosmos DB Mongo collections to create. Some parameters are inherited fro{}
pe_subresourcemap(any)Map of subresources to choose appropriate Private Endpoint sub resource for DB A{ "cassandra": "Cassandra", "gremlin
… and 6 more inputs
Outputs (19)
cosmosdb_id — Cosmos DB Account ID
cosmosdb_secondary_key — Cosmos DB Secondary Keys
gremlin_graph_id — Gremlin API Graph IDs
mongo_db_collection_id — Mongo API Collection IDs
cosmosdb_read_endpoint — Cosmos DB Read Endpoint
cosmosdb_secondary_readonly_key — Cosmos DB Secondary Read Only Keys
cosmosdb_systemassigned_identity — Cosmos DB System Assigned Identity (Tenant ID and Principal ID)
table_id — Table API Table IDs
cosmosdb_primary_readonly_key — Cosmos DB Primary Read Only Keys
sql_db_id — SQL API DB IDs
sql_containers_id — SQL API Container IDs
gremlin_db_id — Gremlin API DB IDs
mongo_db_id — Mongo API DB IDs
cosmosdb_endpoint — Cosmos DB Endpoint
cosmosdb_write_endpoint — Cosmos DB Write Endpoint
cosmosdb_primary_key — Cosmos DB Primary Keys
cosmosdb_connection_strings — Cosmos DB Connection Strings
cassandra_keyspace_id — Cassandra API Keyspace IDs
cassandra_table_id — Cassandra API Table IDs
Resources (13)
azurerm_cosmosdb_accountazurerm_cosmosdb_cassandra_keyspaceazurerm_cosmosdb_cassandra_tableazurerm_cosmosdb_gremlin_databaseazurerm_cosmosdb_gremlin_graphazurerm_cosmosdb_mongo_collectionazurerm_cosmosdb_mongo_databaseazurerm_cosmosdb_sql_containerazurerm_cosmosdb_sql_databaseazurerm_cosmosdb_tableazurerm_monitor_diagnostic_settingazurerm_private_endpointrandom_integer
Details
FrameworkTerraform Module
LanguageHCL
Version1.0.0
Cloud AZURERM
★ Stars16
Forks16
Total downloads106.3k
Inputs46
Outputs19
Resources13
Examples13
LicenseMIT
NamespaceAzure
Updated