New-CmAzIaasVnetPeerings

Creates vnet peerings.

Completes following:

  • Creates vnet peerings on source vnet for target vnet.
  • Supports cross-subscription vnet peering.

This command forms part of the IaaS Building Block.

Parameters

-SettingsFile

Required. (String) File path for the settings file to be converted into a settings object.

-SettingsObject

Required. (Object) Object containing the configuration values required to run this cmdlet.

-WhatIf

(Switch) Run the command without executing any actions, so that no changes are made. The command will output a description of actions to be performed against the affected resources in the console window. Use this option if you are unsure of the overall impact of your command and wish to review it before committing to making changes.

-Confirm

(Switch) Run the command without executing any actions, so that no changes are made. The command will output a description of actions to be performed against the affected resources in the console window. Use this option if you are unsure of the overall impact of your command and wish to review it before committing to making changes.

Usage

Example 1

1
New-CmAzIaasVnetPeerings -settingsFile "vnetPeerings.yml"

Example 2

1
New-CmAzIaasVnetPeerings -settingsObject $vnetPeerings

Settings

Beta documentation
The following schema documentation is automatically generated as part of a recent roadmap task. There may be inaccuracies or incomplete information while we flush out bugs; please refer to the packed project settings examples where necessary.

Settings Root.

Component

component [string | null]

Value to determine what cmdlet should be dynamically loaded for these settings.

Peerings

peerings [array] Mandatory

Contains list of details required to deploy vnet peerings.

Source

source [object]

Contains source vnet information.

ResourceGroup

resourceGroup [string]

Resourcegroup of source Vnet.

VnetName

vnetName [string]

Source virtual network name.

targets

targets [array]

Contains list of target vnet details required to deploy vnet peerings with source vnet.

resourceGroup

resourceGroup [string]

Target vnet resource group name.

VnetName

vnetName [string]

Target vnet name.

SubscriptionId

subscriptionId [string | null]

Subscription id of target vnet.

AllowVirtualNetworkAccess

allowVirtualNetworkAccess [boolean | null]

Gets or sets whether resources in the source virtual network space would be able to access the VMs in target virtual network space.

AllowForwardedTraffic

allowForwardedTraffic [boolean | null]

Gets or sets whether the forwarded traffic from target virtual network will be allowed/disallowed.

AllowGatewayTransit

allowGatewayTransit [boolean | null]

Gets or sets if gateway links can be used in target virtual networking to link to this virtual network.

UseRemoteGateways

useRemoteGateways [boolean | null]

Gets or sets if target gateways can be used on source virtual network

Examples

The following example files are automatically generated from the settings file schema definition to show how the specification can be used in practise. Cloudmarque can accept both JSON and YAML parameter files.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
{
  "component": "string",
  "peerings": [
    {
      "source": {
        "resourceGroup": "string",
        "vnetName": "string"
      },
      "targets": [
        {
          "resourceGroup": "string",
          "vnetName": "string",
          "subscriptionId": "string",
          "allowVirtualNetworkAccess": "boolean",
          "allowForwardedTraffic": "boolean",
          "allowGatewayTransit": "boolean",
          "useRemoteGateways": "boolean"
        }
      ]
    }
  ]
}
1
2
3
4
5
6
7
8
9
10
11
12
13
component: "string"    # Optional
peerings:     # Mandatory
  - source:     # Mandatory
      resourceGroup: "string"    # Mandatory
      vnetName: "string"    # Mandatory
    targets:     # Mandatory
      - resourceGroup: "string"    # Optional
        vnetName: "string"    # Mandatory
        subscriptionId: "string"    # Optional
        allowVirtualNetworkAccess: "boolean"    # Optional
        allowForwardedTraffic: "boolean"    # Optional
        allowGatewayTransit: "boolean"    # Optional
        useRemoteGateways: "boolean"    # Optional