0
votes

I´m traying to create a service fabric cluster on azure but when I execute the next script:

   #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

the powershell console show this error:

ADVERTENCIA: Access policy is not set. No user or application have access permission to use this vault. Please use Set -AzKeyVaultAccessPolicy to set access policies.

I´m following this guide: 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

ADVERTENCIA: Access policy is not set. No user or application have access permission to use this vault. Please use Set -AzKeyVaultAccessPolicy to set access policies.

1

1 Answers

1
votes

I believe you're running into an existing issue. The workaround is to manually define the Key Vault access policy to allow the Resource Manager to access the Key Vault during template deployment.