Description
I am following bellow doc to renew service fabric certs..
https://docs.microsoft.com/en-us/azure/service-fabric/service-fabric-cluster-rollover-cert-cn
certPS.txt
Getting following errors on couple instances:
PS C:\WINDOWS\system32> $keyVault = Get-AzureRmKeyVault -VaultName $VaultName -ResourceGroupName $KeyVaultResourceGroupName -Location $region
Get-AzureRmKeyVault : Parameter set cannot be resolved using the specified named parameters.
At line:1 char:13
- $keyVault = Get-AzureRmKeyVault -VaultName $VaultName -ResourceGroupN ...
-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- CategoryInfo : InvalidArgument: (:) [Get-AzureRmKeyVault], ParameterBindingException
- FullyQualifiedErrorId : AmbiguousParameterSet,Microsoft.Azure.Commands.KeyVault.GetAzureKeyVault
PS C:\WINDOWS\system32> Update-AzureRmVmss -ResourceGroupName $VmssResourceGroupName -Name $VmssName -VirtualMachineScaleSet $vmss -Verbose
VERBOSE: Performing the operation "Update" on target "scaleset".
Update-AzureRmVmss : List secrets contains repeated instances of
/subscriptions/.../resourceGroups/.../providers/Microsoft.KeyVault/vaults/, which is disallowed.
ErrorCode: InvalidParameter
ErrorMessage: List secrets contains repeated instances of
/subscriptions//resourceGroups//providers/Microsoft.KeyVault/vaults/*, which is disallowed.
ErrorTarget: sourceVault.id
StatusCode: 400
ReasonPhrase: Bad Request
OperationID : ***
At line:1 char:1
- Update-AzureRmVmss -ResourceGroupName $VmssResourceGroupName -Name $V ...
-
+ CategoryInfo : CloseError: (:) [Update-AzureRmVmss], ComputeCloudException + FullyQualifiedErrorId : Microsoft.Azure.Commands.Compute.Automation.UpdateAzureRmVmss
Two questions...
1.
Why I have to create a new RG and if I do, by using my existing one, will it override it and all its contents?
The script creates a new RG , which I skipped since I already have a RG and a Keyvault that Im trying to update its cert (pfx).
Create new Resource Group
New-AzureRmResourceGroup -Name $KeyVaultResourceGroupName -Location $region
Get the key vault. The key vault must be enabled for deployment.
$keyVault = Get-AzureRmKeyVault -VaultName $VaultName -ResourceGroupName $KeyVaultResourceGroupName
$resourceId = $keyVault.ResourceId
On the "Update-AzureRmVmss : List secrets contains repeated instances of...which is disallowed."
I guess this has to do with using the same keyVault and existing secrets, how do I fix it.
https://docs.microsoft.com/en-us/azure/virtual-machine-scale-sets/virtual-machine-scale-sets-faq
BTW I see the cert is renewed (at least I see the new thumbprint" in the keyvault.
Excuse the ignorance and thank you.