【发布时间】:2019-10-22 08:33:10
【问题描述】:
我正在准备在 azure 上创建一个服务结构集群,但是当我执行时 下一个脚本:
#Provide the subscription Id
$subscriptionId = 'yourSubscriptionId'
# Certificate variables.
$certpwd="Password#1234" | ConvertTo-SecureString -AsPlainText -Force
$certfolder="c:\mycertificates\"
# Variables for VM admin.
$adminuser="vmadmin"
$adminpwd="Password#1234" | ConvertTo-SecureString -AsPlainText -Force
# Variables for common values
$clusterloc="SouthCentralUS"
$clustername = "mysfcluster"
$groupname="mysfclustergroup"
$vmsku = "Standard_D2_v2"
$vaultname = "mykeyvault"
$subname="$clustername.$clusterloc.cloudapp.azure.com"
# Set the number of cluster nodes. Possible values: 1, 3-99
$clustersize=5
# Set the context to the subscription Id where the cluster will be created
Select-AzSubscription -SubscriptionId $subscriptionId
# Create the Service Fabric cluster.
New-AzServiceFabricCluster -Name $clustername -ResourceGroupName $groupname - Location $clusterloc `
- ClusterSize $clustersize -VmUserName $adminuser -VmPassword $adminpwd
- CertificateSubjectName $subname `
- CertificatePassword $certpwd -CertificateOutputFolder $certfolder `
- OS WindowsServer2016DatacenterwithContainers -VmSku $vmsku -KeyVaultName
$vaultname
powershell 控制台显示此错误:
广告:未设置访问策略。没有用户或应用程序有权使用此保管库。请使用 Set -AzKeyVaultAccessPolicy 设置访问策略。
我正在关注本指南:https://docs.microsoft.com/es-es/azure/service-fabric/service-fabric-quickstart-containers#feedback
# Create the Service Fabric cluster.
New-AzServiceFabricCluster -Name $clustername -ResourceGroupName $groupname - Location $clusterloc `
- ClusterSize $clustersize -VmUserName $adminuser -VmPassword $adminpwd
- CertificateSubjectName $subname `
- CertificatePassword $certpwd -CertificateOutputFolder $certfolder `
- OS WindowsServer2016DatacenterwithContainers -VmSku $vmsku -KeyVaultName
$vaultname
广告:未设置访问策略。没有用户或应用程序有权使用此保管库。请使用 Set -AzKeyVaultAccessPolicy 设置访问策略。
【问题讨论】: