Microsoft.Network vpnSites 網站 2018-12-01

Bicep 資源定義

vpnSites 資源類型可以使用目標作業來部署:

如需每個 API 版本中已變更屬性的清單,請參閱 變更記錄檔。

使用範例

Bicep 範例

部署 VPN 站點的基本範例。

param resourceName string = 'acctest0001'
param location string = 'westeurope'

resource virtualWan 'Microsoft.Network/virtualWans@2022-07-01' = {
  name: resourceName
  location: location
  properties: {
    allowBranchToBranchTraffic: true
    disableVpnEncryption: false
    office365LocalBreakoutCategory: 'None'
    type: 'Standard'
  }
}

resource vpnSite 'Microsoft.Network/vpnSites@2022-07-01' = {
  name: resourceName
  location: location
  properties: {
    addressSpace: {
      addressPrefixes: [
        '10.0.1.0/24'
      ]
    }
    virtualWan: {
      id: virtualWan.id
    }
    vpnSiteLinks: [
      {
        name: 'link1'
        properties: {
          fqdn: ''
          ipAddress: '10.0.1.1'
          linkProperties: {
            linkProviderName: ''
            linkSpeedInMbps: 0
          }
        }
      }
      {
        name: 'link2'
        properties: {
          fqdn: ''
          ipAddress: '10.0.1.2'
          linkProperties: {
            linkProviderName: ''
            linkSpeedInMbps: 0
          }
        }
      }
    ]
  }
}

Azure 已驗證的模組

下列 Azure 驗證模組 可用來部署此資源類型。

模組 描述
VPN 月臺 VPN 網站的 AVM 資源模組

Azure 快速入門範例

下列 Azure 快速入門範本 包含用於部署此資源類型的 Bicep 範例。

Bicep 檔案 描述
建立虛擬 WAN 資源 此範本可讓您建立虛擬 WAN 資源,包括虛擬 WAN、虛擬中樞、VPN 閘道、VPN 網站和 VPN Connecton。

資源格式

若要建立 Microsoft.Network/vpnSites 資源,請將下列 Bicep 新增至範本。

resource symbolicname 'Microsoft.Network/vpnSites@2018-12-01' = {
  location: 'string'
  name: 'string'
  properties: {
    addressSpace: {
      addressPrefixes: [
        'string'
      ]
    }
    bgpProperties: {
      asn: int
      bgpPeeringAddress: 'string'
      peerWeight: int
    }
    deviceProperties: {
      deviceModel: 'string'
      deviceVendor: 'string'
      linkSpeedInMbps: int
    }
    ipAddress: 'string'
    isSecuritySite: bool
    provisioningState: 'string'
    siteKey: 'string'
    virtualWan: {
      id: 'string'
    }
  }
  tags: {
    {customized property}: 'string'
  }
}

屬性值

Microsoft.Network/vpnSites

名字 描述 價值
位置 資源位置。 字串
名字 資源名稱 字串 (必要)
性能 VpnSite 的參數 VpnSiteProperties
標籤 資源標籤 標記名稱和值的字典。 請參閱範本中的 標籤

地址空間

名字 描述 價值
address前綴 以 CIDR 表示法保留給此虛擬網路的位址區塊清單。 字串[]

Bgp設置

名字 描述 價值
asn (自動傳感器網路) BGP 喇叭的 ASN。 整數 (int)
bgp對等位址 這個 BGP 說話者的 BGP 對等互連位址和 BGP 識別碼。 字串
peerWeight 新增至此 BGP 喇叭所學習路由的權數。 整數 (int)

設備屬性

名字 描述 價值
設備型號 裝置的模型。 字串
deviceVendor 設備供應商 裝置廠商的名稱。 字串
鏈路速度(以Mbps為單位) 連結速度。 整數 (int)

資源標籤

名字 描述 價值

子資源

名字 描述 價值
識別碼 資源標識碼。 字串

VpnSiteProperties

名字 描述 價值
地址空間 包含IP位址範圍數位的AddressSpace。 地址空間
bgp屬性 bgp 屬性集。 Bgp設置
設備屬性 裝置屬性 設備屬性
IP位址 vpn-site 的 ip-address。 字串
isSecuritySite IsSecuritySite 旗標 布爾 (bool)
佈建狀態 資源的布建狀態。 '刪除'
“失敗”
“成功”
'Updateing'
siteKey VPN 月臺的金鑰,可用於連線。 字串
虛擬 Wan vpnSite 所屬的 VirtualWAN 子資源

ARM 樣本資源定義

vpnSites 資源類型可以使用目標作業來部署:

使用範例

Azure 快速入門範本

下列 Azure 快速入門範本 部署此資源類型。

範本 描述
建立虛擬 WAN 資源

部署至 Azure
此範本可讓您建立虛擬 WAN 資源,包括虛擬 WAN、虛擬中樞、VPN 閘道、VPN 網站和 VPN Connecton。

資源格式

若要建立 Microsoft.Network/vpnSites 資源,請將下列 JSON 新增至範本。

{
  "type": "Microsoft.Network/vpnSites",
  "apiVersion": "2018-12-01",
  "name": "string",
  "location": "string",
  "properties": {
    "addressSpace": {
      "addressPrefixes": [ "string" ]
    },
    "bgpProperties": {
      "asn": "int",
      "bgpPeeringAddress": "string",
      "peerWeight": "int"
    },
    "deviceProperties": {
      "deviceModel": "string",
      "deviceVendor": "string",
      "linkSpeedInMbps": "int"
    },
    "ipAddress": "string",
    "isSecuritySite": "bool",
    "provisioningState": "string",
    "siteKey": "string",
    "virtualWan": {
      "id": "string"
    }
  },
  "tags": {
    "{customized property}": "string"
  }
}

屬性值

Microsoft.Network/vpnSites

名字 描述 價值
apiVersion API 版本 '2018-12-01'
位置 資源位置。 字串
名字 資源名稱 字串 (必要)
性能 VpnSite 的參數 VpnSiteProperties
標籤 資源標籤 標記名稱和值的字典。 請參閱範本中的 標籤
型別 資源類型 “Microsoft.Network/vpnSites”

地址空間

名字 描述 價值
address前綴 以 CIDR 表示法保留給此虛擬網路的位址區塊清單。 字串[]

Bgp設置

名字 描述 價值
asn (自動傳感器網路) BGP 喇叭的 ASN。 整數 (int)
bgp對等位址 這個 BGP 說話者的 BGP 對等互連位址和 BGP 識別碼。 字串
peerWeight 新增至此 BGP 喇叭所學習路由的權數。 整數 (int)

設備屬性

名字 描述 價值
設備型號 裝置的模型。 字串
deviceVendor 設備供應商 裝置廠商的名稱。 字串
鏈路速度(以Mbps為單位) 連結速度。 整數 (int)

資源標籤

名字 描述 價值

子資源

名字 描述 價值
識別碼 資源標識碼。 字串

VpnSiteProperties

名字 描述 價值
地址空間 包含IP位址範圍數位的AddressSpace。 地址空間
bgp屬性 bgp 屬性集。 Bgp設置
設備屬性 裝置屬性 設備屬性
IP位址 vpn-site 的 ip-address。 字串
isSecuritySite IsSecuritySite 旗標 布爾 (bool)
佈建狀態 資源的布建狀態。 '刪除'
“失敗”
“成功”
'Updateing'
siteKey VPN 月臺的金鑰,可用於連線。 字串
虛擬 Wan vpnSite 所屬的 VirtualWAN 子資源

Terraform (AzAPI 提供者) 資源定義

vpnSites 資源類型可以使用目標作業來部署:

  • 資源團體 關於每個 API 版本變更屬性的清單,請參見 變更日誌。

使用範例

Terraform 範例

部署 VPN 站點的基本範例。

terraform {
  required_providers {
    azapi = {
      source = "Azure/azapi"
    }
  }
}

provider "azapi" {
  skip_provider_registration = false
}

variable "resource_name" {
  type    = string
  default = "acctest0001"
}

variable "location" {
  type    = string
  default = "westeurope"
}

resource "azapi_resource" "resourceGroup" {
  type     = "Microsoft.Resources/resourceGroups@2020-06-01"
  name     = var.resource_name
  location = var.location
}

resource "azapi_resource" "virtualWan" {
  type      = "Microsoft.Network/virtualWans@2022-07-01"
  parent_id = azapi_resource.resourceGroup.id
  name      = var.resource_name
  location  = var.location
  body = {
    properties = {
      allowBranchToBranchTraffic     = true
      disableVpnEncryption           = false
      office365LocalBreakoutCategory = "None"
      type                           = "Standard"
    }
  }
  schema_validation_enabled = false
  response_export_values    = ["*"]
}

resource "azapi_resource" "vpnSite" {
  type      = "Microsoft.Network/vpnSites@2022-07-01"
  parent_id = azapi_resource.resourceGroup.id
  name      = var.resource_name
  location  = var.location
  body = {
    properties = {
      addressSpace = {
        addressPrefixes = [
          "10.0.1.0/24",
        ]
      }
      virtualWan = {
        id = azapi_resource.virtualWan.id
      }
      vpnSiteLinks = [
        {
          name = "link1"
          properties = {
            fqdn      = ""
            ipAddress = "10.0.1.1"
            linkProperties = {
              linkProviderName = ""
              linkSpeedInMbps  = 0
            }
          }
        },
        {
          name = "link2"
          properties = {
            fqdn      = ""
            ipAddress = "10.0.1.2"
            linkProperties = {
              linkProviderName = ""
              linkSpeedInMbps  = 0
            }
          }
        },
      ]
    }
  }
  schema_validation_enabled = false
  response_export_values    = ["*"]
}

資源格式

若要建立 Microsoft.Network/vpnSites 資源,請將下列 Terraform 新增至範本。

resource "azapi_resource" "symbolicname" {
  type = "Microsoft.Network/vpnSites@2018-12-01"
  name = "string"
  parent_id = "string"
  location = "string"
  tags = {
    {customized property} = "string"
  }
  body = {
    properties = {
      addressSpace = {
        addressPrefixes = [
          "string"
        ]
      }
      bgpProperties = {
        asn = int
        bgpPeeringAddress = "string"
        peerWeight = int
      }
      deviceProperties = {
        deviceModel = "string"
        deviceVendor = "string"
        linkSpeedInMbps = int
      }
      ipAddress = "string"
      isSecuritySite = bool
      provisioningState = "string"
      siteKey = "string"
      virtualWan = {
        id = "string"
      }
    }
  }
}

屬性值

Microsoft.Network/vpnSites

名字 描述 價值
位置 資源位置。 字串
名字 資源名稱 字串 (必要)
性能 VpnSite 的參數 VpnSiteProperties
標籤 資源標籤 標記名稱和值的字典。
型別 資源類型 “Microsoft.Network/vpnSites@2018-12-01”

地址空間

名字 描述 價值
address前綴 以 CIDR 表示法保留給此虛擬網路的位址區塊清單。 字串[]

Bgp設置

名字 描述 價值
asn (自動傳感器網路) BGP 喇叭的 ASN。 整數 (int)
bgp對等位址 這個 BGP 說話者的 BGP 對等互連位址和 BGP 識別碼。 字串
peerWeight 新增至此 BGP 喇叭所學習路由的權數。 整數 (int)

設備屬性

名字 描述 價值
設備型號 裝置的模型。 字串
deviceVendor 設備供應商 裝置廠商的名稱。 字串
鏈路速度(以Mbps為單位) 連結速度。 整數 (int)

資源標籤

名字 描述 價值

子資源

名字 描述 價值
識別碼 資源標識碼。 字串

VpnSiteProperties

名字 描述 價值
地址空間 包含IP位址範圍數位的AddressSpace。 地址空間
bgp屬性 bgp 屬性集。 Bgp設置
設備屬性 裝置屬性 設備屬性
IP位址 vpn-site 的 ip-address。 字串
isSecuritySite IsSecuritySite 旗標 布爾 (bool)
佈建狀態 資源的布建狀態。 '刪除'
“失敗”
“成功”
'Updateing'
siteKey VPN 月臺的金鑰,可用於連線。 字串
虛擬 Wan vpnSite 所屬的 VirtualWAN 子資源