A presentation at Dev Up Conference 2023 in August 2023 in St Charles, MO, USA by Sam Gomez
ARM, Bicep, knees and toes! Infrastructure as code for beginners.
Originally from Mexico. Tech Lead at Geneca. Spend time with family, movies, videogames, soccer. @thesoccerdev drkclw samueljgomez
Thank you to our sponsors!
Agenda • Who is this talk for? • Infrastructure as Code • Tool overview • ARM templates • Bicep • Terraform
Who is this talk for? • People completely new to IaC. • Little experience with ARM templates. • New to Bicep. • New to Terraform.
Infrastructure as Code • Deploy infrastructure in an automated, consistent and repeatable manner.
ARM templates
ARM templates • JSON format with declarative syntax. • Defines infrastructure and configuration.
ARM Template format
ARM DEMO
https://www.rambli.com/2016/06/the-prayer-of-the-demo-gods/
Bicep
Bicep • Domain specific language that aims to drastically simplify authoring experience. • Transparent abstraction over ARM templates.
Bicep format
Modules • Allow you to use reference other bicep AND ARM template files. • Import modules from private or public registries.
Conditional (if) • Allow you to deploy resources only when condition is met.
Loops • Define multiple copies of: • • • • • Resources Modules Variables Properties Outputs
Loop over index
Loop over items
Loop over dictionary items
Loop over integer index and items
Loop over items with conditional
BICEP DEMO
Terraform
Terraform. • Open source IaC tool for provisioning and managing infrastructure. • HCL syntax. • Can provision resources to multiple cloud providers.
Terraform providers. • Plugins used to interact with cloud providers, SaaS providers and other APIs. • Azure • AWS • Google Cloud
Terraform syntax. • Arguments. • Blocks.
Terraform state. • Terraform stores infrastructure state in a separate file.
TERRAFORM DEMO
Which one should I use?
Terraform. • Resources not in Azure (including onprem). • Mix of cloud providers. • More accessible for developers.
Bicep. • Resources in Azure only. • Share templates via registries. • More accessible to developers.
ARM. • Resources in Azure only. • Do not want to learn new language. • Team has experience with ARM templates.
Questions?
Useful links. • https://learn.microsoft.com/enus/azure/templates/. • https://github.com/Azure/azure-quickstarttemplates • https://github.com/Azure/bicep. • https://github.com/hashicorp/terraformprovider-azurerm/tree/main/examples.
Useful links. • https://github.com/Azure/bicep-registrymodules/tree/main/modules
@thesoccerdev drkclw samueljgomez
View ARM, Bicep, knees and toes! Infrastructure as code for beginners. on Notist.
Dismiss