SlideShare a Scribd company logo
Bicep vs. Terraform
Infrastructure as Code on Azure
Azure Developer Community Day 2021
#azdevcom
whoami
• Philip Welz
• Senior Kubernetes & DevOps Engineer @ white duck
• Kubernetes Certified { A | AD | S }
• Kubernetes, GitOps & Azure
© white duck GmbH 2021
Email: Philip.Welz@whiteduck.de
Twitter: @philip_welz
LinkedIn: https://www.linkedin.com/in/philip-welz
Blog: https://philinthe.cloud
Agenda
• Infrastructure as Code
• IaC on Azure
• Terraform
• Bicep
• Conclusion
© white duck GmbH 2021
INFRASTRUCTURE AS CODE
© white duck GmbH 2021
Overview
• is the management of infrastructure with declarative
configuration files
• evolved to solve the problem of environment drift
• considered one of the key practices of DevOps and Agile
software development
© white duck GmbH 2021
Tools
• ARM templates
• Bicep
• Terraform
• Pulumi
© white duck GmbH 2021
Workflow
© white duck GmbH 2021
Key principles
• idempotency
• no matter how many times you run your IaC, you will end up
with the same end state
• immutability
• replacing infrastructure instead of change it doesn't
allow configuration drift
© white duck GmbH 2021
Desired state
© white duck GmbH 2021
Benefits
• speed
• everything in source control
• documentation
• consistency
• agility
• reusability
© white duck GmbH 2021
IAC ON AZURE
© white duck GmbH 2021
Azure Resource Manager
• short ARM
• provisioning engine built into Azure exposed as REST API
• authenticates and authorizes requests
• automatically orchestrates the deployment in the correct
order respecting dependencies
• ensures idempotency
© white duck GmbH 2021
Azure Resource Manager
© white duck GmbH 2021
© white duck GmbH 2021
Overview
• by Hashicorp
• first release = 28 July 2014
• 1.0.0 since 8 June 2021
• written in Go
• CLI and DSL (domain-specific language)
• HCL – Hashicorp Configuration Language
• Open Source but optional paid offers available
© white duck GmbH 2021
Key principles
• manage any infrastructure
• standardize your deployment workflow
• track your infrastructure
• community driven
© white duck GmbH 2021
Providers
• Azure RM provider
• Azure AD provider
• Azure Stack provider
• Azure DevOps provider
• GitHub provider
• Kubernetes, Helm provider
• Random, template, …
© white duck GmbH 2021
Terraform workflow
© white duck GmbH 2021
State
• necessary requirement for Terraform to function
• records information about what infrastructure it created
• can contain sensitive data
• stored locally or in a backend
• lock mechanism prevents concurrent execution
© white duck GmbH 2021
© white duck GmbH 2021
ARM Templates
• implement Infrastructure as Code on Azure
• are JavaScript Object Notation (JSON) files
• uses declarative syntax
• specify the resources and the properties for those resources
• deploy the template(s) through one command
© white duck GmbH 2021
Bicep overview
• first release = Fall ’20
• native support by
• Azure CLI since 2.20
• PowerShell AZ module (v5.6.0+)
• written in .NET
• DSL (domain-specific language)
• Open Source
© white duck GmbH 2021
Key principles
• transparent abstraction over ARM template JSON
• much simpler syntax compared to equivalent ARM
template JSON
• modularity
• convert existing templates or resources from the portal
© white duck GmbH 2021
Syntax ARM template
© white duck GmbH 2021
Syntax Bicep
© white duck GmbH 2021
Focus
• support for all resource types and API versions
• no state or state files to manage
• pre-flight validation
• tooling
• support
• non-goals
• one language to rule them all
• general purpose language to meet any need
© white duck GmbH 2021
Workflow
© white duck GmbH 2021
Deployment scopes
• Resource group (most common)
• Subscription
• Management group
• Tenant
© white duck GmbH 2021
Deployment modes
• incremental
• leaves unchanged resources that exist in the resource group
but aren't specified in the template
• complete
• deletes resources that exist in the resource group but aren't
specified in the template
© white duck GmbH 2021
CONCLUSION
© white duck GmbH 2021
Real talk - Terraform
• no deployments scopes
• well adopted but feature implementation can take some time
• not Azure-only focused
• can speak with Azure AD
• can do more, but sometimes it shouldn't
• pitfalls
© white duck GmbH 2021
Real talk - Bicep
• zero-day support for all Azure resource types & API versions
• first class VSCode integration (IntelliSense)
• less complex due to no state
• convert existing templates and or resources
• API ensures always backwards compatibility
• pitfalls
© white duck GmbH 2021
Final verdicts
• IaC != state
• use the tool that suits your needs
• if you are happy with your tooling, stick with it
• no matter what tool you are using, automate your
deployments and execute them regularly
• stay up to date
• use static analysis to enforce cloud governance
© white duck GmbH 2021
Links
• https://aka.ms/learnbicep
• https://bicepdemo.z22.web.core.windows.net
• https://docs.microsoft.com/en-gb/azure/azure-resource-
manager/bicep/compare-template-syntax
• https://www.marcusfelling.com/blog/2021/reasons-to-use-
bicep-over-terraform/
• https://www.thorsten-hans.com/bicep-and-terraform-
compared/
© white duck GmbH 2021
Questions?
• Slides
• https://www.slideshare.net/PhilipWelz
© white duck GmbH 2021
Email: Philip.Welz@whiteduck.de
Twitter: @philip_welz
LinkedIn: https://www.linkedin.com/in/philip-welz
Blog: https://philinthe.cloud

More Related Content

PPTX
Azure redis cache
PDF
Az 104 session 5: Azure networking
PDF
Infrastructure as Code for Azure: ARM or Terraform?
PDF
Az 104 session 6 azure networking part2
PPTX
Introduction to Microsoft Azure
PPTX
Azure Cost Management - Make the most of Azure by optimizing your cloud spend...
PPTX
Working with Azure Cosmos DB in Azure Functions
PDF
Az 104 session 3 azure compute
Azure redis cache
Az 104 session 5: Azure networking
Infrastructure as Code for Azure: ARM or Terraform?
Az 104 session 6 azure networking part2
Introduction to Microsoft Azure
Azure Cost Management - Make the most of Azure by optimizing your cloud spend...
Working with Azure Cosmos DB in Azure Functions
Az 104 session 3 azure compute

What's hot (20)

PPTX
Introduction to azure cosmos db
PDF
AWS Backup을 이용한 데이터베이스의 백업 자동화와 편리한 복구방법
PDF
Az 104 session 4: azure storage
PDF
Az 104 session 2 implement and manage azure webapps and container
PDF
Gaming on aws 〜ゲームにおけるAWS最新活用術〜
PPTX
Windows Azure Blob Storage
PDF
Kubernetes/ EKS - 김광영 (AWS 솔루션즈 아키텍트)
PPTX
AWS VS AZURE VS GCP.pptx
PPTX
Azure Cloud Services
PDF
Amazon EKS multi-cluster gitops-bridge
PDF
LG전자 - Amazon Aurora 및 RDS 블루/그린 배포를 이용한 데이터베이스 업그레이드 안정성 확보 - 발표자: 이은경 책임, L...
PDF
Azure Arc Overview from Microsoft
PDF
Azure Cosmos DB
PDF
Amazon Aurora Deep Dive (김기완) - AWS DB Day
PDF
Microsoft Azure Overview - Japanses version
PPTX
Azure SQL Database Managed Instance
PDF
Az 104 session 8 azure monitoring
PDF
게임을 위한 DynamoDB 사례 및 팁 - 김일호 솔루션즈 아키텍트:: AWS Cloud Track 3 Gaming
PDF
Azure SQL Database
PDF
Webinar slides: How to Migrate from Oracle DB to MariaDB
Introduction to azure cosmos db
AWS Backup을 이용한 데이터베이스의 백업 자동화와 편리한 복구방법
Az 104 session 4: azure storage
Az 104 session 2 implement and manage azure webapps and container
Gaming on aws 〜ゲームにおけるAWS最新活用術〜
Windows Azure Blob Storage
Kubernetes/ EKS - 김광영 (AWS 솔루션즈 아키텍트)
AWS VS AZURE VS GCP.pptx
Azure Cloud Services
Amazon EKS multi-cluster gitops-bridge
LG전자 - Amazon Aurora 및 RDS 블루/그린 배포를 이용한 데이터베이스 업그레이드 안정성 확보 - 발표자: 이은경 책임, L...
Azure Arc Overview from Microsoft
Azure Cosmos DB
Amazon Aurora Deep Dive (김기완) - AWS DB Day
Microsoft Azure Overview - Japanses version
Azure SQL Database Managed Instance
Az 104 session 8 azure monitoring
게임을 위한 DynamoDB 사례 및 팁 - 김일호 솔루션즈 아키텍트:: AWS Cloud Track 3 Gaming
Azure SQL Database
Webinar slides: How to Migrate from Oracle DB to MariaDB
Ad

Similar to AzDevCom2021 - Bicep vs Terraform (20)

PDF
Azure Meetup Hamburg: Production-Ready Terraform Deployments on Azure
PDF
Azure Infrastructure as Code: With ARM templates and Bicep 1st Edition Henry ...
PDF
Azure Infrastructure as Code: With ARM templates and Bicep 1st Edition Henry ...
PPTX
Microsoft Azure IaaS and Terraform
PPTX
Alex Magnay - Azure Infrastructure as Code with Hashicorp Terraform
PDF
Azure Infrastructure As Code With Arm Templates And Bicep 1st Edition Henry Been
PPTX
Microsoft Azure News - June 2021
PPTX
Azure Bicep for Developers
PPTX
Azure Bicep - An Introduction
PPTX
Infrastructure-as-Code (IaC) using Terraform
PPTX
Azure Infrastructure as Code and Hashicorp Terraform
PPTX
Infrastructure as Code on Azure - Show your Bicep! v0.2 - .NetConf 2020 by Do...
PPTX
Aprovisionamiento multi-proveedor con Terraform - Plain Concepts DevOps day
PPTX
Azure deployments and ARM templates
PDF
Az 900 session 2-core azure services
PPTX
Microsoft Azure News - December 2020
PDF
Terraform In Action Meap V10 Meap Scott Winkler
PDF
DevOps for Databricks
PPTX
CICD for the modern data platform
PPTX
Microsoft Azure News - October 2024 - BAUG
Azure Meetup Hamburg: Production-Ready Terraform Deployments on Azure
Azure Infrastructure as Code: With ARM templates and Bicep 1st Edition Henry ...
Azure Infrastructure as Code: With ARM templates and Bicep 1st Edition Henry ...
Microsoft Azure IaaS and Terraform
Alex Magnay - Azure Infrastructure as Code with Hashicorp Terraform
Azure Infrastructure As Code With Arm Templates And Bicep 1st Edition Henry Been
Microsoft Azure News - June 2021
Azure Bicep for Developers
Azure Bicep - An Introduction
Infrastructure-as-Code (IaC) using Terraform
Azure Infrastructure as Code and Hashicorp Terraform
Infrastructure as Code on Azure - Show your Bicep! v0.2 - .NetConf 2020 by Do...
Aprovisionamiento multi-proveedor con Terraform - Plain Concepts DevOps day
Azure deployments and ARM templates
Az 900 session 2-core azure services
Microsoft Azure News - December 2020
Terraform In Action Meap V10 Meap Scott Winkler
DevOps for Databricks
CICD for the modern data platform
Microsoft Azure News - October 2024 - BAUG
Ad

Recently uploaded (20)

PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PPTX
Spectroscopy.pptx food analysis technology
PDF
cuic standard and advanced reporting.pdf
PDF
Empathic Computing: Creating Shared Understanding
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PPT
Teaching material agriculture food technology
PPTX
MYSQL Presentation for SQL database connectivity
PPTX
Big Data Technologies - Introduction.pptx
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
Encapsulation theory and applications.pdf
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
KodekX | Application Modernization Development
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PPTX
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
“AI and Expert System Decision Support & Business Intelligence Systems”
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
Spectroscopy.pptx food analysis technology
cuic standard and advanced reporting.pdf
Empathic Computing: Creating Shared Understanding
Reach Out and Touch Someone: Haptics and Empathic Computing
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
Teaching material agriculture food technology
MYSQL Presentation for SQL database connectivity
Big Data Technologies - Introduction.pptx
Digital-Transformation-Roadmap-for-Companies.pptx
Encapsulation theory and applications.pdf
Spectral efficient network and resource selection model in 5G networks
KodekX | Application Modernization Development
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...

AzDevCom2021 - Bicep vs Terraform

  • 1. Bicep vs. Terraform Infrastructure as Code on Azure Azure Developer Community Day 2021 #azdevcom
  • 2. whoami • Philip Welz • Senior Kubernetes & DevOps Engineer @ white duck • Kubernetes Certified { A | AD | S } • Kubernetes, GitOps & Azure © white duck GmbH 2021 Email: Philip.Welz@whiteduck.de Twitter: @philip_welz LinkedIn: https://www.linkedin.com/in/philip-welz Blog: https://philinthe.cloud
  • 3. Agenda • Infrastructure as Code • IaC on Azure • Terraform • Bicep • Conclusion © white duck GmbH 2021
  • 4. INFRASTRUCTURE AS CODE © white duck GmbH 2021
  • 5. Overview • is the management of infrastructure with declarative configuration files • evolved to solve the problem of environment drift • considered one of the key practices of DevOps and Agile software development © white duck GmbH 2021
  • 6. Tools • ARM templates • Bicep • Terraform • Pulumi © white duck GmbH 2021
  • 8. Key principles • idempotency • no matter how many times you run your IaC, you will end up with the same end state • immutability • replacing infrastructure instead of change it doesn't allow configuration drift © white duck GmbH 2021
  • 9. Desired state © white duck GmbH 2021
  • 10. Benefits • speed • everything in source control • documentation • consistency • agility • reusability © white duck GmbH 2021
  • 11. IAC ON AZURE © white duck GmbH 2021
  • 12. Azure Resource Manager • short ARM • provisioning engine built into Azure exposed as REST API • authenticates and authorizes requests • automatically orchestrates the deployment in the correct order respecting dependencies • ensures idempotency © white duck GmbH 2021
  • 13. Azure Resource Manager © white duck GmbH 2021
  • 14. © white duck GmbH 2021
  • 15. Overview • by Hashicorp • first release = 28 July 2014 • 1.0.0 since 8 June 2021 • written in Go • CLI and DSL (domain-specific language) • HCL – Hashicorp Configuration Language • Open Source but optional paid offers available © white duck GmbH 2021
  • 16. Key principles • manage any infrastructure • standardize your deployment workflow • track your infrastructure • community driven © white duck GmbH 2021
  • 17. Providers • Azure RM provider • Azure AD provider • Azure Stack provider • Azure DevOps provider • GitHub provider • Kubernetes, Helm provider • Random, template, … © white duck GmbH 2021
  • 18. Terraform workflow © white duck GmbH 2021
  • 19. State • necessary requirement for Terraform to function • records information about what infrastructure it created • can contain sensitive data • stored locally or in a backend • lock mechanism prevents concurrent execution © white duck GmbH 2021
  • 20. © white duck GmbH 2021
  • 21. ARM Templates • implement Infrastructure as Code on Azure • are JavaScript Object Notation (JSON) files • uses declarative syntax • specify the resources and the properties for those resources • deploy the template(s) through one command © white duck GmbH 2021
  • 22. Bicep overview • first release = Fall ’20 • native support by • Azure CLI since 2.20 • PowerShell AZ module (v5.6.0+) • written in .NET • DSL (domain-specific language) • Open Source © white duck GmbH 2021
  • 23. Key principles • transparent abstraction over ARM template JSON • much simpler syntax compared to equivalent ARM template JSON • modularity • convert existing templates or resources from the portal © white duck GmbH 2021
  • 24. Syntax ARM template © white duck GmbH 2021
  • 25. Syntax Bicep © white duck GmbH 2021
  • 26. Focus • support for all resource types and API versions • no state or state files to manage • pre-flight validation • tooling • support • non-goals • one language to rule them all • general purpose language to meet any need © white duck GmbH 2021
  • 28. Deployment scopes • Resource group (most common) • Subscription • Management group • Tenant © white duck GmbH 2021
  • 29. Deployment modes • incremental • leaves unchanged resources that exist in the resource group but aren't specified in the template • complete • deletes resources that exist in the resource group but aren't specified in the template © white duck GmbH 2021
  • 31. Real talk - Terraform • no deployments scopes • well adopted but feature implementation can take some time • not Azure-only focused • can speak with Azure AD • can do more, but sometimes it shouldn't • pitfalls © white duck GmbH 2021
  • 32. Real talk - Bicep • zero-day support for all Azure resource types & API versions • first class VSCode integration (IntelliSense) • less complex due to no state • convert existing templates and or resources • API ensures always backwards compatibility • pitfalls © white duck GmbH 2021
  • 33. Final verdicts • IaC != state • use the tool that suits your needs • if you are happy with your tooling, stick with it • no matter what tool you are using, automate your deployments and execute them regularly • stay up to date • use static analysis to enforce cloud governance © white duck GmbH 2021
  • 34. Links • https://aka.ms/learnbicep • https://bicepdemo.z22.web.core.windows.net • https://docs.microsoft.com/en-gb/azure/azure-resource- manager/bicep/compare-template-syntax • https://www.marcusfelling.com/blog/2021/reasons-to-use- bicep-over-terraform/ • https://www.thorsten-hans.com/bicep-and-terraform- compared/ © white duck GmbH 2021
  • 35. Questions? • Slides • https://www.slideshare.net/PhilipWelz © white duck GmbH 2021 Email: Philip.Welz@whiteduck.de Twitter: @philip_welz LinkedIn: https://www.linkedin.com/in/philip-welz Blog: https://philinthe.cloud

Editor's Notes

  • #4: Wiederholbarkeit Verlässlichkeit Effizienz Ersparnisse Sichtbarkeit
  • #6: Wiederholbarkeit Verlässlichkeit Effizienz Ersparnisse Sichtbarkeit
  • #7: Wiederholbarkeit Verlässlichkeit Effizienz Ersparnisse Sichtbarkeit
  • #8: Wiederholbarkeit Verlässlichkeit Effizienz Ersparnisse Sichtbarkeit
  • #9: Wiederholbarkeit Verlässlichkeit Effizienz Ersparnisse Sichtbarkeit
  • #11: Wiederholbarkeit Verlässlichkeit Effizienz Ersparnisse Sichtbarkeit
  • #13: Wiederholbarkeit Verlässlichkeit Effizienz Ersparnisse Sichtbarkeit
  • #14: Wiederholbarkeit Verlässlichkeit Effizienz Ersparnisse Sichtbarkeit
  • #17: Wiederholbarkeit Verlässlichkeit Effizienz Ersparnisse Sichtbarkeit
  • #22: Wiederholbarkeit Verlässlichkeit Effizienz Ersparnisse Sichtbarkeit
  • #23: Wiederholbarkeit Verlässlichkeit Effizienz Ersparnisse Sichtbarkeit
  • #24: Wiederholbarkeit Verlässlichkeit Effizienz Ersparnisse Sichtbarkeit
  • #25: Wiederholbarkeit Verlässlichkeit Effizienz Ersparnisse Sichtbarkeit
  • #26: Wiederholbarkeit Verlässlichkeit Effizienz Ersparnisse Sichtbarkeit
  • #27: Wiederholbarkeit Verlässlichkeit Effizienz Ersparnisse Sichtbarkeit
  • #28: Wiederholbarkeit Verlässlichkeit Effizienz Ersparnisse Sichtbarkeit
  • #29: Wiederholbarkeit Verlässlichkeit Effizienz Ersparnisse Sichtbarkeit
  • #30: Wiederholbarkeit Verlässlichkeit Effizienz Ersparnisse Sichtbarkeit
  • #35: Wiederholbarkeit Verlässlichkeit Effizienz Ersparnisse Sichtbarkeit