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

Microsoft.Network/virtualNetworks/virtualNetworkPeerings properties #179

Open
danbrad opened this issue Apr 28, 2021 · 2 comments
Open

Microsoft.Network/virtualNetworks/virtualNetworkPeerings properties #179

danbrad opened this issue Apr 28, 2021 · 2 comments
Labels
Network/virtualNetworks noise Noise in what-if response old api version provider bug Issue exists in the resource provider

Comments

@danbrad
Copy link

danbrad commented Apr 28, 2021

Describe the noise

Resource type

Microsoft.Network/virtualNetworks/virtualNetworkPeerings

apiVersion (i.e. 2019-04-01)

2020-05-01

Client

Bicep

Relevant ARM Template code (we only need the resource object for the above resourceType and apiVersion, but if it's easier you can include the entire template

resource peering 'Microsoft.Network/virtualNetworks/virtualNetworkPeerings@2020-05-01' = {
  name: 'vNet1Name/vNet2Name'
  properties: {
    remoteVirtualNetwork: {
      id: vNet2.id
    }
    allowForwardedTraffic: false
    allowGatewayTransit: false
    allowVirtualNetworkAccess: true
    useRemoteGateways: false
  }
}

Expected response (i.e. "I expected no noise since the template has not been modified since the resources were deployed)

I expected no noise since the template has not been modified since the resources were deployed)

Current (noisy) response (either include a screenshot of the what-if output, or copy/paste the text)

  ~ Microsoft.Network/virtualNetworks/vnet-uksouth-hub/virtualNetworkPeerings/hub-to-vnet-spoke-LBR-01 [2020-05-01]
    - properties.doNotVerifyRemoteGateways: false
    - properties.remoteAddressSpace:

        addressPrefixes: [
          0: "10.120.0.0/16"
        ]
@ghost ghost added the Needs Triage 🔍 label Apr 28, 2021
@jonlanceley
Copy link

To add to the above when a Hub script is re-run, and in Azure a spoke environment e.g. dev has created the vnet peering to the hub already.

On the hub script run what-if is shown as deleting the peering when it is actually ignored. (The Hub script contains no vnet peering code, the vnet peering is done by the Dev spoke Bicep file. So the Hub bicep file should show this in what-if as ignored.

~ Microsoft.Network/virtualNetworks/nonprod-we-vnet [2021-02-01]
- properties.virtualNetworkPeerings: [
        0:
          name:                                         "dev-we-vnet-peering"
          properties.allowForwardedTraffic:             true
          properties.allowGatewayTransit:               false
          properties.allowVirtualNetworkAccess:         true
          properties.doNotVerifyRemoteGateways:         false
          properties.peeringSyncLevel:                  "FullyInSync"
          properties.remoteAddressSpace.addressPrefixes: [
            0: "10.200.48.0/20"
          ]
          properties.remoteVirtualNetwork.id:           "/subscriptions/xxxxxxxx/resourceGroups/network-nonprod-dev-we-rg/providers/Microsoft.Network/virtualNetworks/dev-we-vnet"
          properties.remoteVirtualNetworkAddressSpace.addressPrefixes: [
            0: "10.200.48.0/20"
          ]
          properties.useRemoteGateways:                 false
      ]

@gavhooper
Copy link

We also have this issue where peerings are always stated as being deleted when deploying a vnet without peerings, is there any update?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Network/virtualNetworks noise Noise in what-if response old api version provider bug Issue exists in the resource provider
Projects
None yet
Development

No branches or pull requests

4 participants