Microsoft.ServiceFabric managedClusters 2023-02-01-預覽版

Bicep 資源定義

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

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

使用範例

Bicep 範例

部署資源群組的基本範例。

param location string = 'westeurope'
@description('The administrator username for the Service Fabric managed cluster')
param adminUsername string
@secure()
@description('The administrator password for the Service Fabric managed cluster')
param adminPassword string
param resourceName string = 'acctest0001'

resource managedCluster 'Microsoft.ServiceFabric/managedClusters@2021-05-01' = {
  name: resourceName
  location: location
  sku: {
    name: 'Standard'
  }
  properties: {
    addonFeatures: [
      'DnsService'
    ]
    adminPassword: adminPassword
    adminUserName: adminUsername
    clientConnectionPort: 12345
    clusterUpgradeCadence: 'Wave0'
    dnsName: resourceName
    httpGatewayConnectionPort: 23456
    loadBalancingRules: [
      {
        backendPort: 8000
        frontendPort: 443
        probeProtocol: 'http'
        probeRequestPath: '/'
        protocol: 'tcp'
      }
    ]
    networkSecurityRules: [
      {
        access: 'allow'
        destinationAddressPrefixes: [
          '0.0.0.0/0'
        ]
        destinationPortRanges: [
          '443'
        ]
        direction: 'inbound'
        name: 'rule443-allow-fe'
        priority: 1000
        protocol: 'tcp'
        sourceAddressPrefixes: [
          '0.0.0.0/0'
        ]
        sourcePortRanges: [
          '1-65535'
        ]
      }
    ]
  }
  tags: {
    Test: 'value'
  }
}

資源格式

要建立 Microsoft.ServiceFabric/managedClusters 資源,請將以下 Bicep 加入範本。

resource symbolicname 'Microsoft.ServiceFabric/managedClusters@2023-02-01-preview' = {
  location: 'string'
  name: 'string'
  properties: {
    addonFeatures: [
      'string'
    ]
    adminPassword: 'string'
    adminUserName: 'string'
    allowRdpAccess: bool
    applicationTypeVersionsCleanupPolicy: {
      maxUnusedVersionsToKeep: int
    }
    auxiliarySubnets: [
      {
        enableIpv6: bool
        name: 'string'
        networkSecurityGroupId: 'string'
        privateEndpointNetworkPolicies: 'string'
        privateLinkServiceNetworkPolicies: 'string'
      }
    ]
    azureActiveDirectory: {
      clientApplication: 'string'
      clusterApplication: 'string'
      tenantId: 'string'
    }
    clientConnectionPort: int
    clients: [
      {
        commonName: 'string'
        isAdmin: bool
        issuerThumbprint: 'string'
        thumbprint: 'string'
      }
    ]
    clusterCodeVersion: 'string'
    clusterUpgradeCadence: 'string'
    clusterUpgradeMode: 'string'
    dnsName: 'string'
    enableAutoOSUpgrade: bool
    enableIpv6: bool
    enableServicePublicIP: bool
    fabricSettings: [
      {
        name: 'string'
        parameters: [
          {
            name: 'string'
            value: 'string'
          }
        ]
      }
    ]
    httpGatewayConnectionPort: int
    ipTags: [
      {
        ipTagType: 'string'
        tag: 'string'
      }
    ]
    loadBalancingRules: [
      {
        backendPort: int
        frontendPort: int
        loadDistribution: 'string'
        probePort: int
        probeProtocol: 'string'
        probeRequestPath: 'string'
        protocol: 'string'
      }
    ]
    networkSecurityRules: [
      {
        access: 'string'
        description: 'string'
        destinationAddressPrefix: 'string'
        destinationAddressPrefixes: [
          'string'
        ]
        destinationPortRange: 'string'
        destinationPortRanges: [
          'string'
        ]
        direction: 'string'
        name: 'string'
        priority: int
        protocol: 'string'
        sourceAddressPrefix: 'string'
        sourceAddressPrefixes: [
          'string'
        ]
        sourcePortRange: 'string'
        sourcePortRanges: [
          'string'
        ]
      }
    ]
    serviceEndpoints: [
      {
        locations: [
          'string'
        ]
        service: 'string'
      }
    ]
    subnetId: 'string'
    useCustomVnet: bool
    zonalResiliency: bool
    zonalUpdateMode: 'string'
  }
  sku: {
    name: 'string'
  }
  tags: {
    {customized property}: 'string'
  }
}

屬性值

Microsoft.ServiceFabric/managedClusters

名稱 說明 價值觀
位置 Azure 資源位置。 字串 (必要)
名稱 資源名稱 字串 (必要)
屬性 受控叢集資源屬性 ManagedClusterProperties
SKU 受控叢集的SKU Sku (必要)
標記 資源標籤 標記名稱和值的字典。 請參閱範本中的 標籤

ApplicationTypeVersionsCleanupPolicy

名稱 說明 價值觀
maxUnusedVersionsToKeep 要保留的每個應用程式類型未使用的版本數目。 int

約束:
最小值 = 0 (必要)

AzureActiveDirectory

名稱 說明 價值觀
用戶端應用程式 Azure Active Directory client application id. 字串
cluster應用程式 Azure Active Directory cluster application id. 字串
租戶ID Azure Active Directory tenant id. 字串

用戶端憑證

名稱 說明 價值觀
通用名稱 憑證一般名稱。 字串
isAdmin 指出客戶端憑證是否具有叢集的系統管理員存取權。 非系統管理員用戶端只能在叢集上執行唯讀作業。 布林 (必要)
issuerThumbprint 憑證的簽發者指紋。 只能與 CommonName 搭配使用。 字串
指紋 憑證指紋。 字串

IPTag 標籤

名稱 說明 價值觀
ipTag類型 IP 標籤類型。 字串 (必要)
加標籤 IP 標籤的值。 字串 (必要)

LoadBalancing規則

名稱 說明 價值觀
backendPort 用於端點上內部連線的埠。 可接受的值介於 1 到 65535 之間。 int

約束:
最小值 = 1
最大值 = 65534 (必要)
frontendPort 外部端點的連接埠。 每個規則的埠號必須在 Load Balancer 內唯一。 可接受的值為 1 到 65534。 int

約束:
最小值 = 1
最大值 = 65534 (必要)
負載分佈 此規則的負載分配原則。 字串
探針埠 負載平衡規則所使用的探查埠。 可接受的值介於 1 到 65535 之間。 int

約束:
最小值 = 1
最大值 = 65534
探針協定 負載平衡規則所使用的負載平衡器探查參考。 “http”
'https'
'tcp' (必要)
探針請求路徑 探查要求路徑。 僅支援 HTTP/HTTPS 探查。 字串
通訊協定 負載平衡規則所使用的傳輸通訊協議參考。 'tcp'
'udp' (必要)

ManagedClusterProperties

名稱 說明 價值觀
addon功能 在叢集上啟用的附加元件功能清單。 包含任何的字串數組:
“BackupRestoreService”
“DnsService”
“ResourceMonitorService”
管理員密碼 VM 系統管理員用戶密碼。 字串

約束:
敏感性值。 以安全參數的形式傳入。
管理者用戶名 VM 系統管理員用戶名稱。 字串 (必要)
allowRdpAccess 將此設定為 true 可讓 RDP 存取 VM。 默認 NSG 規則會開啟 RDP 連接埠至因特網,以自定義網路安全性規則加以覆寫。 此設定的預設值為 false。 布爾 (bool)
applicationTypeVersionsCleanupPolicy 用來清除未使用版本的原則。 ApplicationTypeVersionsCleanupPolicy
輔助子網 叢集的輔助子網。 子網[]
azureActiveDirectory 叢集的 AAD 驗證設定。 AzureActiveDirectory
clientConnectionPort 用於與叢集之用戶端連線的埠。 整數 (int)
客戶 允許管理叢集的客戶端憑證。 用戶端證書
clusterCodeVersion 叢集的 Service Fabric 運行時間版本。 當 clusterUpgradeMode 設定為 'Manual' 時,需要此屬性。 若要取得新叢集可用的 Service Fabric 版本列表,請使用 ClusterVersion API。 若要取得現有叢集可用的版本清單,請使用 availableClusterVersions。 字串
clusterUpgradeCadence 指出發行新的叢集運行時間版本升級何時會套用。 根據預設為 Wave0。 只有在 clusterUpgradeMode 設定為 'Automatic' 時,才會套用叢集UpgradeMode。 'Wave0'
'Wave1'
'第 2 波'
clusterUpgradeMode 有新的 Service Fabric 執行時間版本可用時,叢集的升級模式。 “自動”
“手動”
dns名稱 叢集 dns 名稱。 字串 (必要)
enableAutoOSUpgrade 將此設定為 true 可針對使用任何平臺 OS 映射搭配版本 『latest』 建立的節點類型,啟用自動 OS 升級。 此設定的預設值為 false。 布爾 (bool)
啟用 Ipv6 將此設定為 true 會為叢集所使用的預設 VNet 建立 IPv6 位址空間。 建立叢集之後,就無法變更此設定。 此設定的預設值為 false。 布爾 (bool)
enableServicePublicIP 將此設定為 true 會將 IPv4 位址連結為 IPv6 位址的 ServicePublicIP。 只有在叢集上啟用 IPv6 時,才能將它設定為 True。 布爾 (bool)
fabricSettings 要設定叢集的自定義網狀架構設定清單。 SettingsSectionDescription[]
httpGatewayConnectionPort 用於叢集 HTTP 連線的埠。 整數 (int)
ip標籤 與叢集預設公用IP位址相關聯的IP標籤清單。 IPTag 標籤
loadBalancing規則 套用至叢集公用負載平衡器的負載平衡規則。 LoadBalancingRule[]
networkSecurityRules 自訂網路安全規則,套用於叢集的 虛擬網路。 NetworkSecurityRule[]
serviceEndpoints 叢集中子網的服務端點。 ServiceEndpoint[]
子網ID 如果指定,則會在此子網中建立叢集的節點類型,而不是預設的 VNet。 為叢集指定的 networkSecurityRules 也會套用至此子網。 建立叢集之後,就無法變更此設定。 字串
useCustomVnet 對於新的叢集,此參數表示其使用自備 VNet,但子網是在節點類型層級指定;對於這類叢集,節點類型需要subnetId屬性。 布爾 (bool)
zonalResiliency (區域彈性) 指出叢集是否有區域復原能力。 布爾 (bool)
zonalUpdateMode 指出跨 Az 叢集的更新模式。 “快”
“標準”

網路安全規則

名稱 說明 價值觀
訪問 允許或拒絕網路流量。 '允許'
'deny' (必要)
說明 網路安全性規則描述。 字串
destinationAddressPrefix 的 目的地位址前置詞。 CIDR 或目的地IP範圍。 星號 『*』 也可以用來比對所有來源 IP。 您也可以使用默認標籤,例如 'VirtualNetwork'、'AzureLoadBalancer' 和 'Internet'。 字串
destinationAddress前綴 目的地位址前置詞。 CIDR 或目的地IP範圍。 字串[]
destinationPortRange 他目的地埠或範圍。 介於 0 到 65535 之間的整數或範圍。 星號 『*』 也可以用來比對所有埠。 字串
destinationPortRanges 目的地埠範圍。 字串[]
方向 網路安全性規則方向。 “入站”
'outbound' (必要)
名稱 網路安全性規則名稱。 字串 (必要)
優先權 規則的優先順序。 此值的範圍可以是 1000 到 3000。 超出此範圍的值會保留給 Service Fabric ManagerCluster 資源提供者。 集合中每個規則的優先順序號碼必須是唯一的。 優先順序數位越低,規則的優先順序就越高。 int

約束:
最小值 = 1000
最大值 = 3000 (必要)
通訊協定 此規則適用的網路協定。 '啊'
'ESP'
“http”
'https'
'ICMP (國際貨幣委員會)
'tcp'
'udp' (必要)
sourceAddressPrefix 的 CIDR 或來源IP範圍。 星號 『*』 也可以用來比對所有來源 IP。 您也可以使用默認標籤,例如 'VirtualNetwork'、'AzureLoadBalancer' 和 'Internet'。 如果這是輸入規則,請指定網路流量的來源。 字串
sourceAddress前綴 CIDR 或來源IP範圍。 字串[]
sourcePortRange 來源埠或範圍。 介於 0 到 65535 之間的整數或範圍。 星號 『*』 也可以用來比對所有埠。 字串
sourcePort範圍 來源埠範圍。 字串[]

資源標籤

名稱 說明 價值觀

ServiceEndpoint 服務

名稱 說明 價值觀
地點 位置清單。 字串[]
服務 端點服務的型別。 字串 (必要)

SettingsParameterDescription

名稱 說明 價值觀
名稱 網狀架構設定的參數名稱。 字串 (必要)
價值 網狀架構設定的參數值。 字串 (必要)

SettingsSection描述

名稱 說明 價值觀
名稱 網狀架構設定的區段名稱。 字串 (必要)
參數 區段中的參數集合。 SettingsParameterDescription[] (必要)

SKU

名稱 說明 價值觀
名稱 Sku 名稱。 “基本”
'Standard' (必要)

子網路

名稱 說明 價值觀
啟用 Ipv6 表示啟用 Ipv6 或否。 如果未提供,則會採用與叢集相同的組態。 布爾 (bool)
名稱 子網名稱。 字串 (必要)
networkSecurityGroupId 網路安全組的完整資源標識碼。 字串
privateEndpointNetwork策略 在子網的私人端點上啟用或停用套用網路原則。 '已禁用'
'已啟用'
privateLinkServiceNetwork策略 在子網中的私人連結服務上啟用或停用套用網路原則。 '已禁用'
'已啟用'

ARM 樣本資源定義

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

使用範例

資源格式

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

{
  "type": "Microsoft.ServiceFabric/managedClusters",
  "apiVersion": "2023-02-01-preview",
  "name": "string",
  "location": "string",
  "properties": {
    "addonFeatures": [ "string" ],
    "adminPassword": "string",
    "adminUserName": "string",
    "allowRdpAccess": "bool",
    "applicationTypeVersionsCleanupPolicy": {
      "maxUnusedVersionsToKeep": "int"
    },
    "auxiliarySubnets": [
      {
        "enableIpv6": "bool",
        "name": "string",
        "networkSecurityGroupId": "string",
        "privateEndpointNetworkPolicies": "string",
        "privateLinkServiceNetworkPolicies": "string"
      }
    ],
    "azureActiveDirectory": {
      "clientApplication": "string",
      "clusterApplication": "string",
      "tenantId": "string"
    },
    "clientConnectionPort": "int",
    "clients": [
      {
        "commonName": "string",
        "isAdmin": "bool",
        "issuerThumbprint": "string",
        "thumbprint": "string"
      }
    ],
    "clusterCodeVersion": "string",
    "clusterUpgradeCadence": "string",
    "clusterUpgradeMode": "string",
    "dnsName": "string",
    "enableAutoOSUpgrade": "bool",
    "enableIpv6": "bool",
    "enableServicePublicIP": "bool",
    "fabricSettings": [
      {
        "name": "string",
        "parameters": [
          {
            "name": "string",
            "value": "string"
          }
        ]
      }
    ],
    "httpGatewayConnectionPort": "int",
    "ipTags": [
      {
        "ipTagType": "string",
        "tag": "string"
      }
    ],
    "loadBalancingRules": [
      {
        "backendPort": "int",
        "frontendPort": "int",
        "loadDistribution": "string",
        "probePort": "int",
        "probeProtocol": "string",
        "probeRequestPath": "string",
        "protocol": "string"
      }
    ],
    "networkSecurityRules": [
      {
        "access": "string",
        "description": "string",
        "destinationAddressPrefix": "string",
        "destinationAddressPrefixes": [ "string" ],
        "destinationPortRange": "string",
        "destinationPortRanges": [ "string" ],
        "direction": "string",
        "name": "string",
        "priority": "int",
        "protocol": "string",
        "sourceAddressPrefix": "string",
        "sourceAddressPrefixes": [ "string" ],
        "sourcePortRange": "string",
        "sourcePortRanges": [ "string" ]
      }
    ],
    "serviceEndpoints": [
      {
        "locations": [ "string" ],
        "service": "string"
      }
    ],
    "subnetId": "string",
    "useCustomVnet": "bool",
    "zonalResiliency": "bool",
    "zonalUpdateMode": "string"
  },
  "sku": {
    "name": "string"
  },
  "tags": {
    "{customized property}": "string"
  }
}

屬性值

Microsoft.ServiceFabric/managedClusters

名稱 說明 價值觀
apiVersion API 版本 “2023-02-01-預覽”
位置 Azure 資源位置。 字串 (必要)
名稱 資源名稱 字串 (必要)
屬性 受控叢集資源屬性 ManagedClusterProperties
SKU 受控叢集的SKU Sku (必要)
標記 資源標籤 標記名稱和值的字典。 請參閱範本中的 標籤
型別 資源類型 “Microsoft.ServiceFabric/managedClusters”

ApplicationTypeVersionsCleanupPolicy

名稱 說明 價值觀
maxUnusedVersionsToKeep 要保留的每個應用程式類型未使用的版本數目。 int

約束:
最小值 = 0 (必要)

AzureActiveDirectory

名稱 說明 價值觀
用戶端應用程式 Azure Active Directory client application id. 字串
cluster應用程式 Azure Active Directory cluster application id. 字串
租戶ID Azure Active Directory tenant id. 字串

用戶端憑證

名稱 說明 價值觀
通用名稱 憑證一般名稱。 字串
isAdmin 指出客戶端憑證是否具有叢集的系統管理員存取權。 非系統管理員用戶端只能在叢集上執行唯讀作業。 布林 (必要)
issuerThumbprint 憑證的簽發者指紋。 只能與 CommonName 搭配使用。 字串
指紋 憑證指紋。 字串

IPTag 標籤

名稱 說明 價值觀
ipTag類型 IP 標籤類型。 字串 (必要)
加標籤 IP 標籤的值。 字串 (必要)

LoadBalancing規則

名稱 說明 價值觀
backendPort 用於端點上內部連線的埠。 可接受的值介於 1 到 65535 之間。 int

約束:
最小值 = 1
最大值 = 65534 (必要)
frontendPort 外部端點的連接埠。 每個規則的埠號必須在 Load Balancer 內唯一。 可接受的值為 1 到 65534。 int

約束:
最小值 = 1
最大值 = 65534 (必要)
負載分佈 此規則的負載分配原則。 字串
探針埠 負載平衡規則所使用的探查埠。 可接受的值介於 1 到 65535 之間。 int

約束:
最小值 = 1
最大值 = 65534
探針協定 負載平衡規則所使用的負載平衡器探查參考。 “http”
'https'
'tcp' (必要)
探針請求路徑 探查要求路徑。 僅支援 HTTP/HTTPS 探查。 字串
通訊協定 負載平衡規則所使用的傳輸通訊協議參考。 'tcp'
'udp' (必要)

ManagedClusterProperties

名稱 說明 價值觀
addon功能 在叢集上啟用的附加元件功能清單。 包含任何的字串數組:
“BackupRestoreService”
“DnsService”
“ResourceMonitorService”
管理員密碼 VM 系統管理員用戶密碼。 字串

約束:
敏感性值。 以安全參數的形式傳入。
管理者用戶名 VM 系統管理員用戶名稱。 字串 (必要)
allowRdpAccess 將此設定為 true 可讓 RDP 存取 VM。 默認 NSG 規則會開啟 RDP 連接埠至因特網,以自定義網路安全性規則加以覆寫。 此設定的預設值為 false。 布爾 (bool)
applicationTypeVersionsCleanupPolicy 用來清除未使用版本的原則。 ApplicationTypeVersionsCleanupPolicy
輔助子網 叢集的輔助子網。 子網[]
azureActiveDirectory 叢集的 AAD 驗證設定。 AzureActiveDirectory
clientConnectionPort 用於與叢集之用戶端連線的埠。 整數 (int)
客戶 允許管理叢集的客戶端憑證。 用戶端證書
clusterCodeVersion 叢集的 Service Fabric 運行時間版本。 當 clusterUpgradeMode 設定為 'Manual' 時,需要此屬性。 若要取得新叢集可用的 Service Fabric 版本列表,請使用 ClusterVersion API。 若要取得現有叢集可用的版本清單,請使用 availableClusterVersions。 字串
clusterUpgradeCadence 指出發行新的叢集運行時間版本升級何時會套用。 根據預設為 Wave0。 只有在 clusterUpgradeMode 設定為 'Automatic' 時,才會套用叢集UpgradeMode。 'Wave0'
'Wave1'
'第 2 波'
clusterUpgradeMode 有新的 Service Fabric 執行時間版本可用時,叢集的升級模式。 “自動”
“手動”
dns名稱 叢集 dns 名稱。 字串 (必要)
enableAutoOSUpgrade 將此設定為 true 可針對使用任何平臺 OS 映射搭配版本 『latest』 建立的節點類型,啟用自動 OS 升級。 此設定的預設值為 false。 布爾 (bool)
啟用 Ipv6 將此設定為 true 會為叢集所使用的預設 VNet 建立 IPv6 位址空間。 建立叢集之後,就無法變更此設定。 此設定的預設值為 false。 布爾 (bool)
enableServicePublicIP 將此設定為 true 會將 IPv4 位址連結為 IPv6 位址的 ServicePublicIP。 只有在叢集上啟用 IPv6 時,才能將它設定為 True。 布爾 (bool)
fabricSettings 要設定叢集的自定義網狀架構設定清單。 SettingsSectionDescription[]
httpGatewayConnectionPort 用於叢集 HTTP 連線的埠。 整數 (int)
ip標籤 與叢集預設公用IP位址相關聯的IP標籤清單。 IPTag 標籤
loadBalancing規則 套用至叢集公用負載平衡器的負載平衡規則。 LoadBalancingRule[]
networkSecurityRules 自訂網路安全規則,套用於叢集的 虛擬網路。 NetworkSecurityRule[]
serviceEndpoints 叢集中子網的服務端點。 ServiceEndpoint[]
子網ID 如果指定,則會在此子網中建立叢集的節點類型,而不是預設的 VNet。 為叢集指定的 networkSecurityRules 也會套用至此子網。 建立叢集之後,就無法變更此設定。 字串
useCustomVnet 對於新的叢集,此參數表示其使用自備 VNet,但子網是在節點類型層級指定;對於這類叢集,節點類型需要subnetId屬性。 布爾 (bool)
zonalResiliency (區域彈性) 指出叢集是否有區域復原能力。 布爾 (bool)
zonalUpdateMode 指出跨 Az 叢集的更新模式。 “快”
“標準”

網路安全規則

名稱 說明 價值觀
訪問 允許或拒絕網路流量。 '允許'
'deny' (必要)
說明 網路安全性規則描述。 字串
destinationAddressPrefix 的 目的地位址前置詞。 CIDR 或目的地IP範圍。 星號 『*』 也可以用來比對所有來源 IP。 您也可以使用默認標籤,例如 'VirtualNetwork'、'AzureLoadBalancer' 和 'Internet'。 字串
destinationAddress前綴 目的地位址前置詞。 CIDR 或目的地IP範圍。 字串[]
destinationPortRange 他目的地埠或範圍。 介於 0 到 65535 之間的整數或範圍。 星號 『*』 也可以用來比對所有埠。 字串
destinationPortRanges 目的地埠範圍。 字串[]
方向 網路安全性規則方向。 “入站”
'outbound' (必要)
名稱 網路安全性規則名稱。 字串 (必要)
優先權 規則的優先順序。 此值的範圍可以是 1000 到 3000。 超出此範圍的值會保留給 Service Fabric ManagerCluster 資源提供者。 集合中每個規則的優先順序號碼必須是唯一的。 優先順序數位越低,規則的優先順序就越高。 int

約束:
最小值 = 1000
最大值 = 3000 (必要)
通訊協定 此規則適用的網路協定。 '啊'
'ESP'
“http”
'https'
'ICMP (國際貨幣委員會)
'tcp'
'udp' (必要)
sourceAddressPrefix 的 CIDR 或來源IP範圍。 星號 『*』 也可以用來比對所有來源 IP。 您也可以使用默認標籤,例如 'VirtualNetwork'、'AzureLoadBalancer' 和 'Internet'。 如果這是輸入規則,請指定網路流量的來源。 字串
sourceAddress前綴 CIDR 或來源IP範圍。 字串[]
sourcePortRange 來源埠或範圍。 介於 0 到 65535 之間的整數或範圍。 星號 『*』 也可以用來比對所有埠。 字串
sourcePort範圍 來源埠範圍。 字串[]

資源標籤

名稱 說明 價值觀

ServiceEndpoint 服務

名稱 說明 價值觀
地點 位置清單。 字串[]
服務 端點服務的型別。 字串 (必要)

SettingsParameterDescription

名稱 說明 價值觀
名稱 網狀架構設定的參數名稱。 字串 (必要)
價值 網狀架構設定的參數值。 字串 (必要)

SettingsSection描述

名稱 說明 價值觀
名稱 網狀架構設定的區段名稱。 字串 (必要)
參數 區段中的參數集合。 SettingsParameterDescription[] (必要)

SKU

名稱 說明 價值觀
名稱 Sku 名稱。 “基本”
'Standard' (必要)

子網路

名稱 說明 價值觀
啟用 Ipv6 表示啟用 Ipv6 或否。 如果未提供,則會採用與叢集相同的組態。 布爾 (bool)
名稱 子網名稱。 字串 (必要)
networkSecurityGroupId 網路安全組的完整資源標識碼。 字串
privateEndpointNetwork策略 在子網的私人端點上啟用或停用套用網路原則。 '已禁用'
'已啟用'
privateLinkServiceNetwork策略 在子網中的私人連結服務上啟用或停用套用網路原則。 '已禁用'
'已啟用'

Terraform (AzAPI 提供者) 資源定義

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

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

使用範例

Terraform 範例

部署資源群組的基本範例。

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

variable "admin_username" {
  type        = string
  description = "The administrator username for the Service Fabric managed cluster"
}

variable "admin_password" {
  type        = string
  description = "The administrator password for the Service Fabric managed cluster"
  sensitive   = true
}

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

resource "azapi_resource" "managedCluster" {
  type      = "Microsoft.ServiceFabric/managedClusters@2021-05-01"
  parent_id = azapi_resource.resourceGroup.id
  name      = var.resource_name
  location  = var.location
  body = {
    properties = {
      addonFeatures = [
        "DnsService",
      ]
      adminPassword             = var.admin_password
      adminUserName             = var.admin_username
      clientConnectionPort      = 12345
      clusterUpgradeCadence     = "Wave0"
      dnsName                   = var.resource_name
      httpGatewayConnectionPort = 23456
      loadBalancingRules = [
        {
          backendPort      = 8000
          frontendPort     = 443
          probeProtocol    = "http"
          probeRequestPath = "/"
          protocol         = "tcp"
        },
      ]
      networkSecurityRules = [
        {
          access = "allow"
          destinationAddressPrefixes = [
            "0.0.0.0/0",
          ]
          destinationPortRanges = [
            "443",
          ]
          direction = "inbound"
          name      = "rule443-allow-fe"
          priority  = 1000
          protocol  = "tcp"
          sourceAddressPrefixes = [
            "0.0.0.0/0",
          ]
          sourcePortRanges = [
            "1-65535",
          ]
        },
      ]
    }
    sku = {
      name = "Standard"
    }
    tags = {
      Test = "value"
    }
  }
  schema_validation_enabled = false
  response_export_values    = ["*"]
}

資源格式

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

resource "azapi_resource" "symbolicname" {
  type = "Microsoft.ServiceFabric/managedClusters@2023-02-01-preview"
  name = "string"
  parent_id = "string"
  location = "string"
  tags = {
    {customized property} = "string"
  }
  body = {
    properties = {
      addonFeatures = [
        "string"
      ]
      adminPassword = "string"
      adminUserName = "string"
      allowRdpAccess = bool
      applicationTypeVersionsCleanupPolicy = {
        maxUnusedVersionsToKeep = int
      }
      auxiliarySubnets = [
        {
          enableIpv6 = bool
          name = "string"
          networkSecurityGroupId = "string"
          privateEndpointNetworkPolicies = "string"
          privateLinkServiceNetworkPolicies = "string"
        }
      ]
      azureActiveDirectory = {
        clientApplication = "string"
        clusterApplication = "string"
        tenantId = "string"
      }
      clientConnectionPort = int
      clients = [
        {
          commonName = "string"
          isAdmin = bool
          issuerThumbprint = "string"
          thumbprint = "string"
        }
      ]
      clusterCodeVersion = "string"
      clusterUpgradeCadence = "string"
      clusterUpgradeMode = "string"
      dnsName = "string"
      enableAutoOSUpgrade = bool
      enableIpv6 = bool
      enableServicePublicIP = bool
      fabricSettings = [
        {
          name = "string"
          parameters = [
            {
              name = "string"
              value = "string"
            }
          ]
        }
      ]
      httpGatewayConnectionPort = int
      ipTags = [
        {
          ipTagType = "string"
          tag = "string"
        }
      ]
      loadBalancingRules = [
        {
          backendPort = int
          frontendPort = int
          loadDistribution = "string"
          probePort = int
          probeProtocol = "string"
          probeRequestPath = "string"
          protocol = "string"
        }
      ]
      networkSecurityRules = [
        {
          access = "string"
          description = "string"
          destinationAddressPrefix = "string"
          destinationAddressPrefixes = [
            "string"
          ]
          destinationPortRange = "string"
          destinationPortRanges = [
            "string"
          ]
          direction = "string"
          name = "string"
          priority = int
          protocol = "string"
          sourceAddressPrefix = "string"
          sourceAddressPrefixes = [
            "string"
          ]
          sourcePortRange = "string"
          sourcePortRanges = [
            "string"
          ]
        }
      ]
      serviceEndpoints = [
        {
          locations = [
            "string"
          ]
          service = "string"
        }
      ]
      subnetId = "string"
      useCustomVnet = bool
      zonalResiliency = bool
      zonalUpdateMode = "string"
    }
    sku = {
      name = "string"
    }
  }
}

屬性值

Microsoft.ServiceFabric/managedClusters

名稱 說明 價值觀
位置 Azure 資源位置。 字串 (必要)
名稱 資源名稱 字串 (必要)
屬性 受控叢集資源屬性 ManagedClusterProperties
SKU 受控叢集的SKU Sku (必要)
標記 資源標籤 標記名稱和值的字典。
型別 資源類型 “Microsoft.ServiceFabric/managedClusters@2023-02-01-preview”

ApplicationTypeVersionsCleanupPolicy

名稱 說明 價值觀
maxUnusedVersionsToKeep 要保留的每個應用程式類型未使用的版本數目。 int

約束:
最小值 = 0 (必要)

AzureActiveDirectory

名稱 說明 價值觀
用戶端應用程式 Azure Active Directory client application id. 字串
cluster應用程式 Azure Active Directory cluster application id. 字串
租戶ID Azure Active Directory tenant id. 字串

用戶端憑證

名稱 說明 價值觀
通用名稱 憑證一般名稱。 字串
isAdmin 指出客戶端憑證是否具有叢集的系統管理員存取權。 非系統管理員用戶端只能在叢集上執行唯讀作業。 布林 (必要)
issuerThumbprint 憑證的簽發者指紋。 只能與 CommonName 搭配使用。 字串
指紋 憑證指紋。 字串

IPTag 標籤

名稱 說明 價值觀
ipTag類型 IP 標籤類型。 字串 (必要)
加標籤 IP 標籤的值。 字串 (必要)

LoadBalancing規則

名稱 說明 價值觀
backendPort 用於端點上內部連線的埠。 可接受的值介於 1 到 65535 之間。 int

約束:
最小值 = 1
最大值 = 65534 (必要)
frontendPort 外部端點的連接埠。 每個規則的埠號必須在 Load Balancer 內唯一。 可接受的值為 1 到 65534。 int

約束:
最小值 = 1
最大值 = 65534 (必要)
負載分佈 此規則的負載分配原則。 字串
探針埠 負載平衡規則所使用的探查埠。 可接受的值介於 1 到 65535 之間。 int

約束:
最小值 = 1
最大值 = 65534
探針協定 負載平衡規則所使用的負載平衡器探查參考。 “http”
'https'
'tcp' (必要)
探針請求路徑 探查要求路徑。 僅支援 HTTP/HTTPS 探查。 字串
通訊協定 負載平衡規則所使用的傳輸通訊協議參考。 'tcp'
'udp' (必要)

ManagedClusterProperties

名稱 說明 價值觀
addon功能 在叢集上啟用的附加元件功能清單。 包含任何的字串數組:
“BackupRestoreService”
“DnsService”
“ResourceMonitorService”
管理員密碼 VM 系統管理員用戶密碼。 字串

約束:
敏感性值。 以安全參數的形式傳入。
管理者用戶名 VM 系統管理員用戶名稱。 字串 (必要)
allowRdpAccess 將此設定為 true 可讓 RDP 存取 VM。 默認 NSG 規則會開啟 RDP 連接埠至因特網,以自定義網路安全性規則加以覆寫。 此設定的預設值為 false。 布爾 (bool)
applicationTypeVersionsCleanupPolicy 用來清除未使用版本的原則。 ApplicationTypeVersionsCleanupPolicy
輔助子網 叢集的輔助子網。 子網[]
azureActiveDirectory 叢集的 AAD 驗證設定。 AzureActiveDirectory
clientConnectionPort 用於與叢集之用戶端連線的埠。 整數 (int)
客戶 允許管理叢集的客戶端憑證。 用戶端證書
clusterCodeVersion 叢集的 Service Fabric 運行時間版本。 當 clusterUpgradeMode 設定為 'Manual' 時,需要此屬性。 若要取得新叢集可用的 Service Fabric 版本列表,請使用 ClusterVersion API。 若要取得現有叢集可用的版本清單,請使用 availableClusterVersions。 字串
clusterUpgradeCadence 指出發行新的叢集運行時間版本升級何時會套用。 根據預設為 Wave0。 只有在 clusterUpgradeMode 設定為 'Automatic' 時,才會套用叢集UpgradeMode。 'Wave0'
'Wave1'
'第 2 波'
clusterUpgradeMode 有新的 Service Fabric 執行時間版本可用時,叢集的升級模式。 “自動”
“手動”
dns名稱 叢集 dns 名稱。 字串 (必要)
enableAutoOSUpgrade 將此設定為 true 可針對使用任何平臺 OS 映射搭配版本 『latest』 建立的節點類型,啟用自動 OS 升級。 此設定的預設值為 false。 布爾 (bool)
啟用 Ipv6 將此設定為 true 會為叢集所使用的預設 VNet 建立 IPv6 位址空間。 建立叢集之後,就無法變更此設定。 此設定的預設值為 false。 布爾 (bool)
enableServicePublicIP 將此設定為 true 會將 IPv4 位址連結為 IPv6 位址的 ServicePublicIP。 只有在叢集上啟用 IPv6 時,才能將它設定為 True。 布爾 (bool)
fabricSettings 要設定叢集的自定義網狀架構設定清單。 SettingsSectionDescription[]
httpGatewayConnectionPort 用於叢集 HTTP 連線的埠。 整數 (int)
ip標籤 與叢集預設公用IP位址相關聯的IP標籤清單。 IPTag 標籤
loadBalancing規則 套用至叢集公用負載平衡器的負載平衡規則。 LoadBalancingRule[]
networkSecurityRules 自訂網路安全規則,套用於叢集的 虛擬網路。 NetworkSecurityRule[]
serviceEndpoints 叢集中子網的服務端點。 ServiceEndpoint[]
子網ID 如果指定,則會在此子網中建立叢集的節點類型,而不是預設的 VNet。 為叢集指定的 networkSecurityRules 也會套用至此子網。 建立叢集之後,就無法變更此設定。 字串
useCustomVnet 對於新的叢集,此參數表示其使用自備 VNet,但子網是在節點類型層級指定;對於這類叢集,節點類型需要subnetId屬性。 布爾 (bool)
zonalResiliency (區域彈性) 指出叢集是否有區域復原能力。 布爾 (bool)
zonalUpdateMode 指出跨 Az 叢集的更新模式。 “快”
“標準”

網路安全規則

名稱 說明 價值觀
訪問 允許或拒絕網路流量。 '允許'
'deny' (必要)
說明 網路安全性規則描述。 字串
destinationAddressPrefix 的 目的地位址前置詞。 CIDR 或目的地IP範圍。 星號 『*』 也可以用來比對所有來源 IP。 您也可以使用默認標籤,例如 'VirtualNetwork'、'AzureLoadBalancer' 和 'Internet'。 字串
destinationAddress前綴 目的地位址前置詞。 CIDR 或目的地IP範圍。 字串[]
destinationPortRange 他目的地埠或範圍。 介於 0 到 65535 之間的整數或範圍。 星號 『*』 也可以用來比對所有埠。 字串
destinationPortRanges 目的地埠範圍。 字串[]
方向 網路安全性規則方向。 “入站”
'outbound' (必要)
名稱 網路安全性規則名稱。 字串 (必要)
優先權 規則的優先順序。 此值的範圍可以是 1000 到 3000。 超出此範圍的值會保留給 Service Fabric ManagerCluster 資源提供者。 集合中每個規則的優先順序號碼必須是唯一的。 優先順序數位越低,規則的優先順序就越高。 int

約束:
最小值 = 1000
最大值 = 3000 (必要)
通訊協定 此規則適用的網路協定。 '啊'
'ESP'
“http”
'https'
'ICMP (國際貨幣委員會)
'tcp'
'udp' (必要)
sourceAddressPrefix 的 CIDR 或來源IP範圍。 星號 『*』 也可以用來比對所有來源 IP。 您也可以使用默認標籤,例如 'VirtualNetwork'、'AzureLoadBalancer' 和 'Internet'。 如果這是輸入規則,請指定網路流量的來源。 字串
sourceAddress前綴 CIDR 或來源IP範圍。 字串[]
sourcePortRange 來源埠或範圍。 介於 0 到 65535 之間的整數或範圍。 星號 『*』 也可以用來比對所有埠。 字串
sourcePort範圍 來源埠範圍。 字串[]

資源標籤

名稱 說明 價值觀

ServiceEndpoint 服務

名稱 說明 價值觀
地點 位置清單。 字串[]
服務 端點服務的型別。 字串 (必要)

SettingsParameterDescription

名稱 說明 價值觀
名稱 網狀架構設定的參數名稱。 字串 (必要)
價值 網狀架構設定的參數值。 字串 (必要)

SettingsSection描述

名稱 說明 價值觀
名稱 網狀架構設定的區段名稱。 字串 (必要)
參數 區段中的參數集合。 SettingsParameterDescription[] (必要)

SKU

名稱 說明 價值觀
名稱 Sku 名稱。 “基本”
'Standard' (必要)

子網路

名稱 說明 價值觀
啟用 Ipv6 表示啟用 Ipv6 或否。 如果未提供,則會採用與叢集相同的組態。 布爾 (bool)
名稱 子網名稱。 字串 (必要)
networkSecurityGroupId 網路安全組的完整資源標識碼。 字串
privateEndpointNetwork策略 在子網的私人端點上啟用或停用套用網路原則。 '已禁用'
'已啟用'
privateLinkServiceNetwork策略 在子網中的私人連結服務上啟用或停用套用網路原則。 '已禁用'
'已啟用'