To understand it, please read the article Learning hub-spoke with Packet Tracer and deploying it through Terraform on Azure.
- Create a service principal on Azure.
- Configure the following environment variables in
docker-compose.yml
file:- ARM_CLIENT_ID
- ARM_CLIENT_SECRET
- ARM_TENANT_ID
- ARM_SUBSCRIPTION_ID
Run the following command to start the container:
docker compose run --rm docker-client-tf-did bash
To create the infrastructure, run the following command:
terraform init
terraform apply
tfsec .
terrascan scan --iac-type terraform
Inside the container, run the following command:
az login \
--service-principal \
-t $ARM_TENANT_ID \
-u $ARM_CLIENT_ID \
-p $ARM_CLIENT_SECRET
Now, for example, you can list SKU's available to create virtual machines by running:
az vm list-skus --location westus2 --output table