- Clone the repository -
git clone https://github.com/Satyricon/terraform-infra-bootstrap.git
- Login and set target Azure subscription -
az login
,az account set --subscription SUBSCRIPTION_ID
- Setup connection to Azure DevOps Organization
- login to your Azure DevOps Organization
- Create Personal Access Token with Agent Pools (Read & manage) scope
- Export or add to your .bashrc or .zshrc file the follwong environment variables
AZDO_ORG_SERVICE_URL=https://dev.azure.com/ORG_NAME
AZDO_PERSONAL_ACCESS_TOKEN=PAT_TOKEN_FROM_ADO
TF_VAR_azure_dev_ops_pat=PAT_TOKEN_FROM_ADO
- Initialize Terraform -
terraform init
- Create
.tfvars
file for your target environment undervars/
directory - Run Terraform plan with corresponding tfvars file -
terraform plan -var-file vars/demo.tfvars
. Check the output - Apply Terraform project -
terraform apply -var-file vars/demo.tfvars
- Save the outputs
- Check created resources through Azure Portal