KeyVault

The Azure Key Vault provides a secure store for secrets, keys and certificates.

The following example will deploy a Key Vault into a Resource Group within an existing 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-keyvault
    ConnectionName: az-jd-sub1
    Location: uksouth
    # Optional
    Tag:
      CostCentre: '666'
      ProjectManager: 'Fred Smith'
    Lock:
      - Name: lock-rg
        Level: CanNotDelete                   # CanNotDelete, ReadOnly
        Notes: 'stop deletion'

azKeyVault:
    # Mandatory
  - Name: kv-jdex-keyvault
    ConnectionName: az-jd-sub1
    ResourceGroupName: rg-jdex-keyvault
    Location: uksouth
    # Optional
    Sku:                                      # Standard (d), Premium
    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.