Terraform deploy with CI/CD Pipeline with Azure Devops
This code has not been tested on production environments. This is only for Development and testing purposes
Pre-Reqs
- Azure Subscription
- Service Principal (ID & ClientSecret) with Contributor role to desired sub
- Azure DevOps
How To Use
- Fork to your Repo
- Import repo to Az Devops
- Create a Pipeline
- Add Terraform Step for Init using the Assistant a) Create variables with the assistant for Name, Location, resourceGroup, clientID, clientSecret b) on Arguments refer to all of the variables mentioned above using this format -var="Name=$(Name)" -var="resourceGroup=$(resourceGroup)"
- Add Terraform Validate and Apply