This is a sample that allows to create infrastructure in Azure cloud using IaC concept with tools such as Terraform, Ansible and Azure Resource Manager.
- Type some Markdown on the left
- See HTML in the right
- Magic
You must create your Azure DevOps project that will contain the automated pipelines that deploy the infraestructure to the cloud.
Where I use {YOURORG}
, you'll replace with the organization that you create.
- Open https://dev.azure.com
- Create a new organization
- Create the first project - name it
AzBootCamp2019
After you create your organization and project within Azure Devops you can proceed to create your automated pipeline.
- Create a new Release Pipeline
- Add an artifact, in this case your Github repo where your terraform code is hosted. You should add a new connection to your github in services management.
- Add a stage, e.g.: Dev or Prod. This stage should be an empty job.
Select the Azure CLI task. Select the Azure subscription from the drop-down list and click Authorize to configure Azure service connection. Get your automation script from the repo. Note that the bash script will receive some arguments.
By default, Terraform stores state locally in a file named terraform.tfstate. When working with Terraform in a team, use of a local file makes Terraform usage complicated. With remote state, Terraform writes the state data to a remote data store. Here we are using Azure CLI task to create Azure storage account and storage container to store Terraform state. For more information on Terraform remote state click here