101-cosmos-db-analyticalstore patch (#143)

* change azurerm version

* add default values
This commit is contained in:
Dingjia Chen
2023-02-09 21:06:33 -06:00
committed by GitHub
parent 9a4284c545
commit a522c44462
3 changed files with 17 additions and 5 deletions

View File

@ -1,5 +1,5 @@
resource "azurerm_resource_group" "example" {
name = var.resource_group_name
name = "${random_pet.random_prefix.id}-rg"
location = var.location
}
@ -34,7 +34,7 @@ resource "azurerm_cosmosdb_sql_database" "example" {
throughput = var.throughput
}
resource "azurerm_cosmosdb_sql_container" "example" {
resource "azurerm_cosmosdb_sql_container" "main" {
name = var.sql_container_name
resource_group_name = azurerm_resource_group.example.name
account_name = azurerm_cosmosdb_account.example.name
@ -64,3 +64,7 @@ resource "azurerm_cosmosdb_sql_container" "example" {
paths = ["/definition/idlong", "/definition/idshort"]
}
}
resource "random_pet" "random_prefix" {
prefix = var.name_prefix
}