ULTIMATE SHOWDOWN: Azure Bicep vs. Terraform

  Рет қаралды 2,645

Azure Terraformer

Azure Terraformer

Жыл бұрын

We'll do a deep dive comparison between Azure Bicep code against equivalent Terraform code that provisions an Azure Open AI service account. We'll compare our ARM template against both equivalent "azurerm" and "azapi" terraform provider implementations.
Follow me on Twitter for quick code snippets and thoughts on Cloud, Automation and other things!
/ marktinderholt
Keep the knowledge flowing!
www.buymeacoffee.com/azterraf...

Пікірлер: 18
@brettgmonroe
@brettgmonroe Жыл бұрын
7:56 random_string is a resource (and not a function) in Terraform because functions are evaluated every time Terraform plan/apply is run so a random() function would 'taint' whatever resource was using it because each run would evaluate a different random number. See the uuid() function in the docs for a brief mention/warning about this sort of thing. Ideally, you will want your random string to be stateful for the lifecycle of whatever resource consumes it. Because of that, it needs to be a a resource itself.
@azure-terraformer
@azure-terraformer Жыл бұрын
Right on! I love the random provider!
@arimill1045
@arimill1045 8 ай бұрын
When deploying with an ADO pipeline I tend to lean on Bicep, the default build containers don't come with terraform. On AWS the argument is more tricky because CF is more annoying even after working with it for a few years now. Terraform started with AWS first and Azure feels like a second class provider in many respects because of it. In terms of scoping, you're right. Since Bicep doesn't cover AAD (another TODO problem of Bicep) I use the az cli to define my LZ's and RG's, scope the IAM and then have complete bicep deploys for the resource groups. It stops the need to modularize every resource and you get that flat hierarchy you're looking for. Finally, getting a client who is hesitant on cloud to pick up both Azure AND Terraform is often too big an ask, sticking with Bicep lets them hire a cloud admin so the position requirements are kept low. Terraform is clean, and even with state surgery issues I enjoy what it does for me, but unless I _need_ multiple providers its always going to be second fiddle to cloud-provided IaC solutions.
@azure-terraformer
@azure-terraformer 8 ай бұрын
It may seem like learning azure and terraform is two things to learn. But I would argue it’s also learning two things with azure and bicep. 😁 bicep may have official support but it requires you to learn new mental models and concepts just like terraform does.
@arimill1045
@arimill1045 8 ай бұрын
@@azure-terraformer except bicep is covered in az-104, so you learn them both if you go through their stated learning paths without having to cover Terraform topics. I use more Terraform than bicep from client requests so there's no hate here, just a separate set of pro/cons. Tbh I am waiting for someone to come up with a stateless Terraform that leans on deployment practices so we can keep projects immutable, but hopes and dreams I suppose
@azure-terraformer
@azure-terraformer 8 ай бұрын
@@arimill1045 ^_^ No worries, I understand where you are coming from. I think the problem is that Terraform can't assume the underlying platform maintains its own state. Not all infrastructure maintain its own state like Azure and AWS do. I think the little bit of friction we get from state management is made up for by the planning process. This is essentially non-existent in the ARM/Bicep world. Its pretty much YOLO ^_^
@arimill1045
@arimill1045 8 ай бұрын
@@azure-terraformer 100%, providers are the weakness but a necessary one for what Terraform wants to do.end of the day we gotta know them all that's the job
@ronzhong
@ronzhong Жыл бұрын
Thank you sir for sharing this!! I also like to be like you becoming a Azure Terraformer!! :D
@azure-terraformer
@azure-terraformer Жыл бұрын
This is the way 😊👍
@bmac3625
@bmac3625 3 ай бұрын
How does bicep handle drift when there are click ops changes?
@azure-terraformer
@azure-terraformer 3 ай бұрын
Unpredictably. Sometimes it will revert, sometimes it will crash. It depends on the type of change. If a resource has to be replaced, it really doesn't like to do that. I have found so many resources ignored though (even ones that I know I have changed) I can't tolerate the lack of a comprehensive plan!
@bmac3625
@bmac3625 3 ай бұрын
@@azure-terraformer I’m currently working on getting Sentinel stood up via terraform and I’m noticing that when updating content hub solutions to newer versions terraform isn’t catching the newer version and is telling me that there are no new changes 🤔
@user-wq4tw3jz9f
@user-wq4tw3jz9f Жыл бұрын
Great topic, and for sure I think if you go over Terraform state management and terraform cli workspaces for this comparison, terraform would be the winner, please correct me if I'm wrong, Thanks
@azure-terraformer
@azure-terraformer Жыл бұрын
I think terraform was the winner. I’m not a huge fan of the scoping mechanism within bicep. I think it makes things overly cumbersome.
@arimill1045
@arimill1045 8 ай бұрын
scoping mechanisms aren't nearly as bad as handling a remote back end, deformed state, or dependency issues forcing 2+ runs per deploy in edge cases. I'm more interested in Terraform's AzureAD provider handling cases that Bicep can't (AAD/Entra), and the benefits of state management allow for much better planning, and iterative development. (Bicep feels like its perfect if you have _the solution_ in one file ready to be deployed, but as soon as you need to iterate its almost better to treat deployments as immutable with the --complete option)
@azure-terraformer
@azure-terraformer 8 ай бұрын
Agree, state can be painful but that’s why it’s important to keep things small and iterate. I agree with you about ARM and bicep being great when you have exactly what you want done, it’s not as great of a developer experience but once you’re done it’s a good cloud shotgun. AAD is very powerful and will get more powerful with Microsoft Graph API.
@stalkermark7990
@stalkermark7990 4 ай бұрын
9:15 i'd prefer terraform, it's too verbose in bicep
@azure-terraformer
@azure-terraformer 4 ай бұрын
Based.
azure arm/bicep vs #terraform with #AzureAD #shorts
0:20
Azure Terraformer
Рет қаралды 572
Bicep vs Terraform - A fair and balanced comparison
21:42
Jon Gallant
Рет қаралды 10 М.
DO YOU HAVE FRIENDS LIKE THIS?
00:17
dednahype
Рет қаралды 94 МЛН
Khó thế mà cũng làm được || How did the police do that? #shorts
01:00
Smart Sigma Kid #funny #sigma #comedy
00:25
CRAZY GREAPA
Рет қаралды 20 МЛН
1 or 2?🐄
00:12
Kan Andrey
Рет қаралды 53 МЛН
How is THIS Coding Assistant FREE?
5:19
Alex Ziskind
Рет қаралды 143 М.
Get in the (landing) zone with Terraform on Azure
28:50
HashiCorp
Рет қаралды 3,7 М.
BICEP vs Terraform. Which one should I use?
34:51
London Microsoft DevOps Meetup
Рет қаралды 2,1 М.
To Bicep or to Terraform - That is the Question
49:25
SQLBits
Рет қаралды 646
What is Azure Bicep | Deploy Azure Bicep with Azure DevOps pipeline
14:04
Sri Gunnala - Tech Talks
Рет қаралды 2,8 М.
Understanding and Using Project BICEP - The NEW Azure Deployment Technology
43:09
John Savill's Technical Training
Рет қаралды 56 М.
Scientist think THIS is Alien?!
16:16
Interstellar News
Рет қаралды 72 М.
But What Is Cloud Native Really All About?
7:32
ByteByteGo
Рет қаралды 141 М.
Первый обзор Galaxy Z Fold 6
12:23
Rozetked
Рет қаралды 421 М.
Мой инст: denkiselef. Как забрать телефон через экран.
0:54
ОБСЛУЖИЛИ САМЫЙ ГРЯЗНЫЙ ПК
1:00
VA-PC
Рет қаралды 1,7 МЛН
Как правильно выключать звук на телефоне?
0:17
Люди.Идеи, общественная организация
Рет қаралды 809 М.