Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: force peer resynch when VNET extended #258

Open
fearofweapons opened this issue Sep 29, 2023 · 8 comments
Open

feat: force peer resynch when VNET extended #258

fearofweapons opened this issue Sep 29, 2023 · 8 comments
Labels
enhancement New feature or request module: vnet Pertaining to the virtualnetwork sub-module
Milestone

Comments

@fearofweapons
Copy link

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Description

Is your feature request related to an issue? Feature Request

When a peered VNET is extended the peer needs to be resync'ed. The native Terraform modules force a resync when a VNET is extended. The Microsoft modules do not.

Describe the solution you'd like

The Microsoft modules should force a resync on any peered VNETS where the range is changed ( extended or reduced.)

We are looking to implement a workaround in Powershell that will get a list of all VNETS. Check to see if the PeeringSyncLevel is RemoteNotInSync and if it is pass the VNET name to Sync-AzVirtualNetworkPeering to force the peer sync.

Additional context

@matt-FFFFFF
Copy link
Member

Hi @fearofweapons

This is a sensible suggestion. Leave it with us to see if we can implement.

@matt-FFFFFF matt-FFFFFF added the enhancement New feature or request label Oct 2, 2023
@matt-FFFFFF matt-FFFFFF added the module: vnet Pertaining to the virtualnetwork sub-module label Nov 9, 2023
@qaiserali
Copy link

Voted for this, and it would be great to have this feature added.

@matt-FFFFFF
Copy link
Member

I had a ta-da moment today on how we can implement.

Will report back!

@matt-FFFFFF
Copy link
Member

I have proved this works in a poc, will work on adding this to a future release

@matt-FFFFFF
Copy link
Member

PoC is here:

https://www.youtube.com/watch?v=5_39Ed5Lx1E

and here: https://github.com/matt-FFFFFF/terraform-azapi-vnet-peer-resync

Will look to get this added as a feature

@fearofweapons
Copy link
Author

Outstanding - thanks Matt -- really appreciated. We'll take a look and have a go at using this in our deployments as soon as we can!

@lulevapa
Copy link

lulevapa commented Mar 1, 2024

incredibly good work - thanks for that!
Do you btw already have an idea how and when it will go into the module? We use the module and are currently facing this challenge. We are already thinking about a PS script as a workaround that syncs the peerings again. The only question I have is whether I could trigger this in a meaningful way?

@lulevapa
Copy link

incredibly good work - thanks for that! Do you btw already have an idea how and when it will go into the module? We use the module and are currently facing this challenge. We are already thinking about a PS script as a workaround that syncs the peerings again. The only question I have is whether I could trigger this in a meaningful way?

I went for a workaround. As our landingzone deployment is made with an azure devops release pipeline I added a step which calls a webhook from an automation runbook. This runbook iterates over all peerings in the HUB and initiate a resync if not fully in sync

@matt-FFFFFF matt-FFFFFF added this to the v5.0 milestone Jun 5, 2024
@matt-FFFFFF matt-FFFFFF mentioned this issue Oct 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request module: vnet Pertaining to the virtualnetwork sub-module
Projects
None yet
Development

No branches or pull requests

4 participants