Skip to content

Instantly share code, notes, and snippets.

@stvdilln
Created January 14, 2021 13:55
Show Gist options
  • Save stvdilln/b72d0b2bfd93a852d43fe30288128369 to your computer and use it in GitHub Desktop.
Save stvdilln/b72d0b2bfd93a852d43fe30288128369 to your computer and use it in GitHub Desktop.
cosmos-db account module source
resource "azurerm_cosmosdb_account" "account" {
name = "${var.service_settings.name}-${random_string.random.result}"
location = var.context.location
resource_group_name = var.context.resource_group_name
offer_type = var.service_settings.tier
kind = var.service_settings.kind
enable_automatic_failover = true
consistency_policy {
consistency_level = var.service_settings.consistency_level
}
geo_location {
location = var.service_settings.failover_location
failover_priority = 1
}
geo_location {
location = var.context.location
failover_priority = 0
}
tags = {
app = var.context.application_name
env = var.context.environment_name
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment