@@ -377,86 +377,87 @@ The Azure PowerShell can be used to deploy the Key Vault VM extension to an exis
377
377
378
378
### [ Version-3.0] ( #tab/version3 )
379
379
380
- ```powershell
380
+ ``` powershell
381
381
382
- # Build settings
383
- $settings = '{"secretsManagementSettings":
384
- { "pollingIntervalInS": "' + <pollingInterval> +
385
- '", "certificateStoreName": "' + <certStoreName> +
386
- '", "certificateStoreLocation": "' + <certStoreLoc> +
387
- '", "observedCertificates": ["' + <observedCert1> + '","' + <observedCert2> + '"] } }'
388
- $extName = "KeyVaultForLinux"
389
- $extPublisher = "Microsoft.Azure.KeyVault"
390
- $extType = "KeyVaultForLinux"
382
+ # Build settings
383
+ $settings = '{"secretsManagementSettings":
384
+ { "pollingIntervalInS": "' + <pollingInterval> +
385
+ '", "certificateStoreName": "' + <certStoreName> +
386
+ '", "certificateStoreLocation": "' + <certStoreLoc> +
387
+ '", "observedCertificates": ["' + <observedCert1> + '","' + <observedCert2> + '"] } }'
388
+ $extName = "KeyVaultForLinux"
389
+ $extPublisher = "Microsoft.Azure.KeyVault"
390
+ $extType = "KeyVaultForLinux"
391
391
392
392
393
- # Start the deployment
394
- Set-AzVmExtension -TypeHandlerVersion "2.0" -EnableAutomaticUpgrade true -ResourceGroupName <ResourceGroupName> -Location <Location> -VMName <VMName> -Name $extName -Publisher $extPublisher -Type $extType -SettingString $settings
393
+ # Start the deployment
394
+ Set-AzVmExtension -TypeHandlerVersion "2.0" -EnableAutomaticUpgrade true -ResourceGroupName <ResourceGroupName> -Location <Location> -VMName <VMName> -Name $extName -Publisher $extPublisher -Type $extType -SettingString $settings
395
395
396
- ```
396
+ ```
397
397
398
398
* To deploy the extension on a virtual machine scale set:
399
399
400
- ``` powershell
400
+ ``` powershell
401
401
402
- # Build settings
403
- $settings = '{"secretsManagementSettings":
404
- { "pollingIntervalInS": "' + <pollingInterval> +
405
- '", "certificateStoreName": "' + <certStoreName> +
406
- '", "certificateStoreLocation": "' + <certStoreLoc> +
407
- '", "observedCertificates": ["' + <observedCert1> + '","' + <observedCert2> + '"] } }'
408
- $extName = "KeyVaultForLinux"
409
- $extPublisher = "Microsoft.Azure.KeyVault"
410
- $extType = "KeyVaultForLinux"
402
+ # Build settings
403
+ $settings = '{"secretsManagementSettings":
404
+ { "pollingIntervalInS": "' + <pollingInterval> +
405
+ '", "certificateStoreName": "' + <certStoreName> +
406
+ '", "certificateStoreLocation": "' + <certStoreLoc> +
407
+ '", "observedCertificates": ["' + <observedCert1> + '","' + <observedCert2> + '"] } }'
408
+ $extName = "KeyVaultForLinux"
409
+ $extPublisher = "Microsoft.Azure.KeyVault"
410
+ $extType = "KeyVaultForLinux"
411
411
412
- # Add Extension to VMSS
413
- $vmss = Get-AzVmss -ResourceGroupName <ResourceGroupName> -VMScaleSetName <VmssName>
414
- Add-AzVmssExtension -VirtualMachineScaleSet $vmss -Name $extName -Publisher $extPublisher -Type $extType -TypeHandlerVersion "2.0" -EnableAutomaticUpgrade true -Setting $settings
412
+ # Add Extension to VMSS
413
+ $vmss = Get-AzVmss -ResourceGroupName <ResourceGroupName> -VMScaleSetName <VmssName>
414
+ Add-AzVmssExtension -VirtualMachineScaleSet $vmss -Name $extName -Publisher $extPublisher -Type $extType -TypeHandlerVersion "2.0" -EnableAutomaticUpgrade true -Setting $settings
415
415
416
- # Start the deployment
417
- Update-AzVmss -ResourceGroupName <ResourceGroupName> -VMScaleSetName <VmssName> -VirtualMachineScaleSet $vmss
418
- ```
416
+ # Start the deployment
417
+ Update-AzVmss -ResourceGroupName <ResourceGroupName> -VMScaleSetName <VmssName> -VirtualMachineScaleSet $vmss
418
+ ```
419
419
420
420
### [ Version-1.0/2.0] ( #tab/version12 )
421
421
422
- ```powershell
423
- # Build settings
424
- $settings = '{"secretsManagementSettings":
425
- { "pollingIntervalInS": "' + <pollingInterval> +
426
- '", "certificateStoreName": "' + <certStoreName> +
427
- '", "certificateStoreLocation": "' + <certStoreLoc> +
428
- '", "observedCertificates": ["' + <observedCert1> + '","' + <observedCert2> + '"] } }'
429
- $extName = "KeyVaultForLinux"
430
- $extPublisher = "Microsoft.Azure.KeyVault"
431
- $extType = "KeyVaultForLinux"
422
+ ``` powershell
423
+ # Build settings
424
+ $settings = '{"secretsManagementSettings":
425
+ { "pollingIntervalInS": "' + <pollingInterval> +
426
+ '", "certificateStoreName": "' + <certStoreName> +
427
+ '", "certificateStoreLocation": "' + <certStoreLoc> +
428
+ '", "observedCertificates": ["' + <observedCert1> + '","' + <observedCert2> + '"] } }'
429
+ $extName = "KeyVaultForLinux"
430
+ $extPublisher = "Microsoft.Azure.KeyVault"
431
+ $extType = "KeyVaultForLinux"
432
432
433
433
434
- # Start the deployment
435
- Set-AzVmExtension -TypeHandlerVersion "2.0" -EnableAutomaticUpgrade true -ResourceGroupName <ResourceGroupName> -Location <Location> -VMName <VMName> -Name $extName -Publisher $extPublisher -Type $extType -SettingString $settings
434
+ # Start the deployment
435
+ Set-AzVmExtension -TypeHandlerVersion "2.0" -EnableAutomaticUpgrade true -ResourceGroupName <ResourceGroupName> -Location <Location> -VMName <VMName> -Name $extName -Publisher $extPublisher -Type $extType -SettingString $settings
436
436
437
- ```
437
+ ```
438
438
439
439
* To deploy the extension on a virtual machine scale set:
440
440
441
- ```powershell
442
-
443
- # Build settings
444
- $settings = '{"secretsManagementSettings":
445
- { "pollingIntervalInS": "' + <pollingInterval> +
446
- '", "certificateStoreName": "' + <certStoreName> +
447
- '", "certificateStoreLocation": "' + <certStoreLoc> +
448
- '", "observedCertificates": ["' + <observedCert1> + '","' + <observedCert2> + '"] } }'
449
- $extName = "KeyVaultForLinux"
450
- $extPublisher = "Microsoft.Azure.KeyVault"
451
- $extType = "KeyVaultForLinux"
441
+ ``` powershell
452
442
453
- # Add Extension to VMSS
443
+ # Build settings
444
+ $settings = '{"secretsManagementSettings":
445
+ { "pollingIntervalInS": "' + <pollingInterval> +
446
+ '", "certificateStoreName": "' + <certStoreName> +
447
+ '", "certificateStoreLocation": "' + <certStoreLoc> +
448
+ '", "observedCertificates": ["' + <observedCert1> + '","' + <observedCert2> + '"] } }'
449
+ $extName = "KeyVaultForLinux"
450
+ $extPublisher = "Microsoft.Azure.KeyVault"
451
+ $extType = "KeyVaultForLinux"
452
+
453
+ # Add Extension to VMSS
454
454
$vmss = Get-AzVmss -ResourceGroupName <ResourceGroupName> -VMScaleSetName <VmssName>
455
455
Add-AzVmssExtension -VirtualMachineScaleSet $vmss -Name $extName -Publisher $extPublisher -Type $extType -TypeHandlerVersion "2.0" -EnableAutomaticUpgrade true -Setting $settings
456
456
457
457
# Start the deployment
458
458
Update-AzVmss -ResourceGroupName <ResourceGroupName> -VMScaleSetName <VmssName> -VirtualMachineScaleSet $vmss
459
- ```
459
+ ```
460
+
460
461
---
461
462
462
463
## Azure CLI deployment
0 commit comments