Disk
The following example will deploy a Resource Group and a managed disk into an Azure subscription.
---
Connection:
# Replace the TenantId and SubscriptionID with your values
- Name: az-jd-sub1
Azure:
Environment: AzureCloud
TenantId: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
Context:
SubscriptionId: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
# -------------------------------------------------------------------------------------------------------------------
azResourceGroup:
# Mandatory
- Name: rg-jdex-disk
ConnectionName: az-jd-sub1
Location: uksouth
# Optional
Tag:
CostCentre: '666'
ProjectManager: 'Fred Smith'
Lock:
- Name: lock-rg
Level: CanNotDelete # CanNotDelete, ReadOnly
Notes: 'stop deletion'
azDisk:
# Mandatory
- Name: dsk-jdex-disk
ConnectionName: az-jd-sub1
ResourceGroupName: rg-jdex-disk
Location: uksouth
Sku: UltraSSD_LRS # Standard_LRS, StandardSSD_LRS, StandardSSD_ZRS, Premium_LRS, Premium_ZRS, UltraSSD_LRS
Zone: 1
DiskSizeGB: 64
# Optional
OsType: Windows # Windows (D), soon Linux
MaxSharesCount: 2 # 1 - 5
LogicalSectorSizeBytes: 512 # For Ultra disks only
Lock:
- Name: lock-disk
Level: CanNotDelete # CanNotDelete, ReadOnly
Notes: 'stop deletion'
Tag:
CostCentre: '666'
ProjectManager: 'Fred Smith'
Copy the above into a new .yml file and substitute in your tenant and subscription ids.
Validation
Execute the following powershell command to validate your resources. You will be prompted to authenticate to Azure with a suitable Microsoft account. Please ensure the account you choose has the relevant permissions to check your resources.
Confirm-JDResource -Verbose -Type All -DeploymentFile "<filename>.yml"
The above command will validate the resources in the yaml file. The -Type parameter allows the execution of just part of a yaml file that may contain other resource types.
Deployment
Execute the following powershell command to deploy your resources. You will be prompted to authenticate to Azure with a suitable Microsoft account. Please ensure the account you choose has the relevant permissions to check your resources.
Deploy-JDResource -Verbose -Type All -DeploymentFile "<filename>.yml"
The above command will create all resource types in the yaml file. The -Type parameter allows the execution of just part of a yaml file that may contain other resource types.