From 3058862a62512892524e70dd2c8ae66003fa69a8 Mon Sep 17 00:00:00 2001 From: Ed Smith Date: Mon, 23 Sep 2024 08:08:41 +0000 Subject: [PATCH] tests(application_gateway): hashicorp#25973 update tests to use v2 SKUs as V1 is now deprecated See https://learn.microsoft.com/en-us/azure/application-gateway/v1-retirement#retirement-timelines --- .../application_gateway_resource_test.go | 151 +++++++++--------- 1 file changed, 74 insertions(+), 77 deletions(-) diff --git a/internal/services/network/application_gateway_resource_test.go b/internal/services/network/application_gateway_resource_test.go index a7be836c48ca..a0e511409e84 100644 --- a/internal/services/network/application_gateway_resource_test.go +++ b/internal/services/network/application_gateway_resource_test.go @@ -32,8 +32,8 @@ func TestAccApplicationGateway_basic(t *testing.T) { Config: r.basic(data), Check: acceptance.ComposeTestCheckFunc( check.That(data.ResourceName).ExistsInAzure(r), - check.That(data.ResourceName).Key("sku.0.name").HasValue("Standard_Small"), - check.That(data.ResourceName).Key("sku.0.tier").HasValue("Standard"), + check.That(data.ResourceName).Key("sku.0.name").HasValue("Standard_v2"), + check.That(data.ResourceName).Key("sku.0.tier").HasValue("Standard_v2"), check.That(data.ResourceName).Key("sku.0.capacity").HasValue("2"), check.That(data.ResourceName).Key("waf_configuration.#").HasValue("0"), ), @@ -713,8 +713,8 @@ func TestAccApplicationGateway_webApplicationFirewall(t *testing.T) { Config: r.webApplicationFirewall(data), Check: acceptance.ComposeTestCheckFunc( check.That(data.ResourceName).ExistsInAzure(r), - check.That(data.ResourceName).Key("sku.0.name").HasValue("WAF_Medium"), - check.That(data.ResourceName).Key("sku.0.tier").HasValue("WAF"), + check.That(data.ResourceName).Key("sku.0.name").HasValue("WAF_v2"), + check.That(data.ResourceName).Key("sku.0.tier").HasValue("WAF_v2"), check.That(data.ResourceName).Key("sku.0.capacity").HasValue("1"), check.That(data.ResourceName).Key("waf_configuration.0.enabled").HasValue("true"), check.That(data.ResourceName).Key("waf_configuration.0.firewall_mode").HasValue("Detection"), @@ -745,8 +745,8 @@ func TestAccApplicationGateway_connectionDraining(t *testing.T) { Config: r.basic(data), Check: acceptance.ComposeTestCheckFunc( check.That(data.ResourceName).ExistsInAzure(r), - check.That(data.ResourceName).Key("sku.0.name").HasValue("Standard_Small"), - check.That(data.ResourceName).Key("sku.0.tier").HasValue("Standard"), + check.That(data.ResourceName).Key("sku.0.name").HasValue("Standard_v2"), + check.That(data.ResourceName).Key("sku.0.tier").HasValue("Standard_v2"), check.That(data.ResourceName).Key("sku.0.capacity").HasValue("2"), check.That(data.ResourceName).Key("waf_configuration.#").HasValue("0"), acceptance.TestCheckNoResourceAttr(data.ResourceName, "backend_http_settings.0.connection_draining.0.enabled"), @@ -1332,9 +1332,6 @@ func TestAccApplicationGateway_basicSku(t *testing.T) { check.That(data.ResourceName).Key("sku.0.name").HasValue("Basic"), check.That(data.ResourceName).Key("sku.0.tier").HasValue("Basic"), check.That(data.ResourceName).Key("sku.0.capacity").IsNotEmpty(), - check.That(data.ResourceName).Key("autoscale_configuration").IsEmpty(), - check.That(data.ResourceName).Key("trusted_client_certificate").IsEmpty(), - check.That(data.ResourceName).Key("rewrite_rule_set").IsEmpty(), ), }, data.ImportStep(), @@ -1375,8 +1372,8 @@ resource "azurerm_application_gateway" "test" { location = azurerm_resource_group.test.location sku { - name = "Standard_Small" - tier = "Standard" + name = "Standard_v2" + tier = "Standard_v2" capacity = 2 } @@ -2209,8 +2206,8 @@ resource "azurerm_application_gateway" "test" { location = azurerm_resource_group.test.location sku { - name = "Standard_Small" - tier = "Standard" + name = "Standard_v2" + tier = "Standard_v2" capacity = 2 } @@ -2281,8 +2278,8 @@ resource "azurerm_application_gateway" "test" { enable_http2 = true sku { - name = "Standard_Small" - tier = "Standard" + name = "Standard_v2" + tier = "Standard_v2" capacity = 2 } @@ -2341,8 +2338,8 @@ resource "azurerm_application_gateway" "import" { location = azurerm_application_gateway.test.location sku { - name = "Standard_Small" - tier = "Standard" + name = "Standard_v2" + tier = "Standard_v2" capacity = 2 } @@ -2412,8 +2409,8 @@ resource "azurerm_application_gateway" "test" { location = azurerm_resource_group.test.location sku { - name = "Standard_Small" - tier = "Standard" + name = "Standard_v2" + tier = "Standard_v2" capacity = 2 } @@ -2837,8 +2834,8 @@ resource "azurerm_application_gateway" "test" { force_firewall_policy_association = %t sku { - name = "Standard_Small" - tier = "Standard" + name = "Standard_v2" + tier = "Standard_v2" capacity = 2 } @@ -3366,8 +3363,8 @@ resource "azurerm_application_gateway" "test" { location = azurerm_resource_group.test.location sku { - name = "Standard_Small" - tier = "Standard" + name = "Standard_v2" + tier = "Standard_v2" capacity = 2 } @@ -3545,8 +3542,8 @@ resource "azurerm_application_gateway" "test" { location = azurerm_resource_group.test.location sku { - name = "Standard_Small" - tier = "Standard" + name = "Standard_v2" + tier = "Standard_v2" capacity = 2 } @@ -3633,8 +3630,8 @@ resource "azurerm_application_gateway" "test" { location = azurerm_resource_group.test.location sku { - name = "Standard_Small" - tier = "Standard" + name = "Standard_v2" + tier = "Standard_v2" capacity = 2 } @@ -3730,8 +3727,8 @@ resource "azurerm_application_gateway" "test" { location = azurerm_resource_group.test.location sku { - name = "Standard_Small" - tier = "Standard" + name = "Standard_v2" + tier = "Standard_v2" capacity = 2 } @@ -3826,8 +3823,8 @@ resource "azurerm_application_gateway" "test" { location = azurerm_resource_group.test.location sku { - name = "Standard_Small" - tier = "Standard" + name = "Standard_v2" + tier = "Standard_v2" capacity = 2 } @@ -3924,8 +3921,8 @@ resource "azurerm_application_gateway" "test" { location = azurerm_resource_group.test.location sku { - name = "Standard_Small" - tier = "Standard" + name = "Standard_v2" + tier = "Standard_v2" capacity = 2 } @@ -4046,8 +4043,8 @@ resource "azurerm_application_gateway" "test" { location = azurerm_resource_group.test.location sku { - name = "Standard_Small" - tier = "Standard" + name = "Standard_v2" + tier = "Standard_v2" capacity = 2 } @@ -4149,8 +4146,8 @@ resource "azurerm_application_gateway" "test" { location = azurerm_resource_group.test.location sku { - name = "Standard_Small" - tier = "Standard" + name = "Standard_v2" + tier = "Standard_v2" capacity = 2 } @@ -4254,8 +4251,8 @@ resource "azurerm_application_gateway" "test" { location = azurerm_resource_group.test.location sku { - name = "Standard_Small" - tier = "Standard" + name = "Standard_v2" + tier = "Standard_v2" capacity = 2 } @@ -4428,8 +4425,8 @@ resource "azurerm_application_gateway" "test" { location = azurerm_resource_group.test.location sku { - name = "Standard_Small" - tier = "Standard" + name = "Standard_v2" + tier = "Standard_v2" capacity = 2 } @@ -4581,8 +4578,8 @@ resource "azurerm_application_gateway" "test" { location = azurerm_resource_group.test.location sku { - name = "Standard_Small" - tier = "Standard" + name = "Standard_v2" + tier = "Standard_v2" capacity = 2 } @@ -4973,8 +4970,8 @@ resource "azurerm_application_gateway" "test" { location = azurerm_resource_group.test.location sku { - name = "Standard_Small" - tier = "Standard" + name = "Standard_v2" + tier = "Standard_v2" capacity = 2 } @@ -5051,8 +5048,8 @@ resource "azurerm_application_gateway" "test" { location = azurerm_resource_group.test.location sku { - name = "Standard_Small" - tier = "Standard" + name = "Standard_v2" + tier = "Standard_v2" capacity = 2 } @@ -5129,8 +5126,8 @@ resource "azurerm_application_gateway" "test" { location = azurerm_resource_group.test.location sku { - name = "Standard_Small" - tier = "Standard" + name = "Standard_v2" + tier = "Standard_v2" capacity = 2 } @@ -5258,8 +5255,8 @@ resource "azurerm_application_gateway" "test" { location = azurerm_resource_group.test.location sku { - name = "Standard_Small" - tier = "Standard" + name = "Standard_v2" + tier = "Standard_v2" capacity = 2 } @@ -5341,8 +5338,8 @@ resource "azurerm_application_gateway" "test" { location = azurerm_resource_group.test.location sku { - name = "Standard_Small" - tier = "Standard" + name = "Standard_v2" + tier = "Standard_v2" capacity = 2 } @@ -5423,8 +5420,8 @@ resource "azurerm_application_gateway" "test" { location = azurerm_resource_group.test.location sku { - name = "WAF_Medium" - tier = "WAF" + name = "WAF_v2" + tier = "WAF_v2" capacity = 1 } @@ -5504,8 +5501,8 @@ resource "azurerm_application_gateway" "test" { enable_http2 = true sku { - name = "Standard_Small" - tier = "Standard" + name = "Standard_v2" + tier = "Standard_v2" capacity = 2 } @@ -6362,8 +6359,8 @@ resource "azurerm_application_gateway" "test" { location = azurerm_resource_group.test.location sku { - name = "Standard_Small" - tier = "Standard" + name = "Standard_v2" + tier = "Standard_v2" capacity = 2 } @@ -7004,8 +7001,8 @@ resource "azurerm_application_gateway" "test" { location = azurerm_resource_group.test.location sku { - name = "Standard_Small" - tier = "Standard" + name = "Standard_v2" + tier = "Standard_v2" capacity = 2 } @@ -7075,8 +7072,8 @@ resource "azurerm_application_gateway" "test" { location = azurerm_resource_group.test.location sku { - name = "Standard_Small" - tier = "Standard" + name = "Standard_v2" + tier = "Standard_v2" capacity = 2 } @@ -7152,8 +7149,8 @@ resource "azurerm_application_gateway" "test" { location = azurerm_resource_group.test.location sku { - name = "Standard_Small" - tier = "Standard" + name = "Standard_v2" + tier = "Standard_v2" capacity = 2 } @@ -7309,8 +7306,8 @@ resource "azurerm_application_gateway" "test" { location = azurerm_resource_group.test.location sku { - name = "Standard_Small" - tier = "Standard" + name = "Standard_v2" + tier = "Standard_v2" capacity = 2 } @@ -7430,8 +7427,8 @@ resource "azurerm_application_gateway" "test" { location = azurerm_resource_group.test.location sku { - name = "Standard_Small" - tier = "Standard" + name = "Standard_v2" + tier = "Standard_v2" capacity = 2 } @@ -8225,8 +8222,8 @@ resource "azurerm_application_gateway" "test" { fips_enabled = %t sku { - name = "Standard_Small" - tier = "Standard" + name = "Standard_v2" + tier = "Standard_v2" capacity = 2 } @@ -8296,8 +8293,8 @@ resource "azurerm_application_gateway" "test" { location = azurerm_resource_group.test.location sku { - name = "Standard_Small" - tier = "Standard" + name = "Standard_v2" + tier = "Standard_v2" capacity = 2 } @@ -8374,8 +8371,8 @@ resource "azurerm_application_gateway" "test" { location = azurerm_resource_group.test.location sku { - name = "Standard_Small" - tier = "Standard" + name = "Standard_v2" + tier = "Standard_v2" capacity = 2 } @@ -8446,8 +8443,8 @@ resource "azurerm_application_gateway" "test" { location = azurerm_resource_group.test.location sku { - name = "Standard_Small" - tier = "Standard" + name = "Standard_v2" + tier = "Standard_v2" capacity = 2 }