» Data Source: azurerm_cosmosdb_account

Use this data source to access the properties of an Azure CosmosDB (formally DocumentDB) Account.

» Example Usage

data "azurerm_cosmosdb_account" "test" {
  name                = "tfex-cosmosdb-account"
  resource_group_name = "tfex-cosmosdb-account-rg"
}

output "cosmosdb_account_endpoint" {
  value = "${data.azurerm_cosmosdb_account.jobs.endpoint}"
}

» Argument Reference

The following arguments are supported:

  • name - (Required) Specifies the name of the CosmosDB Account.

  • resource_group_name - (Required) Specifies the name of the resource group in which the CosmosDB Account resides.

» Attributes Reference

The following attributes are exported:

consistency_policy The current consistency Settings for this CosmosDB account with the following properties:

  • consistency_level - The Consistency Level used by this CosmosDB Account.
  • max_interval_in_seconds - The amount of staleness (in seconds) tolerated when the consistency level is Bounded Staleness.
  • max_staleness_prefix - The number of stale requests tolerated when the consistency level is Bounded Staleness.

geo_location The geographic locations data is replicated to with the following properties:

  • id - The ID of the location.
  • location - The name of the Azure region hosting replicated data.
  • priority - The locations fail over priority.

virtual_network_rule The virtual network subnets allowed to access this Cosmos DB account with the following properties: