Note
This step creates an Azure Key Vault to store secrets for IaC deployments and a storage account for Terraform backend. It is strongly recommended to create a new resource group to put the resources for IaC, including the key vault and the Terraform backend storage account.
Create a key vault here. This Key Vault will be used to store secrets for deployments.
Open .pipelines/templates/site-cd-steps.yml
, change the following <your_key_vault_name>
to the key vault name you just created.
- name: keyVaultName
type: string
default: <your_key_vault_name> # TODO: Change this to your key vault name
Check Secrets Structure to learn more.
Create a storage account here. Better not to use LRS account because this account is used to record current state of all resources for all sites.
Create a new blob container in the storage account.
Open .azure/backendTemplate.tf
in this repository. Replace <ResourceGroupName>
, <StorageAccountName>
, <StorageContainerName>
to the storage account and container you just created.
Commit .azure/backendTemplate.tf
by running git commit
and the run git push
to push the changes to the remote branch.