From 2682551234ad9b38c0557e947a15217b3c380d6b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krist=C3=B3f=20Torma?= Date: Mon, 1 Aug 2022 22:56:22 +0200 Subject: [PATCH] separate rg --- azure-cosmosdb.tf | 4 ++-- azure-resourcegroups.tf | 7 ++++++- azure-staticwebapps.tf | 4 ++-- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/azure-cosmosdb.tf b/azure-cosmosdb.tf index cc3a0c8..4df6dab 100644 --- a/azure-cosmosdb.tf +++ b/azure-cosmosdb.tf @@ -1,7 +1,7 @@ resource "azurerm_cosmosdb_account" "cosmodb" { name = "cosmosdbazurefunction" - location = "eastus" - resource_group_name = azurerm_resource_group.rg-cosmostest-staticwebapp-cosmosdb.name + location = azurerm_resource_group.rg-cosmostest-cosmosdb.location + resource_group_name = azurerm_resource_group.rg-cosmostest-cosmosdb.name offer_type = "Standard" kind = "GlobalDocumentDB" enable_free_tier = true diff --git a/azure-resourcegroups.tf b/azure-resourcegroups.tf index 9f08e16..8c562d2 100644 --- a/azure-resourcegroups.tf +++ b/azure-resourcegroups.tf @@ -33,7 +33,12 @@ resource "azurerm_resource_group" "rg-hhv-staticwebapp" { location = "westeurope" } -resource "azurerm_resource_group" "rg-cosmostest-staticwebapp-cosmosdb" { +resource "azurerm_resource_group" "rg-cosmostest-staticwebapp" { name = "rg-cosmostest-staticwebapp-cosmosdb" location = "westeurope" } + +resource "azurerm_resource_group" "rg-cosmostest-cosmosdb" { + name = "rg-cosmostest-cosmosdb" + location = "westeurope" +} \ No newline at end of file diff --git a/azure-staticwebapps.tf b/azure-staticwebapps.tf index b08e16c..f749652 100644 --- a/azure-staticwebapps.tf +++ b/azure-staticwebapps.tf @@ -72,8 +72,8 @@ resource "azurerm_static_site_custom_domain" "hhvtormakristofeu" { resource "azurerm_static_site" "cosmostest" { name = "cosmostest" - resource_group_name = azurerm_resource_group.rg-cosmostest-staticwebapp-cosmosdb.name - location = azurerm_resource_group.rg-cosmostest-staticwebapp-cosmosdb.location + resource_group_name = azurerm_resource_group.rg-cosmostest-staticwebapp.name + location = azurerm_resource_group.rg-cosmostest-staticwebapp.location } resource "azurerm_static_site_custom_domain" "cosmostesttormakristofeu" {