Terraform and Azure DevOps – Delivering a continuous and automated deployment | DevOps Lab

preview_player
Показать описание
In this episode, Abel sits down again with April Edwards to talk about using Terraform to provision infrastructure through pipelines with the help of Azure DevOps
By using Azure DevOps and Terraform, we're able to simplify processes from build to deployment. Gone are the days of having to do everything manually- now with a user-friendly UI, we can automate and version control with ease.

April walks through the basics of pipelines, storage accounts, replacing tokens, why we deploy to the latest version of Terraform, and the benefits of automatic versioning built into Terraform. Companies want to enable logging, track, enable borders, and it's all here built in and integrated with Azure DevOps!
[00:20] - Terraform with pipelines intro
[01:20] - Pipelines intro
[03:30] - Release pipelines demo
[04:40] - State Files demo
[06:40] - Versioning demo
[07:55] - Authentication demo

Рекомендации по теме
Комментарии
Автор

Keep the secrets in Azure KeyVault preferably, as you can bind a variable group to a keyvault
Preferably dont use a token replacement as a step in a definition, instead use a different tf file per environment and call if from the tf plan / tf apply using '-varfile =..'
last but not least, dont do apply in the same job. Use an intervention / pre approval step to look at the results of the tf plan output plan to make sure youre not removing resources because of bugs in terraform, especially in Prod (it happened before). You can use locks on the resource s to prevent it or force some thinking into the process and not do it "blindly".

arieheinrich
Автор

Any way you can show a demo of this in action? Great video, but very handwavy explanation. This seems great (in theory) for a very simple project, but I'm currently struggling with scaling this type of solution across multiple terraform states that span projects. Really hate the idea of auto-applying without the ability to review the plan before hand. Bad things can happen if you don't review your plan output before applying. How is this working for you in production?

SaveTheAyeAye
Автор

Guys, we need similar demo using yaml release pipeline, and, ideally, github repo with demo code

yahorsinkevich
Автор

Can we please get the code used here to test it on Azure devops ?

pardesi_swiss