SlideShare une entreprise Scribd logo
1  sur  16
twitter: @MithunShanbhag
blog: mithunshanbhag.github.io
twitter: @MithunShanbhagblog: mithunshanbhag.github.io
Why Terraform?
1. Deployment Alternatives forAzure
1. AzurePortal
2. AzureRM Templates
3. AzurePowerShell
4. AzureCLI
5. AzureManagement SDK/REST
6. Pulumi
2. TerraformAdvantages
1. Facilitates multi-cloud deployments
2. Integration with multiple cloud providers (e.g. azure, aws,gcp)
3. Integration with multiple config managers (e.g. ansible, chef, puppet)
4. Execution plans (dryrun)
5. Open Source
3. TerraformDisadvantages
1. HCL Language quirks
2. Slightly lagging support for latest & greatest cloud resources
twitter: @MithunShanbhagblog: mithunshanbhag.github.io
Installation
1. Installation
1. Windows | Linux | MacOS
2. Addterraform.exe location toPATH
2. Verify byrunning terraform version
1. Latest available version is 12.7
3. AzureCLI
4. AzureTerraform VSCodeextension
twitter: @MithunShanbhagblog: mithunshanbhag.github.io
Terminology
1. Providersrepresent acloud provider (e.g. azurerm,aws) oralocal provider (e.g. tls).
1. Aprovider offers multiple resources & datasources.
2. Resources can be invoked tocreate/update infrastructure locally oron the cloud.
3. Data Sources are“read-only”resources.
4. Scripts/configuration areTerraform (.tf) script files in HCL language.
5. Modules arereusable libraries that allow creation of complex resources.
6. Provisioners areused toexecute scripts on a local orremote machine.
7. State is representation ofthe infrastructure created/updated byterraform.
1. By default state is stored in a local file (terraform.tfstate) but can alsobe stored in a remote backend.
twitter: @MithunShanbhagblog: mithunshanbhag.github.io
Providers
1. Terraformproviders forAzure
1. AzureRM provider
2. AzureAD provider
3. AzureStack provider
2. Authenticate with
1. AzureCLI
2. AzureService Principal
3. AzureManaged Service Identity
3. Other useful providers
1. TLS (create keys, certs, secrets)
2. Null (run provisioners)
3. Local (create local files)
4. Template (create strings from templates)
twitter: @MithunShanbhagblog: mithunshanbhag.github.io
Resources& Data Sources
1. Resource meta-arguments
1. depends_on
2. count
3. for_each
4. lifecycle
twitter: @MithunShanbhagblog: mithunshanbhag.github.io
Modules
1. Modules arelibraries/packages that allow you tocreate multiple resources
together.
2. Module can be loaded from
1. Local paths
2. Terraformregistry
3. Source code repositories
4. Storage blobs/buckets
3. Typical module structure
1. Input variables
2. Output values
3. Resources
twitter: @MithunShanbhagblog: mithunshanbhag.github.io
DEMO
twitter: @MithunShanbhagblog: mithunshanbhag.github.io
CLI
.tf file(s)
.tfstate file(s)
Execution plan.terraform folder
Terraform init
Initialize directory containing
terraform scripts.
Terraform apply
Applies execution plan to azure
resources.
Azure Resource
Terraform plan
Generate an execution plan.
Terraform refresh
Update local state file from azure
resources.
Terraform validate
Validates the Terraform scripts.
Terraform destroy
Destroys terraform-managed
azure resources.
twitter: @MithunShanbhagblog: mithunshanbhag.github.io
HCL Language
1. Data types
1. Primitives: string, number, bool
2. Collections: list, map,set
3. Structural: object, tuple
2. Variables
1. Input
2. Local
3. Output
twitter: @MithunShanbhagblog: mithunshanbhag.github.io
HCL Language
3. Built-in Functions
1. Numeric: E.g.abs(), ceil(), floor(),log, max(),min()
2. String: E.g. format(), join(), upper(), lower(), split(), substr()
3. Collection: E.g.contains(), concat(), length(), reverse(), sort()
4. Encoding: E.g.base64decode(), base64encode(), urlencode()
5. Filesystem: E.g. abspath(), dirname(), file(), fileexists(), templatefile()
6. Date/Time: E.g.formatdate(), timestamp()
7. Hash/Crypto: E.g. base64sha256(), md5(), rsadecrypt(), uuid()
8. IP/Network: E.g. cidrhost(), cidrnetmask(), cidrsubnet()
9. TypeConversion: E.g.tolist(), toset(), tostring()
twitter: @MithunShanbhagblog: mithunshanbhag.github.io
HCL Language
4. Expressions
1. Stringinterpolation
2. Template strings
3. For expressions
4. Splat expressions
twitter: @MithunShanbhagblog: mithunshanbhag.github.io
DEMO
twitter: @MithunShanbhagblog: mithunshanbhag.github.io
Provisioners
1. Configureremote resources over SSH/WinRM connections
2. Commonly used provisioners:
1. file: copy files/directories from local Terraformserver tothe remote
resource
2. local_exec: runcommands on local Terraformserver
3. remote_exec: run commands on remote resource)
3. Generally used with “null_resource” provider(with “trigger”argument)
twitter: @MithunShanbhagblog: mithunshanbhag.github.io
Integration With Azure
1. Terraformproviders forAzure
1. AzureRM provider
2. AzureAD provider
3. AzureStack provider
2. AzureRM Modules
3. AzureCloudShell Integration
4. AzureMarketplace Image
5. AzureDevOps: Microsoft Hosted Ubuntu Agent
6. AzureRM Backend
7. AzureTerraform VSCodeextension
twitter: @MithunShanbhagblog: mithunshanbhag.github.io
FurtherReading
1. Terraformwebsite
2. Terraformon Azure documentation
3. Terraformproviders forAzure:
1. AzureRM provider (github source, github samples)
2. AzureAD provider (github source, github samples)
3. AzureStack provider (githubsource)
4. AzureRM modules
5. AzureTerraform VSCodeextension
6. Terraformtutorial

Contenu connexe

Tendances

An introduction to terraform
An introduction to terraformAn introduction to terraform
An introduction to terraformJulien Pivotto
 
Building infrastructure as code using Terraform - DevOps Krakow
Building infrastructure as code using Terraform - DevOps KrakowBuilding infrastructure as code using Terraform - DevOps Krakow
Building infrastructure as code using Terraform - DevOps KrakowAnton Babenko
 
Infrastructure-as-Code (IaC) using Terraform
Infrastructure-as-Code (IaC) using TerraformInfrastructure-as-Code (IaC) using Terraform
Infrastructure-as-Code (IaC) using TerraformAdin Ermie
 
Best Practices of Infrastructure as Code with Terraform
Best Practices of Infrastructure as Code with TerraformBest Practices of Infrastructure as Code with Terraform
Best Practices of Infrastructure as Code with TerraformDevOps.com
 
Terraform: An Overview & Introduction
Terraform: An Overview & IntroductionTerraform: An Overview & Introduction
Terraform: An Overview & IntroductionLee Trout
 
Comprehensive Terraform Training
Comprehensive Terraform TrainingComprehensive Terraform Training
Comprehensive Terraform TrainingYevgeniy Brikman
 
Terraform modules and best-practices - September 2018
Terraform modules and best-practices - September 2018Terraform modules and best-practices - September 2018
Terraform modules and best-practices - September 2018Anton Babenko
 
Infrastructure-as-Code (IaC) Using Terraform (Intermediate Edition)
Infrastructure-as-Code (IaC) Using Terraform (Intermediate Edition)Infrastructure-as-Code (IaC) Using Terraform (Intermediate Edition)
Infrastructure-as-Code (IaC) Using Terraform (Intermediate Edition)Adin Ermie
 
Creating AWS infrastructure using Terraform
Creating AWS infrastructure using TerraformCreating AWS infrastructure using Terraform
Creating AWS infrastructure using TerraformKnoldus Inc.
 
Terraform introduction
Terraform introductionTerraform introduction
Terraform introductionJason Vance
 
Terraform modules restructured
Terraform modules restructuredTerraform modules restructured
Terraform modules restructuredAmi Mahloof
 

Tendances (20)

An introduction to terraform
An introduction to terraformAn introduction to terraform
An introduction to terraform
 
Terraform
TerraformTerraform
Terraform
 
Building infrastructure as code using Terraform - DevOps Krakow
Building infrastructure as code using Terraform - DevOps KrakowBuilding infrastructure as code using Terraform - DevOps Krakow
Building infrastructure as code using Terraform - DevOps Krakow
 
Terraform
TerraformTerraform
Terraform
 
Infrastructure-as-Code (IaC) using Terraform
Infrastructure-as-Code (IaC) using TerraformInfrastructure-as-Code (IaC) using Terraform
Infrastructure-as-Code (IaC) using Terraform
 
Best Practices of Infrastructure as Code with Terraform
Best Practices of Infrastructure as Code with TerraformBest Practices of Infrastructure as Code with Terraform
Best Practices of Infrastructure as Code with Terraform
 
Terraform: An Overview & Introduction
Terraform: An Overview & IntroductionTerraform: An Overview & Introduction
Terraform: An Overview & Introduction
 
Terraform
TerraformTerraform
Terraform
 
Final terraform
Final terraformFinal terraform
Final terraform
 
Terraform Basics
Terraform BasicsTerraform Basics
Terraform Basics
 
Terraform
TerraformTerraform
Terraform
 
Comprehensive Terraform Training
Comprehensive Terraform TrainingComprehensive Terraform Training
Comprehensive Terraform Training
 
Terraform modules and best-practices - September 2018
Terraform modules and best-practices - September 2018Terraform modules and best-practices - September 2018
Terraform modules and best-practices - September 2018
 
Terraform
TerraformTerraform
Terraform
 
Introduce to Terraform
Introduce to TerraformIntroduce to Terraform
Introduce to Terraform
 
Infrastructure-as-Code (IaC) Using Terraform (Intermediate Edition)
Infrastructure-as-Code (IaC) Using Terraform (Intermediate Edition)Infrastructure-as-Code (IaC) Using Terraform (Intermediate Edition)
Infrastructure-as-Code (IaC) Using Terraform (Intermediate Edition)
 
Creating AWS infrastructure using Terraform
Creating AWS infrastructure using TerraformCreating AWS infrastructure using Terraform
Creating AWS infrastructure using Terraform
 
Terraform introduction
Terraform introductionTerraform introduction
Terraform introduction
 
Effective terraform
Effective terraformEffective terraform
Effective terraform
 
Terraform modules restructured
Terraform modules restructuredTerraform modules restructured
Terraform modules restructured
 

Similaire à Terraform on Azure

Terraform + ansible talk
Terraform + ansible talkTerraform + ansible talk
Terraform + ansible talkJames Strong
 
How to test infrastructure code: automated testing for Terraform, Kubernetes,...
How to test infrastructure code: automated testing for Terraform, Kubernetes,...How to test infrastructure code: automated testing for Terraform, Kubernetes,...
How to test infrastructure code: automated testing for Terraform, Kubernetes,...Yevgeniy Brikman
 
Best practices for Terraform with Vault
Best practices for Terraform with VaultBest practices for Terraform with Vault
Best practices for Terraform with VaultMitchell Pronschinske
 
Terraform modules and (some of) best practices
Terraform modules and (some of) best practicesTerraform modules and (some of) best practices
Terraform modules and (some of) best practicesAnton Babenko
 
OSDC 2018 | Lifecycle of a resource. Codifying infrastructure with Terraform ...
OSDC 2018 | Lifecycle of a resource. Codifying infrastructure with Terraform ...OSDC 2018 | Lifecycle of a resource. Codifying infrastructure with Terraform ...
OSDC 2018 | Lifecycle of a resource. Codifying infrastructure with Terraform ...NETWAYS
 
Manage any AWS resources with Terraform 0.12 - April 2020
Manage any AWS resources with Terraform 0.12 - April 2020Manage any AWS resources with Terraform 0.12 - April 2020
Manage any AWS resources with Terraform 0.12 - April 2020Anton Babenko
 
Terraform Q&A - HashiCorp User Group Oslo
Terraform Q&A - HashiCorp User Group OsloTerraform Q&A - HashiCorp User Group Oslo
Terraform Q&A - HashiCorp User Group OsloAnton Babenko
 
Introduction to Terra space Presentation
Introduction to Terra space PresentationIntroduction to Terra space Presentation
Introduction to Terra space PresentationKnoldus Inc.
 
Introduction to Terraspace Presentation.
Introduction to Terraspace Presentation.Introduction to Terraspace Presentation.
Introduction to Terraspace Presentation.Knoldus Inc.
 
Terraform modules and some of best-practices - March 2019
Terraform modules and some of best-practices - March 2019Terraform modules and some of best-practices - March 2019
Terraform modules and some of best-practices - March 2019Anton Babenko
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Hashicorp-Terraform-Deep-Dive-with-no-Fear-Victor-Turbinsky-Texuna.pdf
Hashicorp-Terraform-Deep-Dive-with-no-Fear-Victor-Turbinsky-Texuna.pdfHashicorp-Terraform-Deep-Dive-with-no-Fear-Victor-Turbinsky-Texuna.pdf
Hashicorp-Terraform-Deep-Dive-with-no-Fear-Victor-Turbinsky-Texuna.pdfssuser705051
 
Terraform vs Pulumi
Terraform vs PulumiTerraform vs Pulumi
Terraform vs PulumiHoaiNam307
 
Infrastructure-as-Code (IaC) Using Terraform (Advanced Edition)
Infrastructure-as-Code (IaC) Using Terraform (Advanced Edition)Infrastructure-as-Code (IaC) Using Terraform (Advanced Edition)
Infrastructure-as-Code (IaC) Using Terraform (Advanced Edition)Adin Ermie
 
Terraform modules and (some of) best practices
Terraform modules and (some of) best practicesTerraform modules and (some of) best practices
Terraform modules and (some of) best practicesAnton Babenko
 
Terraform day 1
Terraform day 1Terraform day 1
Terraform day 1Kalkey
 
"Continuously delivering infrastructure using Terraform and Packer" training ...
"Continuously delivering infrastructure using Terraform and Packer" training ..."Continuously delivering infrastructure using Terraform and Packer" training ...
"Continuously delivering infrastructure using Terraform and Packer" training ...Anton Babenko
 

Similaire à Terraform on Azure (20)

Terraform + ansible talk
Terraform + ansible talkTerraform + ansible talk
Terraform + ansible talk
 
How to test infrastructure code: automated testing for Terraform, Kubernetes,...
How to test infrastructure code: automated testing for Terraform, Kubernetes,...How to test infrastructure code: automated testing for Terraform, Kubernetes,...
How to test infrastructure code: automated testing for Terraform, Kubernetes,...
 
Best practices for Terraform with Vault
Best practices for Terraform with VaultBest practices for Terraform with Vault
Best practices for Terraform with Vault
 
Terraform modules and (some of) best practices
Terraform modules and (some of) best practicesTerraform modules and (some of) best practices
Terraform modules and (some of) best practices
 
OSDC 2018 | Lifecycle of a resource. Codifying infrastructure with Terraform ...
OSDC 2018 | Lifecycle of a resource. Codifying infrastructure with Terraform ...OSDC 2018 | Lifecycle of a resource. Codifying infrastructure with Terraform ...
OSDC 2018 | Lifecycle of a resource. Codifying infrastructure with Terraform ...
 
Terraform training 🎒 - Basic
Terraform training 🎒 - BasicTerraform training 🎒 - Basic
Terraform training 🎒 - Basic
 
Manage any AWS resources with Terraform 0.12 - April 2020
Manage any AWS resources with Terraform 0.12 - April 2020Manage any AWS resources with Terraform 0.12 - April 2020
Manage any AWS resources with Terraform 0.12 - April 2020
 
Terraform Q&A - HashiCorp User Group Oslo
Terraform Q&A - HashiCorp User Group OsloTerraform Q&A - HashiCorp User Group Oslo
Terraform Q&A - HashiCorp User Group Oslo
 
Introduction to Terra space Presentation
Introduction to Terra space PresentationIntroduction to Terra space Presentation
Introduction to Terra space Presentation
 
Introduction to Terraspace Presentation.
Introduction to Terraspace Presentation.Introduction to Terraspace Presentation.
Introduction to Terraspace Presentation.
 
Terraform modules and some of best-practices - March 2019
Terraform modules and some of best-practices - March 2019Terraform modules and some of best-practices - March 2019
Terraform modules and some of best-practices - March 2019
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Hashicorp-Terraform-Deep-Dive-with-no-Fear-Victor-Turbinsky-Texuna.pdf
Hashicorp-Terraform-Deep-Dive-with-no-Fear-Victor-Turbinsky-Texuna.pdfHashicorp-Terraform-Deep-Dive-with-no-Fear-Victor-Turbinsky-Texuna.pdf
Hashicorp-Terraform-Deep-Dive-with-no-Fear-Victor-Turbinsky-Texuna.pdf
 
Terraform-2.pdf
Terraform-2.pdfTerraform-2.pdf
Terraform-2.pdf
 
Terraform vs Pulumi
Terraform vs PulumiTerraform vs Pulumi
Terraform vs Pulumi
 
Terraform day1
Terraform day1Terraform day1
Terraform day1
 
Infrastructure-as-Code (IaC) Using Terraform (Advanced Edition)
Infrastructure-as-Code (IaC) Using Terraform (Advanced Edition)Infrastructure-as-Code (IaC) Using Terraform (Advanced Edition)
Infrastructure-as-Code (IaC) Using Terraform (Advanced Edition)
 
Terraform modules and (some of) best practices
Terraform modules and (some of) best practicesTerraform modules and (some of) best practices
Terraform modules and (some of) best practices
 
Terraform day 1
Terraform day 1Terraform day 1
Terraform day 1
 
"Continuously delivering infrastructure using Terraform and Packer" training ...
"Continuously delivering infrastructure using Terraform and Packer" training ..."Continuously delivering infrastructure using Terraform and Packer" training ...
"Continuously delivering infrastructure using Terraform and Packer" training ...
 

Plus de Mithun Shanbhag

Identity, authentication and authorization
Identity, authentication and authorizationIdentity, authentication and authorization
Identity, authentication and authorizationMithun Shanbhag
 
Design Patterns for Data Management and Consistency
Design Patterns for Data Management and ConsistencyDesign Patterns for Data Management and Consistency
Design Patterns for Data Management and ConsistencyMithun Shanbhag
 
WSL - Windows SubSytem For Linux
WSL - Windows SubSytem For LinuxWSL - Windows SubSytem For Linux
WSL - Windows SubSytem For LinuxMithun Shanbhag
 
Creating user-mode debuggers for Windows
Creating user-mode debuggers for WindowsCreating user-mode debuggers for Windows
Creating user-mode debuggers for WindowsMithun Shanbhag
 
Crash course in git and github
Crash course in git and githubCrash course in git and github
Crash course in git and githubMithun Shanbhag
 

Plus de Mithun Shanbhag (8)

CloudSkew Architecture
CloudSkew ArchitectureCloudSkew Architecture
CloudSkew Architecture
 
Azure Pipelines
Azure PipelinesAzure Pipelines
Azure Pipelines
 
Identity, authentication and authorization
Identity, authentication and authorizationIdentity, authentication and authorization
Identity, authentication and authorization
 
Design Patterns for Data Management and Consistency
Design Patterns for Data Management and ConsistencyDesign Patterns for Data Management and Consistency
Design Patterns for Data Management and Consistency
 
WSL - Windows SubSytem For Linux
WSL - Windows SubSytem For LinuxWSL - Windows SubSytem For Linux
WSL - Windows SubSytem For Linux
 
Creating user-mode debuggers for Windows
Creating user-mode debuggers for WindowsCreating user-mode debuggers for Windows
Creating user-mode debuggers for Windows
 
Crash course in sql
Crash course in sqlCrash course in sql
Crash course in sql
 
Crash course in git and github
Crash course in git and githubCrash course in git and github
Crash course in git and github
 

Dernier

Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...soniya singh
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number SystemsJheuzeDellosa
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...MyIntelliSource, Inc.
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about usDynamic Netsoft
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AIABDERRAOUF MEHENNI
 
Test Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendTest Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendArshad QA
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsJhone kinadey
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsAndolasoft Inc
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...OnePlan Solutions
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxbodapatigopi8531
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerThousandEyes
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...harshavardhanraghave
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantAxelRicardoTrocheRiq
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 

Dernier (20)

Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number Systems
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about us
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
 
Test Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendTest Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and Backend
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.js
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
 
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
 
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS LiveVip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service Consultant
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 

Terraform on Azure

  • 2. twitter: @MithunShanbhagblog: mithunshanbhag.github.io Why Terraform? 1. Deployment Alternatives forAzure 1. AzurePortal 2. AzureRM Templates 3. AzurePowerShell 4. AzureCLI 5. AzureManagement SDK/REST 6. Pulumi 2. TerraformAdvantages 1. Facilitates multi-cloud deployments 2. Integration with multiple cloud providers (e.g. azure, aws,gcp) 3. Integration with multiple config managers (e.g. ansible, chef, puppet) 4. Execution plans (dryrun) 5. Open Source 3. TerraformDisadvantages 1. HCL Language quirks 2. Slightly lagging support for latest & greatest cloud resources
  • 3. twitter: @MithunShanbhagblog: mithunshanbhag.github.io Installation 1. Installation 1. Windows | Linux | MacOS 2. Addterraform.exe location toPATH 2. Verify byrunning terraform version 1. Latest available version is 12.7 3. AzureCLI 4. AzureTerraform VSCodeextension
  • 4. twitter: @MithunShanbhagblog: mithunshanbhag.github.io Terminology 1. Providersrepresent acloud provider (e.g. azurerm,aws) oralocal provider (e.g. tls). 1. Aprovider offers multiple resources & datasources. 2. Resources can be invoked tocreate/update infrastructure locally oron the cloud. 3. Data Sources are“read-only”resources. 4. Scripts/configuration areTerraform (.tf) script files in HCL language. 5. Modules arereusable libraries that allow creation of complex resources. 6. Provisioners areused toexecute scripts on a local orremote machine. 7. State is representation ofthe infrastructure created/updated byterraform. 1. By default state is stored in a local file (terraform.tfstate) but can alsobe stored in a remote backend.
  • 5. twitter: @MithunShanbhagblog: mithunshanbhag.github.io Providers 1. Terraformproviders forAzure 1. AzureRM provider 2. AzureAD provider 3. AzureStack provider 2. Authenticate with 1. AzureCLI 2. AzureService Principal 3. AzureManaged Service Identity 3. Other useful providers 1. TLS (create keys, certs, secrets) 2. Null (run provisioners) 3. Local (create local files) 4. Template (create strings from templates)
  • 6. twitter: @MithunShanbhagblog: mithunshanbhag.github.io Resources& Data Sources 1. Resource meta-arguments 1. depends_on 2. count 3. for_each 4. lifecycle
  • 7. twitter: @MithunShanbhagblog: mithunshanbhag.github.io Modules 1. Modules arelibraries/packages that allow you tocreate multiple resources together. 2. Module can be loaded from 1. Local paths 2. Terraformregistry 3. Source code repositories 4. Storage blobs/buckets 3. Typical module structure 1. Input variables 2. Output values 3. Resources
  • 9. twitter: @MithunShanbhagblog: mithunshanbhag.github.io CLI .tf file(s) .tfstate file(s) Execution plan.terraform folder Terraform init Initialize directory containing terraform scripts. Terraform apply Applies execution plan to azure resources. Azure Resource Terraform plan Generate an execution plan. Terraform refresh Update local state file from azure resources. Terraform validate Validates the Terraform scripts. Terraform destroy Destroys terraform-managed azure resources.
  • 10. twitter: @MithunShanbhagblog: mithunshanbhag.github.io HCL Language 1. Data types 1. Primitives: string, number, bool 2. Collections: list, map,set 3. Structural: object, tuple 2. Variables 1. Input 2. Local 3. Output
  • 11. twitter: @MithunShanbhagblog: mithunshanbhag.github.io HCL Language 3. Built-in Functions 1. Numeric: E.g.abs(), ceil(), floor(),log, max(),min() 2. String: E.g. format(), join(), upper(), lower(), split(), substr() 3. Collection: E.g.contains(), concat(), length(), reverse(), sort() 4. Encoding: E.g.base64decode(), base64encode(), urlencode() 5. Filesystem: E.g. abspath(), dirname(), file(), fileexists(), templatefile() 6. Date/Time: E.g.formatdate(), timestamp() 7. Hash/Crypto: E.g. base64sha256(), md5(), rsadecrypt(), uuid() 8. IP/Network: E.g. cidrhost(), cidrnetmask(), cidrsubnet() 9. TypeConversion: E.g.tolist(), toset(), tostring()
  • 12. twitter: @MithunShanbhagblog: mithunshanbhag.github.io HCL Language 4. Expressions 1. Stringinterpolation 2. Template strings 3. For expressions 4. Splat expressions
  • 14. twitter: @MithunShanbhagblog: mithunshanbhag.github.io Provisioners 1. Configureremote resources over SSH/WinRM connections 2. Commonly used provisioners: 1. file: copy files/directories from local Terraformserver tothe remote resource 2. local_exec: runcommands on local Terraformserver 3. remote_exec: run commands on remote resource) 3. Generally used with “null_resource” provider(with “trigger”argument)
  • 15. twitter: @MithunShanbhagblog: mithunshanbhag.github.io Integration With Azure 1. Terraformproviders forAzure 1. AzureRM provider 2. AzureAD provider 3. AzureStack provider 2. AzureRM Modules 3. AzureCloudShell Integration 4. AzureMarketplace Image 5. AzureDevOps: Microsoft Hosted Ubuntu Agent 6. AzureRM Backend 7. AzureTerraform VSCodeextension
  • 16. twitter: @MithunShanbhagblog: mithunshanbhag.github.io FurtherReading 1. Terraformwebsite 2. Terraformon Azure documentation 3. Terraformproviders forAzure: 1. AzureRM provider (github source, github samples) 2. AzureAD provider (github source, github samples) 3. AzureStack provider (githubsource) 4. AzureRM modules 5. AzureTerraform VSCodeextension 6. Terraformtutorial

Notes de l'éditeur

  1. 2.4. With an execution plan, you don’t have to worry about order of destruction, creation, dependencies etc. All that gets figured out by the terraform provider.
  2. ??? Explain these meta-arguments lifecycle
  3. One .tf file vs multiple .tf files
  4. 1.2 maps are key-value pairs where keys are strings 1.2. sets are similar to lists, but unique values only 1.3. objects { <KEY> = <TYPE>, <KEY> = <TYPE>, ... } 1.4. tuples [<TYPE>, <TYPE>, ...]
  5. AzureRM backend: How to use without service principal (use valet key)?