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

Need more property settings in Virtual Network #1073

Open
Jiancao164 opened this issue Oct 31, 2023 · 4 comments
Open

Need more property settings in Virtual Network #1073

Jiancao164 opened this issue Oct 31, 2023 · 4 comments
Assignees
Labels
enhancement New feature or request on-hold

Comments

@Jiancao164
Copy link

Looking for the following settings for properties of Virtual Network:

VirtualNetwork Properties

  • Encryption: enabled/enforcement

VirtualNetwork/VirtualNetworkPeerings

  • PeeringState
  • PeeringSyncLevel
  • DoNotVerifyRemoteGateways
  • RemoteAddressSpace (Properties are AddressPrefixes)
  • RemoteVirtualNetworkAddressSpace
@Jiancao164 Jiancao164 changed the title Need more property settings in Virtual Netwrok Need more property settings in Virtual Network Oct 31, 2023
@ninjarobot ninjarobot added enhancement New feature or request good first issue Good for newcomers labels Oct 31, 2023
@ninjarobot
Copy link
Collaborator

@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?

@ninjarobot ninjarobot self-assigned this Nov 9, 2023
@ninjarobot
Copy link
Collaborator

@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"
    }
  ]
}

@Jiancao164
Copy link
Author

@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.

@ninjarobot
Copy link
Collaborator

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.

@ninjarobot ninjarobot added on-hold and removed good first issue Good for newcomers labels Nov 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request on-hold
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants