Skip to content

moneyadviceservice/terraform-module-cosmos-db

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

terraform-module-cosmos-db

A Terraform module for the creation of Cosmos DB Accounts.

Requirements

No requirements.

Providers

Name Version
azurerm n/a

Modules

No modules.

Resources

Name Type
azurerm_cosmosdb_account.this resource
azurerm_cosmosdb_sql_container.this resource
azurerm_cosmosdb_sql_database.this resource

Inputs

Name Description Type Default Required
analytical_storage_schema The schema type of the Analytical Storage for this Cosmos DB account. string "WellDefined" no
backup_interval The interval in minutes between two backups. number 240 no
backup_retention The time in hours that each backup is retained. number 8 no
capability Configure capabilities to be enabled for this Cosmos DB account string null no
consistency_level (Required) The Consistency Level to use for this CosmosDB Account string "Session" no
containers List of Cosmos DB SQL Containers to create. Some parameters are inherited from the Cosmos account.
map(object({
container_name = string
db_name = string
partition_key_paths = list(string)
partition_key_version = number
container_throughout = number
container_max_throughput = number
default_ttl = number
analytical_storage_ttl = number
indexing_policy_settings = object({
indexing_mode = string
included_path = string
excluded_path = string
composite_indexes = map(object({
indexes = set(object({
path = string
order = string
}))
}))
spatial_indexes = map(object({
path = string
}))
})
unique_key = list(string)
conflict_resolution_policy = object({
mode = string
path = string
procedure = string
})
}))
{} no
databases Map of Cosmos DB SQL DBs to create. Some parameters are inherited from the Cosmos account.
map(object({
db_name = string
db_throughput = number
db_max_throughput = number
}))
{} no
enable_access_key_metadata_writes Optional) Is write operations on metadata resources (databases, containers, throughput) via account keys enabled? bool true no
enable_automatic_failover (Optional) Enable automatic failover for this Cosmos DB account. bool false no
env The environment to deploy to string n/a yes
kind (Optional) Specifies the Kind of CosmosDB to create string "GlobalDocumentDB" no
location n/a string "uksouth" no
name The name of your Cosmos DB Account string n/a yes
offer_type (Required) Specifies the Offer Type to use for this CosmosDB Account; currently, this can only be set to Standard. string "Standard" no
resource_group_name The resource group your Cosmos DB account will be assigned to string n/a yes
secondary_location n/a string "ukwest" no

Outputs

Name Description
cosmosdb_account_id n/a

About

A Terraform module for the creation of Cosmos DB Accounts

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages