cosmosdb/

directory
v0.0.0-...-5957262 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 29, 2022 License: Apache-2.0

README

Module Azure Cosmos DB

Azure Cosmos DB is Microsoft's globally distributed, multi-model database service. With a click of a button, Cosmos DB enables you to elastically and independently scale throughput and storage across any number of Azure regions worldwide. You can elastically scale throughput and storage, and take advantage of fast, single-digit-millisecond data access using your favorite API including SQL, MongoDB, Cassandra, Tables, or Gremlin. Cosmos DB provides comprehensive service level agreements (SLAs) for throughput, latency, availability, and consistency guarantees, something no other database service offers.

More information for Azure Cosmos DB can be found here

Please click the link to get additional details on settings in Terraform for Azure Cosmos DB.

Usage

Module Definitions
  • Cosmos DB Module : infra/modules/providers/azure/cosmosdb
module "cosmosdb" {
  source                      = "github.com/Microsoft/cobalt/infra/modules/providers/azure/cosmosdb"
  cosmosdb_name               = "test-name-cosmosdb"
  resource_group_name         = ${azurerm_resource_group.cosmosdb.name} 
  cosmosdb_kind               = "test-kind-cosmosdb"
  cosmosdb_automatic_failover = true | false
  consistency_level           = "BoundedStaleness" | "Eventual" | "Session" | "Strong" | "ConsistentPrefix"
  primary_replica_location    = "test-azure-region"
  databases                   = [
    {
      name       = "office"
      throughput = 400
    }
  ]
  sql_collections             = [
    {
      name               = "employees"
      database_name      = "office"
      partition_key_path = "/location_id"
      throughput         = 400
    }
  ]
}

Argument Reference

Supported arguments for this module are available in variables.tf.

Outputs

Once the deployments are completed successfully, the output for the current module will be in the format mentioned below:

output "properties" {
  description = "Properties of the deployed CosmosDB account."
  type        = object({
    cosmosdb = object({
      id                     = string
      endpoint               = string
      primary_master_key     = string
      connection_strings     = string
    })
  })
}

output "resource_group_name" {
  description = "The name of the CosmosDB account."
  type        = string
}

output "account_name" {
  description = "Properties of the deployed cluster"
  type        = string
}

License

Copyright © Microsoft Corporation

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL