SlideShare a Scribd company logo
Effettuare il
provisioning su Azure
utilizzando Terraform e
Azure DevOps
GIORGIO LASALA
Thanks to
www.linkedin.com/in/giorgiolasala
github.com/salem84
Solution Architect
@ Engineering Ingegneria Informatica
giorgio.lasala@eng.it
AGENDA
• Infrastructure as Code
• Terraform Architecture and Workflow
• IaaS provisioning
• PaaS provisioning
• Terraform with Azure DevOps using YAML
• Terraform with Azure DevOps using Plugins
• Provisioning SharePoint Farm with Terraform
• Provisioning Azure ETL with Terraform
Once upon a time… (Windows) Azure
Today… Microsoft Azure
Azure and Command Line
Infrastructure as Code (IaC)
“Infrastructure as Code is the process of managing and
provisioning computing infrastructure and its configuration
through machine-processable definition files. It treats the
infrastructure as a software system, applying software
engineering practices to manage changes to the system in a
structured, safe way”
Infrastructure as Code characteristics
• Consistency
• Treat infrastructure like application code
• Single source of truth
• Increase repeatability and testability
• Idempotent provisioning and configuration
• Speed
• Decrease provisioning time
Infrastructure as Code characteristics
• Accountability
• Rely less on availability of persons to perform tasks
• Always know what is changed
• Validate infrastructure before deployment
• Increased Efficiency
• Use proven software development practices for
deploying infrastructure
• Lowering the costs of infrastructure management
Terraform
www.terraform.io
Core ideas in Terraform
• IaC Tool
• Open Source
• Multiplatform (Windows, Linux, Mac, …)
• Multiprovider (+200) cloud and on-premise, but …
• Plan validation
• HashiCorp Configuration Language (HCL) ~ JSON
• Simple model of resource entities with attributes
• Stateful lifecycle with CRUD operations
• Declarative configuration
• Dependencies by inference
• Parallel execution
Terraform Architecture
Terraform flow
terraform init
Init ApplyPlan
Terraform
Scripts
Terraform
State
terraform plan –out plan.dat
terraform apply plan.dat
Terminology in Terraform
Providers
Offer technology integrations and functionality, largely by wrapping third-
party APIs (e.g. azurerm)
Resources and Data Sources
Made available via a Provider, are the building blocks used to codify and
manage infrastructure; have a set of configurable attributes and a lifecycle
such as create, read, update, delete (e.g. Azure App Service)
Made reusable with Modules
Provisioner
Initiliaze a resource from a local or remote script
Azure Day Rome 2019 Reloaded - Effettuare il provisioning su Azure utilizzando Terraform e Azure DevOps
Azure Day Rome 2019 Reloaded - Effettuare il provisioning su Azure utilizzando Terraform e Azure DevOps
Terraform flow with Azure
Init ApplyPlan
State file contiene
informazioni
sensibiliState condiviso Locking dello stato 
Deployment con Azure Pipelines
Azure Day Rome 2019 Reloaded - Effettuare il provisioning su Azure utilizzando Terraform e Azure DevOps
Azure Day Rome 2019 Reloaded - Effettuare il provisioning su Azure utilizzando Terraform e Azure DevOps
Azure Day Rome 2019 Reloaded - Effettuare il provisioning su Azure utilizzando Terraform e Azure DevOps
Demo
Joy and pain of Terraform
• Declarative language
• Not imperative
• It’s not ARM
• Slower
• Not integrated in Azure Management Portal
• Provider coverage largely depends on community
• State file is critical
• Creation, storing and maintenance
• Integration with existing infrastructure
• Import command is for single resource
• Not aware of API rate and resources limits (plan / apply)
✓ Use a VCS
✓ Use remote state and access policy
❑ e. g. use a single build server
✓ Avoid user credentials in Terraform code
✓ Naming convention
❑ e. g. "${var.shortname}-{var.env}"
✓ Use VSCode with following extensions:
❑ Terraform [mauve.terraform] by Mikael Olenfalk
❑ Terraform doc snippet [run-at-scale.terraform-doc-
snippets] by Brandon O'Connor
Terraform tips and tricks
✓ https://github.com/shuaibiyy/awesome-terraform
✓ https://28mm.github.io/notes/d3-terraform-graphs
Hashicorp Docs and modules
✓ https://www.terraform.io/docs/
✓ https://registry.terraform.io/
Framework testing
✓ https://github.com/gruntwork-io/terratest
Terraform tips and links
Azure Day Rome 2019 Reloaded - Effettuare il provisioning su Azure utilizzando Terraform e Azure DevOps
Thank You!!!
Thanks to

More Related Content

PPTX
Aws Azure-gcp-architecture-for starter
PPTX
Azure AWS real time-interview questions part 9
PPTX
Azure realtime-interview questions - part 7
PPTX
Infrastructure Automation on AWS using a Real-World Customer Example
PPTX
Azure IAAS architecture with High Availability for beginners and developers -...
PDF
Terraform
PDF
Deep Dive Into Elasticsearch: Establish A Powerful Log Analysis System With E...
PDF
Effective cost reduction for elastic clouds under spot instance pricing throu...
Aws Azure-gcp-architecture-for starter
Azure AWS real time-interview questions part 9
Azure realtime-interview questions - part 7
Infrastructure Automation on AWS using a Real-World Customer Example
Azure IAAS architecture with High Availability for beginners and developers -...
Terraform
Deep Dive Into Elasticsearch: Establish A Powerful Log Analysis System With E...
Effective cost reduction for elastic clouds under spot instance pricing throu...

What's hot (19)

PDF
SAP on Azure Web Dispatcher High Availability
PPTX
Terraform
PPTX
AWS Public Cloud solution for ABC Corporation
PPTX
Training And Serving ML Model Using Kubeflow by Jayesh Sharma
PPT
Selecting the Right Cloud Host
PPTX
Getting Started with Splunk
PDF
Deep Dive on EC2 and S3
PPTX
Aws best practices
PDF
AWS EC2
PDF
Deliver better ROI and faster data analysis with Dell Technologies APEX Priva...
PDF
Helix core on aws webinar
PPTX
HA With AWS OpsWorks
PDF
Must Know Azure Kubernetes Best Practices And Features For Better Resiliency ...
PPSX
Orchestration across multiple cloud platforms using Heat
PPTX
Openstack heat & How Autoscaling works
PDF
Getting Started with EC2, S3 and EMR
PPT
Power Your Mobile Applications On The Cloud [IndicThreads Mobile Application ...
PDF
Pie on AWS
PPTX
Netflix s2e1lightningtalk
SAP on Azure Web Dispatcher High Availability
Terraform
AWS Public Cloud solution for ABC Corporation
Training And Serving ML Model Using Kubeflow by Jayesh Sharma
Selecting the Right Cloud Host
Getting Started with Splunk
Deep Dive on EC2 and S3
Aws best practices
AWS EC2
Deliver better ROI and faster data analysis with Dell Technologies APEX Priva...
Helix core on aws webinar
HA With AWS OpsWorks
Must Know Azure Kubernetes Best Practices And Features For Better Resiliency ...
Orchestration across multiple cloud platforms using Heat
Openstack heat & How Autoscaling works
Getting Started with EC2, S3 and EMR
Power Your Mobile Applications On The Cloud [IndicThreads Mobile Application ...
Pie on AWS
Netflix s2e1lightningtalk
Ad

Similar to Azure Day Rome 2019 Reloaded - Effettuare il provisioning su Azure utilizzando Terraform e Azure DevOps (20)

PPTX
Infrastructure-as-Code (IaC) using Terraform
PPTX
Infrastructure as Code with Terraform.pptx
PDF
Infrastructure as Code for Azure: ARM or Terraform?
PDF
Terraform In Action Meap V10 Meap Scott Winkler
PDF
Deploy resources on Azure using IaC (Azure Terraform)
PPTX
Infrastructure-as-Code (IaC) Using Terraform (Intermediate Edition)
PPTX
Infrastructure as code, using Terraform
PDF
Deploy an Azure Infrastructure for Web Application Development by Using Ter...
PDF
Introduction to IAC and Terraform
PDF
Infrastructure as Code with Terraform
PDF
Achieving IaC and documentation via terraform provider
PPTX
Terraform for azure: the good, the bad and the ugly -
PDF
Hashicorp-Terraform-Deep-Dive-with-no-Fear-Victor-Turbinsky-Texuna.pdf
PDF
Terraform-2.pdf
PPTX
Aprovisionamiento multi-proveedor con Terraform - Plain Concepts DevOps day
PPTX
Deploying Azure DevOps using Terraform
PPTX
Iniciando com Terraform
PDF
OracleBeer_Terraform_soe.pdf
PPTX
Introduction To Terraform
PDF
Infrastructure-as-Code (IaC) using Terraform
Infrastructure as Code with Terraform.pptx
Infrastructure as Code for Azure: ARM or Terraform?
Terraform In Action Meap V10 Meap Scott Winkler
Deploy resources on Azure using IaC (Azure Terraform)
Infrastructure-as-Code (IaC) Using Terraform (Intermediate Edition)
Infrastructure as code, using Terraform
Deploy an Azure Infrastructure for Web Application Development by Using Ter...
Introduction to IAC and Terraform
Infrastructure as Code with Terraform
Achieving IaC and documentation via terraform provider
Terraform for azure: the good, the bad and the ugly -
Hashicorp-Terraform-Deep-Dive-with-no-Fear-Victor-Turbinsky-Texuna.pdf
Terraform-2.pdf
Aprovisionamiento multi-proveedor con Terraform - Plain Concepts DevOps day
Deploying Azure DevOps using Terraform
Iniciando com Terraform
OracleBeer_Terraform_soe.pdf
Introduction To Terraform
Ad

More from azuredayit (14)

PDF
Azure Day Rome Reloaded 2019 - ML.NET Model Lifecycle with Azure DevOps
PDF
Azure Day Rome Reloaded 2019 - Reactive Systems with Event Grid
PDF
Azure Day Rome Reloaded 2019 - Building serverless microservices in azure
PDF
Azure Day Rome Reloaded 2019 - Cloud Journey – FastTrack for Azure
PDF
Azure Day Rome Reloaded 2019 - Azure: a cloud with a purpose
PDF
Azure Day Rome Reloaded 2019 - Getting Started with Unity, AR/VR and Azure Co...
PDF
Azure Day Rome Reloaded 2019 - Azure Sentinel: set up automated threat respon...
PDF
Azure Day Rome Reloaded 2019 - Azure Application Insights Overview
PDF
Azure Day Rome Reloaded 2019 - Deconstructing Kubernetes using AKS
PDF
Azure Day Rome Reloaded 2019 - Python, Azure Cosmos DB, Docker and Azure Cont...
PDF
Azure Day Rome 2019 Reloaded - Strangle(r pattern) your legacy application ru...
PDF
Azure Day Rome 2019 Reloaded - Utilizzare Azure Kubernetes Service per i nost...
PDF
Azure Day Rome Reloaded 2019 - Ingestion nel datalake passando tramite API Ma...
PDF
Azure Day Rome Reloaded 2019 - Azure Cognitive Search Deep Dive
Azure Day Rome Reloaded 2019 - ML.NET Model Lifecycle with Azure DevOps
Azure Day Rome Reloaded 2019 - Reactive Systems with Event Grid
Azure Day Rome Reloaded 2019 - Building serverless microservices in azure
Azure Day Rome Reloaded 2019 - Cloud Journey – FastTrack for Azure
Azure Day Rome Reloaded 2019 - Azure: a cloud with a purpose
Azure Day Rome Reloaded 2019 - Getting Started with Unity, AR/VR and Azure Co...
Azure Day Rome Reloaded 2019 - Azure Sentinel: set up automated threat respon...
Azure Day Rome Reloaded 2019 - Azure Application Insights Overview
Azure Day Rome Reloaded 2019 - Deconstructing Kubernetes using AKS
Azure Day Rome Reloaded 2019 - Python, Azure Cosmos DB, Docker and Azure Cont...
Azure Day Rome 2019 Reloaded - Strangle(r pattern) your legacy application ru...
Azure Day Rome 2019 Reloaded - Utilizzare Azure Kubernetes Service per i nost...
Azure Day Rome Reloaded 2019 - Ingestion nel datalake passando tramite API Ma...
Azure Day Rome Reloaded 2019 - Azure Cognitive Search Deep Dive

Recently uploaded (20)

PDF
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf
PDF
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
PPTX
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
PDF
Upgrade and Innovation Strategies for SAP ERP Customers
PDF
Adobe Illustrator 28.6 Crack My Vision of Vector Design
PDF
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
PDF
Digital Strategies for Manufacturing Companies
PPTX
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 41
PDF
How Creative Agencies Leverage Project Management Software.pdf
PDF
medical staffing services at VALiNTRY
PPTX
CHAPTER 2 - PM Management and IT Context
PDF
Design an Analysis of Algorithms II-SECS-1021-03
PDF
2025 Textile ERP Trends: SAP, Odoo & Oracle
PDF
Which alternative to Crystal Reports is best for small or large businesses.pdf
PDF
Odoo Companies in India – Driving Business Transformation.pdf
PDF
How to Migrate SBCGlobal Email to Yahoo Easily
PPTX
L1 - Introduction to python Backend.pptx
PDF
System and Network Administration Chapter 2
PPTX
Transform Your Business with a Software ERP System
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
Upgrade and Innovation Strategies for SAP ERP Customers
Adobe Illustrator 28.6 Crack My Vision of Vector Design
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
Digital Strategies for Manufacturing Companies
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
Internet Downloader Manager (IDM) Crack 6.42 Build 41
How Creative Agencies Leverage Project Management Software.pdf
medical staffing services at VALiNTRY
CHAPTER 2 - PM Management and IT Context
Design an Analysis of Algorithms II-SECS-1021-03
2025 Textile ERP Trends: SAP, Odoo & Oracle
Which alternative to Crystal Reports is best for small or large businesses.pdf
Odoo Companies in India – Driving Business Transformation.pdf
How to Migrate SBCGlobal Email to Yahoo Easily
L1 - Introduction to python Backend.pptx
System and Network Administration Chapter 2
Transform Your Business with a Software ERP System

Azure Day Rome 2019 Reloaded - Effettuare il provisioning su Azure utilizzando Terraform e Azure DevOps

  • 1. Effettuare il provisioning su Azure utilizzando Terraform e Azure DevOps GIORGIO LASALA
  • 4. AGENDA • Infrastructure as Code • Terraform Architecture and Workflow • IaaS provisioning • PaaS provisioning • Terraform with Azure DevOps using YAML • Terraform with Azure DevOps using Plugins • Provisioning SharePoint Farm with Terraform • Provisioning Azure ETL with Terraform
  • 5. Once upon a time… (Windows) Azure
  • 8. Infrastructure as Code (IaC) “Infrastructure as Code is the process of managing and provisioning computing infrastructure and its configuration through machine-processable definition files. It treats the infrastructure as a software system, applying software engineering practices to manage changes to the system in a structured, safe way”
  • 9. Infrastructure as Code characteristics • Consistency • Treat infrastructure like application code • Single source of truth • Increase repeatability and testability • Idempotent provisioning and configuration • Speed • Decrease provisioning time
  • 10. Infrastructure as Code characteristics • Accountability • Rely less on availability of persons to perform tasks • Always know what is changed • Validate infrastructure before deployment • Increased Efficiency • Use proven software development practices for deploying infrastructure • Lowering the costs of infrastructure management
  • 12. Core ideas in Terraform • IaC Tool • Open Source • Multiplatform (Windows, Linux, Mac, …) • Multiprovider (+200) cloud and on-premise, but … • Plan validation • HashiCorp Configuration Language (HCL) ~ JSON • Simple model of resource entities with attributes • Stateful lifecycle with CRUD operations • Declarative configuration • Dependencies by inference • Parallel execution
  • 14. Terraform flow terraform init Init ApplyPlan Terraform Scripts Terraform State terraform plan –out plan.dat terraform apply plan.dat
  • 15. Terminology in Terraform Providers Offer technology integrations and functionality, largely by wrapping third- party APIs (e.g. azurerm) Resources and Data Sources Made available via a Provider, are the building blocks used to codify and manage infrastructure; have a set of configurable attributes and a lifecycle such as create, read, update, delete (e.g. Azure App Service) Made reusable with Modules Provisioner Initiliaze a resource from a local or remote script
  • 18. Terraform flow with Azure Init ApplyPlan State file contiene informazioni sensibiliState condiviso Locking dello stato 
  • 19. Deployment con Azure Pipelines
  • 23. Demo
  • 24. Joy and pain of Terraform • Declarative language • Not imperative • It’s not ARM • Slower • Not integrated in Azure Management Portal • Provider coverage largely depends on community • State file is critical • Creation, storing and maintenance • Integration with existing infrastructure • Import command is for single resource • Not aware of API rate and resources limits (plan / apply)
  • 25. ✓ Use a VCS ✓ Use remote state and access policy ❑ e. g. use a single build server ✓ Avoid user credentials in Terraform code ✓ Naming convention ❑ e. g. "${var.shortname}-{var.env}" ✓ Use VSCode with following extensions: ❑ Terraform [mauve.terraform] by Mikael Olenfalk ❑ Terraform doc snippet [run-at-scale.terraform-doc- snippets] by Brandon O'Connor Terraform tips and tricks
  • 26. ✓ https://github.com/shuaibiyy/awesome-terraform ✓ https://28mm.github.io/notes/d3-terraform-graphs Hashicorp Docs and modules ✓ https://www.terraform.io/docs/ ✓ https://registry.terraform.io/ Framework testing ✓ https://github.com/gruntwork-io/terratest Terraform tips and links