Coder Social home page Coder Social logo

Comments (4)

ninjarobot avatar ninjarobot commented on August 17, 2024

@Jiancao164 what's the use case for PeeringState and PeeringSyncLevel in an ARM deployment? Are those ever set or are you using the value in output or something like that?

from farmer.

ninjarobot avatar ninjarobot commented on August 17, 2024

@Jiancao164 I have #1078 in progress for this, but I am not really sure how to confirm if some of these settings work. Here's a template generated by this test.

{
  "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
  "contentVersion": "1.0.0.0",
  "outputs": {},
  "parameters": {},
  "resources": [
    {
      "apiVersion": "2023-04-01",
      "dependsOn": [],
      "location": "westeurope",
      "name": "vnet1",
      "properties": {
        "addressSpace": {
          "addressPrefixes": [
            "10.100.50.0/24",
            "10.100.255.0/24"
          ]
        },
        "subnets": [
          {
            "name": "net1-1",
            "properties": {
              "addressPrefix": "10.100.50.0/28",
              "delegations": []
            }
          },
          {
            "name": "GatewaySubnet",
            "properties": {
              "addressPrefix": "10.100.255.0/24",
              "delegations": []
            }
          }
        ]
      },
      "tags": {},
      "type": "Microsoft.Network/virtualNetworks"
    },
    {
      "apiVersion": "2018-11-01",
      "location": "westeurope",
      "name": "vnet1-gw-ip",
      "properties": {
        "publicIPAllocationMethod": "Dynamic"
      },
      "sku": {
        "name": "Basic"
      },
      "tags": {},
      "type": "Microsoft.Network/publicIPAddresses"
    },
    {
      "apiVersion": "2020-05-01",
      "dependsOn": [
        "[resourceId('Microsoft.Network/virtualNetworks', 'vnet1')]",
        "[resourceId('Microsoft.Network/publicIPAddresses', 'vnet1-gw-ip')]"
      ],
      "location": "westeurope",
      "name": "vnet1-gw",
      "properties": {
        "activeActive": false,
        "enableBgp": true,
        "gatewayType": "Vpn",
        "ipConfigurations": [
          {
            "name": "ipconfig1",
            "properties": {
              "privateIpAllocationMethod": "Dynamic",
              "publicIPAddress": {
                "id": "[resourceId('Microsoft.Network/publicIPAddresses', 'vnet1-gw-ip')]"
              },
              "subnet": {
                "id": "[resourceId('Microsoft.Network/virtualNetworks/subnets', 'vnet1', 'GatewaySubnet')]"
              }
            }
          }
        ],
        "sku": {
          "name": "VpnGw1",
          "tier": "VpnGw1"
        },
        "vpnType": "RouteBased"
      },
      "tags": {},
      "type": "Microsoft.Network/virtualNetworkGateways"
    },
    {
      "apiVersion": "2023-04-01",
      "dependsOn": [],
      "location": "westeurope",
      "name": "vnet2",
      "properties": {
        "addressSpace": {
          "addressPrefixes": [
            "172.16.120.0/24"
          ]
        },
        "subnets": [
          {
            "name": "net2-1",
            "properties": {
              "addressPrefix": "172.16.120.0/28",
              "delegations": []
            }
          }
        ]
      },
      "tags": {},
      "type": "Microsoft.Network/virtualNetworks"
    },
    {
      "apiVersion": "2023-04-01",
      "dependsOn": [
        "[resourceId('Microsoft.Network/virtualNetworks', 'vnet2')]",
        "[resourceId('Microsoft.Network/virtualNetworks', 'vnet1')]",
        "[resourceId('Microsoft.Network/virtualNetworkGateways', 'vnet1-gw')]"
      ],
      "location": "westeurope",
      "name": "vnet2/peering-vnet1",
      "properties": {
        "allowForwardedTraffic": false,
        "allowGatewayTransit": true,
        "allowVirtualNetworkAccess": true,
        "peeringState": "Initiated",
        "peeringSyncLevel": "RemoteNotInSync",
        "remoteAddressSpace": {
          "addressPrefixes": [
            "10.100.200.0/24"
          ]
        },
        "remoteVirtualNetwork": {
          "id": "[resourceId('Microsoft.Network/virtualNetworks', 'vnet1')]"
        },
        "remoteVirtualNetworkAddressSpace": {
          "addressPrefixes": [
            "10.100.200.0/24"
          ]
        },
        "useRemoteGateways": true
      },
      "type": "Microsoft.Network/virtualNetworks/virtualNetworkPeerings"
    }
  ]
}

from farmer.

Jiancao164 avatar Jiancao164 commented on August 17, 2024

@Jiancao164 what's the use case for PeeringState and PeeringSyncLevel in an ARM deployment? Are those ever set or are you using the value in output or something like that?

Hi @ninjarobot, I am not sure about it either. We saw the properties in the JSON file from the latest API version so we thought we may need to control the settings of those properties. Now, we found they may come from the default value and not affect anything. I think we can postpone this issue. If later we find we need to set them, we can discuss them later. Thank you for looking into this.

from farmer.

ninjarobot avatar ninjarobot commented on August 17, 2024

Ok, just let me know if there's a use case for them. The code is pretty much done for setting those, but I don't really see any effect from them so I'm not sure how to test. If you get more info, just add it to the issue and mention me to take a look.

Thanks.

from farmer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.