diff --git a/internal/services/compute/linux_virtual_machine_scale_set_resource_network_test.go b/internal/services/compute/linux_virtual_machine_scale_set_resource_network_test.go index 227fad95a880..3423ee0421cc 100644 --- a/internal/services/compute/linux_virtual_machine_scale_set_resource_network_test.go +++ b/internal/services/compute/linux_virtual_machine_scale_set_resource_network_test.go @@ -638,6 +638,10 @@ resource "azurerm_application_security_group" "test" { name = "acctestasg-%d" location = azurerm_resource_group.test.location resource_group_name = azurerm_resource_group.test.name + + lifecycle { + create_before_destroy = true + } } resource "azurerm_linux_virtual_machine_scale_set" "test" { @@ -686,12 +690,20 @@ resource "azurerm_application_security_group" "test" { name = "acctestasg-%d" location = azurerm_resource_group.test.location resource_group_name = azurerm_resource_group.test.name + + lifecycle { + create_before_destroy = true + } } resource "azurerm_application_security_group" "other" { name = "acctestasg2-%d" location = azurerm_resource_group.test.location resource_group_name = azurerm_resource_group.test.name + + lifecycle { + create_before_destroy = true + } } resource "azurerm_linux_virtual_machine_scale_set" "test" { diff --git a/internal/services/compute/windows_virtual_machine_scale_set_resource_network_test.go b/internal/services/compute/windows_virtual_machine_scale_set_resource_network_test.go index 60f0a0377a17..4a01ada026e2 100644 --- a/internal/services/compute/windows_virtual_machine_scale_set_resource_network_test.go +++ b/internal/services/compute/windows_virtual_machine_scale_set_resource_network_test.go @@ -639,6 +639,10 @@ resource "azurerm_application_security_group" "test" { name = "acctestasg-%d" location = azurerm_resource_group.test.location resource_group_name = azurerm_resource_group.test.name + + lifecycle { + create_before_destroy = true + } } resource "azurerm_windows_virtual_machine_scale_set" "test" { @@ -685,12 +689,20 @@ resource "azurerm_application_security_group" "test" { name = "acctestasg-%d" location = azurerm_resource_group.test.location resource_group_name = azurerm_resource_group.test.name + + lifecycle { + create_before_destroy = true + } } resource "azurerm_application_security_group" "other" { name = "acctestasg2-%d" location = azurerm_resource_group.test.location resource_group_name = azurerm_resource_group.test.name + + lifecycle { + create_before_destroy = true + } } resource "azurerm_windows_virtual_machine_scale_set" "test" {