Created
January 14, 2021 13:55
-
-
Save stvdilln/b72d0b2bfd93a852d43fe30288128369 to your computer and use it in GitHub Desktop.
cosmos-db account module source
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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