Skip to content

Commit c9a4eb3

Browse files
Alex KarpenkoAlex Karpenko
authored andcommitted
network: clarify legacy ER gateway acctest requirements
1 parent 8be200c commit c9a4eb3

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

internal/services/network/virtual_network_gateway_resource_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -359,6 +359,10 @@ func TestAccVirtualNetworkGateway_expressRoute(t *testing.T) {
359359
func TestAccVirtualNetworkGateway_expressRouteWithPublicIPAddressId(t *testing.T) {
360360
data := acceptance.BuildTestData(t, "azurerm_virtual_network_gateway", "test")
361361
r := VirtualNetworkGatewayResource{}
362+
// Brownfield-only: this must be an existing legacy ExpressRoute gateway that still
363+
// returns `ip_configuration.0.public_ip_address_id`. Microsoft made auto-assigned
364+
// Public IPs generally available in July 2025; gateways created since then use the
365+
// HOBO model and do not expose that field.
362366
legacyGatewayID := os.Getenv("ARM_TEST_LEGACY_EXPRESSROUTE_GATEWAY_ID")
363367

364368
if legacyGatewayID == "" {
@@ -380,10 +384,6 @@ func TestAccVirtualNetworkGateway_expressRouteWithPublicIPAddressId(t *testing.T
380384
check.That(data.ResourceName).Key("ip_configuration.0.public_ip_address_id").Exists(),
381385
),
382386
},
383-
{
384-
Config: r.expressRouteWithPublicIPAddressIdBrownfield(legacyGatewayID),
385-
PlanOnly: true,
386-
},
387387
})
388388
}
389389

0 commit comments

Comments
 (0)