Support for VNET preview feature?

Hi terraformers!

The “AllowUpdateAddressSpaceInPeeredVnets” has been in preview (at least) since 2021-08-13 (ref: How to re-size Azure virtual networks that are peered—now in preview | Azure Blog and Updates | Microsoft Azure).

Being able to add/remove address prefixes to peered VNETs containing production workloads makes our lives so much more easy.

I have been testing this feature on some of our “legacy” (not terraformed) environments manually via the portal, and the feature works as intended.
But when I try to make similar changes to VNET(s) under terraform, it throws the “…VNET_NAME cannot change when virtual network has peerings.” Details=" error in my face.

Question
It the preview feature “AllowUpdateAddressSpaceInPeeredVnets” supported by the azurerm provider - and if so, what version should I be using? (currently at 2.37.0, yes it’s old).

Any input on this would be very helpful indeed.
Thanks,
Espen

v2.73.0 should support it as far as I can check.

There is a known issue which is currently under the works, but basic functionality is available from there.

Thank you so much for the quick reply!

Yes, according to the release notes, version 2.73.0 has bumped the network API version to 2021-02-01 (Microsoft.Network/virtualNetworks/virtualNetworkPeerings 2021-02-01 - Bicep & ARM template reference | Microsoft Docs) which is exposing the new ‘peeringSyncLevel’ property.

That seems to be it - I’ll need to upgrade my provider and see if it works.

/E

1 Like