Skip to content

Commit

Permalink
Update outdated terraform files to fix integration tests (#578)
Browse files Browse the repository at this point in the history
  • Loading branch information
karanpopat authored Mar 14, 2023
1 parent b23bd6e commit 8a18587
Show file tree
Hide file tree
Showing 9 changed files with 29 additions and 30 deletions.
11 changes: 6 additions & 5 deletions azure-test/tests/azure_batch_account/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,12 @@ resource "azurerm_storage_account" "named_test_resource" {
}

resource "azurerm_batch_account" "named_test_resource" {
name = var.resource_name
resource_group_name = azurerm_resource_group.named_test_resource.name
location = azurerm_resource_group.named_test_resource.location
pool_allocation_mode = "BatchService"
storage_account_id = azurerm_storage_account.named_test_resource.id
name = var.resource_name
resource_group_name = azurerm_resource_group.named_test_resource.name
location = azurerm_resource_group.named_test_resource.location
pool_allocation_mode = "BatchService"
storage_account_id = azurerm_storage_account.named_test_resource.id
storage_account_authentication_mode = "StorageKeys"
}

output "resource_aka" {
Expand Down
15 changes: 7 additions & 8 deletions azure-test/tests/azure_cosmosdb_mongo_database/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -38,20 +38,19 @@ resource "azurerm_resource_group" "named_test_resource" {
}

resource "azurerm_cosmosdb_account" "named_test_resource" {
name = var.resource_name
location = azurerm_resource_group.named_test_resource.location
resource_group_name = azurerm_resource_group.named_test_resource.name
offer_type = "Standard"
kind = "MongoDB"
name = var.resource_name
location = azurerm_resource_group.named_test_resource.location
resource_group_name = azurerm_resource_group.named_test_resource.name
offer_type = "Standard"
kind = "MongoDB"
enable_automatic_failover = false

consistency_policy {
consistency_level = "BoundedStaleness"
}

geo_location {
prefix = "turbot-cosmos-db"
location = azurerm_resource_group.named_test_resource.location
location = azurerm_resource_group.named_test_resource.location
failover_priority = 0
}
}
Expand All @@ -66,7 +65,7 @@ resource "null_resource" "delay" {
}

resource "azurerm_cosmosdb_mongo_database" "named_test_resource" {
depends_on = [null_resource.delay]
depends_on = [null_resource.delay]
name = var.resource_name
resource_group_name = azurerm_resource_group.named_test_resource.name
account_name = azurerm_cosmosdb_account.named_test_resource.name
Expand Down
19 changes: 9 additions & 10 deletions azure-test/tests/azure_cosmosdb_sql_database/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -38,22 +38,21 @@ resource "azurerm_resource_group" "named_test_resource" {
}

resource "azurerm_cosmosdb_account" "named_test_resource" {
name = var.resource_name
location = azurerm_resource_group.named_test_resource.location
resource_group_name = azurerm_resource_group.named_test_resource.name
offer_type = "Standard"
kind = "GlobalDocumentDB"
name = var.resource_name
location = azurerm_resource_group.named_test_resource.location
resource_group_name = azurerm_resource_group.named_test_resource.name
offer_type = "Standard"
kind = "GlobalDocumentDB"
enable_automatic_failover = true

consistency_policy {
consistency_level = "BoundedStaleness"
consistency_level = "BoundedStaleness"
max_interval_in_seconds = 600
max_staleness_prefix = 200000
max_staleness_prefix = 200000
}

geo_location {
prefix = "turbot-cosmos-db"
location = azurerm_resource_group.named_test_resource.location
location = azurerm_resource_group.named_test_resource.location
failover_priority = 0
}
}
Expand All @@ -68,7 +67,7 @@ resource "null_resource" "delay" {
}

resource "azurerm_cosmosdb_sql_database" "named_test_resource" {
depends_on = [null_resource.delay]
depends_on = [null_resource.delay]
name = var.resource_name
resource_group_name = azurerm_resource_group.named_test_resource.name
account_name = azurerm_cosmosdb_account.named_test_resource.name
Expand Down
3 changes: 2 additions & 1 deletion azure-test/tests/azure_firewall/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@ resource "azurerm_firewall" "named_test_resource" {
name = var.resource_name
location = azurerm_resource_group.named_test_resource.location
resource_group_name = azurerm_resource_group.named_test_resource.name
sku_tier = "Standard"
sku_name = "AZFW_VNet"
sku_tier = "Standard"

ip_configuration {
name = var.resource_name
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
{
"id": "{{ output.resource_id.value }}",
"name": "{{ resourceName }}",
"sku_name": "Standard_D13_v2",
"sku_name": "Standard_E2a_v4",
"uri": "{{ output.cluster_uri.value }}"
}
]
2 changes: 1 addition & 1 deletion azure-test/tests/azure_kusto_cluster/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ resource "azurerm_kusto_cluster" "named_test_resource" {
resource_group_name = azurerm_resource_group.named_test_resource.name

sku {
name = "Standard_D13_v2"
name = "Standard_E2a_v4"
capacity = 2
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ resource "azurerm_log_analytics_workspace" "named_test_resource" {
}

resource "azurerm_network_watcher_flow_log" "named_test_resource" {
name = var.resource_name
network_watcher_name = azurerm_network_watcher.named_test_resource.name
resource_group_name = azurerm_resource_group.named_test_resource.name

Expand Down
4 changes: 1 addition & 3 deletions azure-test/tests/azure_subscription/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@ variable "azure_subscription" {

provider "azuread" {
# Cannot be passed as a variable
environment = var.azure_environment
subscription_id = var.azure_subscription
features {}
environment = var.azure_environment
}

data "azuread_client_config" "current" {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ resource "azurerm_subnet" "named_test_resource" {
name = "GatewaySubnet"
resource_group_name = azurerm_resource_group.named_test_resource.name
virtual_network_name = azurerm_virtual_network.named_test_resource.name
address_prefix = "10.0.1.0/24"
address_prefixes = ["10.0.1.0/24"]
}

resource "azurerm_public_ip" "named_test_resource" {
Expand Down

0 comments on commit 8a18587

Please sign in to comment.