Is Azure DevOps THE way to deploy Infrastructure as code?

Why is Azure DevOps deployed at Infrastructure as Code Environments?

With DevOps people, processes and technology come together and the delivery of software is automated for a continuous value for your users. Deliver software faster and more reliably with Azure DevOps solutions, no matter how large your IT department is or what tools you use.

– Azure DevOps supports the business desire to be able to deliver functionality faster and faster.
– By deploying Azure DevOps you have full control over the configuration of the environment.
– Fully automated roll-out to development, staging and production.
– Infrastructure as Code can easily be reused
– Automate testing, security models in the pipeline or Azure DevOps.

How does Azure DevOps work in combination with Terraform?

When you have written Infrastructure as code in Terraform and you need to deploy the code to a Cloud Environment. Use Microsoft Azure DevOps to manage to code and structure.
For this case we have a Repository with a Branch named “Development” this branch is used for Azure DevOps Pipeline.

Add a Artifact for example Azure Repos …

cloudnation_terraform_iac01

The different stages can be designed from the Arftifact. Stage one is a KeyVault solution, which is first deployed to be able to manage identities in a secure way.

Then in Stage 2 the functionalities for the entire network are published and in the last step the complete Kubernetes Cluster is added to the environment.

When these 3 stages are deployed, the result is a complete infrastructure on Microsoft Azure with an open source Kubernetes Cluster.

cloudnation_terraform_iac

Tasks are defined as part of stages 1. In this example, exactly the terraform deployment flow is used. See figure terraform flow.

terraformworkflow

cloudnation_terraform_iac06

cloudnation_terraform_iac07

cloudnation_terraform_iac08

Azure DevOps contains thousands of predefined tasks that can be used as part of the stages. Terraform is also available from the marketplace. In this example, 2 types of tasks were used. A terraform task for specifying the terraform version and a task to support the flow description. 3 times the same task used with a different configuration. (init, plan and apply)

cloudnation_terraform_iac09

cloudnation_terraform_iac03

Once all tasks have been configured, the 3 stages can be completed with all tasks. A green or red status is shown for each step. Here it is immediately clear in one overview what the quality of the rollout around the environment has been implemented.
As configuration of the steps, the current azure subscription is linked to make sure that the right task is executed in the right environment.

cloudnation_terraform_iac04
cloudnation_terraform_iac02

There is also the possibility to reuse stages as a whole. There is a clone option in the Azure DevOps platform as shown below.

cloudnation_terraform_iac05

At this moment a complete pipeline has been set up for the roll-out on the development environment. As soon as the environment is staging and production available, the steps can be added with the right subscription and everything deployed in 1 full flow. It is possible to bring certain changes directly from development to production and to add automated tests.

 

cloudnation_terraform_iac

* If there are any questions about the configuration terraform as Infrastructure as Code please contact me

Benefits

The advantages of platform and software can be implemented from Azure DevOps

– more structure
– higher quality
– faster delivery
– automated testing

Finally, minimize human errors during deployments

“When the templates are ready in about 45 minutes there is a keyvault solution, a network with BastionHost, managed database, storage account and a fully kubernetes cluster deployed to Microsoft Azure Platform otherwise it will take days to deploy this with the same quality.

Quickly work with Azure DevOps and Terraform:
Microsoft Azure DevOps

Terraform