SlideShare a Scribd company logo
1 of 44
Terraform:
The Road to
Self-Service
Ryan Boyce
- Bankrate Platform
Engineer
- Ramenhead
GitHub: github.com/majoras-masque
LinkedIn: linkedin.com/in/boyceryan/
2
Overview
What’re we doing here again?
3
Overview
➝ Burning questions
➝ Terraform basics
➝ Where we were
➝ Where we are now
➝ How did WE get here?
➝ Terraform Enterprise basics
➝ Key takeaways
➝ Questions
4
Burning Questions
I know someone is waiting to ask...
5
Burning Questions
➝ Why are using Terraform if you’re an AWS shop?
⇾ Cloud Agnostic
⇾ QoL
⇾ Project Organization and Referencing
6
Burning Questions
➝ What KPI’s did you measure along the way?
⇾ None officially
→ Enabled by leadership buy-in and trust,
developer feedback
⇾ Unplanned Work (Jira)
➝ What KPI’s should I measure?
⇾ Provisioning Time
⇾ Unplanned Work
⇾ Developer Satisfaction
7
Terraform Basics
A map so you’re not lost tonight
8
Terraform Basics
➝ Workflow
⇾ Write, Init, Plan, Apply…
⇾ State file
➝ Modules
9
Terraform Basics
Heads up...
➝ HCL 2.0 released! (Terraform >= 0.12)
⇾ First-class expressions
→ “${var.foo}” becomes var.foo
⇾ For-loops for iterating lists/maps
⇾ Ternary conditionals for all data types
⇾ Rich types in modules (e.g. map with mixed
value types)
⇾ Dynamic child-block generation from
maps/list
⇾ etc...
10
Terraform Basics
Providers
11
➝ 110 official providers, many more community
providers
⇾ Examples: AWS, Rancher, PagerDuty,
DataDog, NewRelic, Fastly, GitHub,
SignalFx, etc.
➝ Provides a set of “resources” than can be
created/managed via Terraform
Terraform Basics
Example
12
Terraform Basics
State Files
13
➝ State File
⇾ Maps resources in code to resources in
cloud
⇾ JSON Format
⇾ Can be stored locally, or remotely
→ Store it remotely, not in VC...
- Great example:
- https://thorsten-hans.com/terraform-state-
demystified
Terraform Basics
State File
14
15
Terraform Basics
Remote State
16
➝ State file can be stored in S3, Artifactory,
Terraform Cloud, etc
⇾ Can even be in custom file server with an api
in front of it
➝ Can be referenced by other projects
⇾ A lot of power here!
Terraform Basics
Remote State Referencing
17
Terraform Basics - Modules
18
Where we were
Stuck in the middle with you
19
Where we were
20
➝ New Infrastructure
⇾ Ticket System
➝ Something Breaks
⇾ In the cloud? Over the wall!
➝ Why it wasn’t sustainable
⇾ Cloud Bottleneck
⇾ All time writing TF
⇾ Cloud wasn’t evolving
→ Content with existing modules, etc
⇾ Developers weren’t learning/growing
→ How their app ran in the cloud
→ How to design cloud-native
Where we were
Aside: Thinking Cloud-Native
21
➝ What does that even mean?
⇾ Asking the right questions:
→ 1.) Are we rebuilding something
someone else already wrote?
→ 2.) Are we using the best tools for the
job?
→ 3.) Are we writing code for our laptops
or for the cloud?
Where we are now
Unicorns and rainbows baby*
22*Okay not quite...
Where we are now
23
➝ New Infrastructure
⇾ Developers write, approve, apply without our
team knowing or helping
⇾ Infra code goes right with app code
➝ Something Breaks
⇾ Developers are involved, often first
responders
➝ Developer Requests Transformed
⇾ Reactive turned Proactive
How did WE get here?
Our journey to self-service, your experience may vary...
24
How’d WE get here?
25
➝ Timeline: Creating new infrastructure
➝ Key Steps
⇾ Developer Education
⇾ Terraform Modules
⇾ Terraform Enterprise
How’d WE get here?
Timeline: Creating new infrastructure
26
➝ Ticket with an app name
➝ Tickets had actual details like “ASG, scales on
CPU, Postgres DB with X,Y Needs, Fastly"
➝ Pairing on infrastructure tickets
➝ Devs write, PR’s in, we fix
➝ Devs write, PR’s in, we merge/apply (longest
phase)
⇾ Opened up QA, Prod still lagging...
➝ Devs write, pair on Terraform Enterprise (TFE)
applies
➝ Devs write, devs apply
How’d WE get here?
Terraform Modules -> Developer Education -> Terraform Enterprise
27
➝ Started monolithic: call once, creates everything
⇾ Not modular, hard to version
➝ Evolved to submodules strategy
➝ Essentials:
⇾ Plug and Play
⇾ Assumptions are defaults, not rails
⇾ Cowpath not railroad tracks
⇾ Purpose
→ Faster than rewriting
→ Enforcing some standards
How’d WE get here?
Terraform Modules -> Developer Education -> Terraform Enterprise
28
➝ Pairing + Lunch & Learns
➝ Documentation, coursework, examples
➝ Peers start teaching each other
⇾ (Unicorns start appearing during this phase)
How’d WE get here?
Terraform Modules -> Developer Education -> Terraform Enterprise
29
➝ Gifts from the Hashicorp Gods:
⇾ Remote-state locking
⇾ Pipelines
⇾ Audit Trails
⇾ Better scoped Access
→ AWS
→ TFE Itself
Terraform Enterprise
Basics
“Enterprise”? It must be better!
30
Terraform Enterprise Basics
Problems to solve as you expand
31
➝ Collab (state issues)
➝ Pipelines
➝ Enforcing code standards
➝ Audit trails
➝ Keeping code consistent between environments
Terraform Enterprise Basics
High Level Overview
32
➝ Workspaces
⇾ Workspace vars
⇾ State files
➝ Modules
⇾ Enter: Semantic Versioning
➝ Sentinel
⇾ Policy enforcement
➝ Workflow
⇾ VCS, CLI, API driven workflows
Terraform Enterprise Basics
Workspaces - Enabling CI/CD, Consistency, and Collab
33
Terraform Enterprise Basics
Modules - Fixing versioning, updates, and consistency
34
➝ Semantic Versioning
Terraform Enterprise Basics
Sentinel - Fixing consistency, upholding standards
35
➝ Policy-as-Code
⇾ Examples:
→ S3 Buckets must be private
→ No IAM Policies that allow IAM:*
→ Mandatory tags
→ Pre-approved modules
36
Terraform Enterprise Basics
Workflow - Fixing CI/CD, enabling experimentation
37
➝ VCS-Driven Workflow
➝ CLI-Driven Workflow
➝ API-Driven Workflow
Terraform Enterprise Basics
Workflow - VCS-Driven Workflow
38
➝ Webhook into GitHub/BitBucket
⇾ Points to folder/branch
⇾ Triggers when change happens on that
branch
➝ My 2-Cents: Terrible
⇾ Doesn’t support release-based dev
⇾ Encourages different code for QA/Prod
⇾ Hard to iterate/test
Terraform Enterprise Basics
Workflow - CLI-Driven Workflow
39
➝ Runs triggered from anywhere via CLI
⇾ Local laptop
⇾ CI/CD
→ https://circleci.com/orbs/registry/orb/ba
nkrate/terraform
➝ Great for automation/pipelines
➝ Great for experimentation, local development
➝ Encourages single copy of code for QA/Prod
Terraform Enterprise Basics
Workflow - API-Driven Workflow
40
➝ Just don’t...
Key Takeaways
But that guy at the meetup told me to...
41
Key Takeaways
Terraform Best Practices
42
➝ Build your own vs the cost of TFE
➝ Modules should be modular
➝ Cow Path not Rail Road
Key Takeaways
Cultural
43
➝ Just build a platform? No.
⇾ Where are you on your journey?
⇾ Work with devs, leaders to determine end
goal
➝ Organization size and needs determine your
course
⇾ Embedded engineers
⇾ Tooling Team
⇾ Treading Water
➝ Devs need to be engaged: this is a cultural shift
⇾ Trust your devs
➝ Leaders need to be educated
⇾ Book Club: Accelerate, DevOps Handbook,
etc
Questions?
Q & maybe A?
44

More Related Content

What's hot

Terraform introduction
Terraform introductionTerraform introduction
Terraform introductionJason Vance
 
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
 
Azure Stack Fundamentals
Azure Stack FundamentalsAzure Stack Fundamentals
Azure Stack FundamentalsCenk Ersoy
 
Terraform in deployment pipeline
Terraform in deployment pipelineTerraform in deployment pipeline
Terraform in deployment pipelineAnton 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
 
Terraform -- Infrastructure as Code
Terraform -- Infrastructure as CodeTerraform -- Infrastructure as Code
Terraform -- Infrastructure as CodeMartin Schütte
 
VCS + Terraform Cloud: Azure DevOps, GitLab, GitHub & Bitbucket
VCS + Terraform Cloud: Azure DevOps, GitLab, GitHub & BitbucketVCS + Terraform Cloud: Azure DevOps, GitLab, GitHub & Bitbucket
VCS + Terraform Cloud: Azure DevOps, GitLab, GitHub & BitbucketMitchell Pronschinske
 
Microsoft Azure IaaS and Terraform
Microsoft Azure IaaS and TerraformMicrosoft Azure IaaS and Terraform
Microsoft Azure IaaS and TerraformAlex Mags
 
Kubernetes introduction
Kubernetes introductionKubernetes introduction
Kubernetes introductionDongwon Kim
 
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
 
Learn Terraform on Azure
Learn Terraform on AzureLearn Terraform on Azure
Learn Terraform on AzureJorn Jambers
 
Provisioning Infrastructure Using Terraform
Provisioning Infrastructure Using TerraformProvisioning Infrastructure Using Terraform
Provisioning Infrastructure Using TerraformKnoldus Inc.
 

What's hot (20)

02 terraform core concepts
02 terraform core concepts02 terraform core concepts
02 terraform core concepts
 
Terraform introduction
Terraform introductionTerraform introduction
Terraform introduction
 
Terraform
TerraformTerraform
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
 
Azure Stack Fundamentals
Azure Stack FundamentalsAzure Stack Fundamentals
Azure Stack Fundamentals
 
Terraform in deployment pipeline
Terraform in deployment pipelineTerraform in deployment pipeline
Terraform in deployment pipeline
 
Infrastructure-as-Code (IaC) using Terraform
Infrastructure-as-Code (IaC) using TerraformInfrastructure-as-Code (IaC) using Terraform
Infrastructure-as-Code (IaC) using Terraform
 
Terraform -- Infrastructure as Code
Terraform -- Infrastructure as CodeTerraform -- Infrastructure as Code
Terraform -- Infrastructure as Code
 
VCS + Terraform Cloud: Azure DevOps, GitLab, GitHub & Bitbucket
VCS + Terraform Cloud: Azure DevOps, GitLab, GitHub & BitbucketVCS + Terraform Cloud: Azure DevOps, GitLab, GitHub & Bitbucket
VCS + Terraform Cloud: Azure DevOps, GitLab, GitHub & Bitbucket
 
Microsoft Azure IaaS and Terraform
Microsoft Azure IaaS and TerraformMicrosoft Azure IaaS and Terraform
Microsoft Azure IaaS and Terraform
 
Kubernetes introduction
Kubernetes introductionKubernetes introduction
Kubernetes introduction
 
Terraform
TerraformTerraform
Terraform
 
Effective terraform
Effective terraformEffective terraform
Effective terraform
 
Terraform
TerraformTerraform
Terraform
 
Terraform Basics
Terraform BasicsTerraform Basics
Terraform Basics
 
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)
 
Learn Terraform on Azure
Learn Terraform on AzureLearn Terraform on Azure
Learn Terraform on Azure
 
Provisioning Infrastructure Using Terraform
Provisioning Infrastructure Using TerraformProvisioning Infrastructure Using Terraform
Provisioning Infrastructure Using Terraform
 
Azure Stack Overview
Azure Stack OverviewAzure Stack Overview
Azure Stack Overview
 

Similar to Terraform - The Road to Self-Service

"The life beyond Terraform, or the rise of Platform Engineering", Stanislav ...
"The life beyond Terraform, or the rise of Platform Engineering",  Stanislav ..."The life beyond Terraform, or the rise of Platform Engineering",  Stanislav ...
"The life beyond Terraform, or the rise of Platform Engineering", Stanislav ...Fwdays
 
DevOps Fest 2020. immutable infrastructure as code. True story.
DevOps Fest 2020. immutable infrastructure as code. True story.DevOps Fest 2020. immutable infrastructure as code. True story.
DevOps Fest 2020. immutable infrastructure as code. True story.Vlad Fedosov
 
Dev Ops for systems of record - Talk at Agile Australia 2015
Dev Ops for systems of record - Talk at Agile Australia 2015Dev Ops for systems of record - Talk at Agile Australia 2015
Dev Ops for systems of record - Talk at Agile Australia 2015Mirco Hering
 
DOES15 - Mirco Hering - Adopting DevOps Practices for Systems of Record – An ...
DOES15 - Mirco Hering - Adopting DevOps Practices for Systems of Record – An ...DOES15 - Mirco Hering - Adopting DevOps Practices for Systems of Record – An ...
DOES15 - Mirco Hering - Adopting DevOps Practices for Systems of Record – An ...Gene Kim
 
Mirco hering devops for systems of record final
Mirco hering devops for systems of record finalMirco hering devops for systems of record final
Mirco hering devops for systems of record finalMirco Hering
 
DevOps: The New Face Of Application Development - Global Azure Bootcamp
DevOps: The New Face Of Application Development - Global Azure BootcampDevOps: The New Face Of Application Development - Global Azure Bootcamp
DevOps: The New Face Of Application Development - Global Azure BootcampRichard Harbridge
 
Idi2018 - Serverless does not mean Opsless
Idi2018 - Serverless does not mean OpslessIdi2018 - Serverless does not mean Opsless
Idi2018 - Serverless does not mean OpslessLinuxaria.com
 
How to get started with Site Reliability Engineering
How to get started with Site Reliability EngineeringHow to get started with Site Reliability Engineering
How to get started with Site Reliability EngineeringAndrew Kirkpatrick
 
Enterprise Frameworks: Java & .NET
Enterprise Frameworks: Java & .NETEnterprise Frameworks: Java & .NET
Enterprise Frameworks: Java & .NETAnant Corporation
 
Hacking for fun & profit - The Kubernetes Way - Demi Ben-Ari - Panorays
Hacking for fun & profit - The Kubernetes Way - Demi Ben-Ari - PanoraysHacking for fun & profit - The Kubernetes Way - Demi Ben-Ari - Panorays
Hacking for fun & profit - The Kubernetes Way - Demi Ben-Ari - PanoraysDemi Ben-Ari
 
IT SIMPLY WORKS! … UNTIL IT BREAKS. STANDARDS, BEST PRACTICE AND ENTERPRISE P...
IT SIMPLY WORKS! … UNTIL IT BREAKS. STANDARDS, BEST PRACTICE AND ENTERPRISE P...IT SIMPLY WORKS! … UNTIL IT BREAKS. STANDARDS, BEST PRACTICE AND ENTERPRISE P...
IT SIMPLY WORKS! … UNTIL IT BREAKS. STANDARDS, BEST PRACTICE AND ENTERPRISE P...Daniel Stange
 
Design is a process, not a Document
Design is a process, not a DocumentDesign is a process, not a Document
Design is a process, not a DocumentTrisha Gee
 
Kubecon seattle 2018 workshop slides
Kubecon seattle 2018 workshop slidesKubecon seattle 2018 workshop slides
Kubecon seattle 2018 workshop slidesWeaveworks
 
Productionalizing Models through CI/CD Design with MLflow
Productionalizing Models through CI/CD Design with MLflowProductionalizing Models through CI/CD Design with MLflow
Productionalizing Models through CI/CD Design with MLflowDatabricks
 
From Mess To Masterpiece - JFokus 2017
From Mess To Masterpiece - JFokus 2017From Mess To Masterpiece - JFokus 2017
From Mess To Masterpiece - JFokus 2017Sven Ruppert
 
Deploying Python Machine Learning Models with Apache Spark with Brandon Hamri...
Deploying Python Machine Learning Models with Apache Spark with Brandon Hamri...Deploying Python Machine Learning Models with Apache Spark with Brandon Hamri...
Deploying Python Machine Learning Models with Apache Spark with Brandon Hamri...Databricks
 
From HDFS to S3: Migrate Pinterest Apache Spark Clusters
From HDFS to S3: Migrate Pinterest Apache Spark ClustersFrom HDFS to S3: Migrate Pinterest Apache Spark Clusters
From HDFS to S3: Migrate Pinterest Apache Spark ClustersDatabricks
 
DevOps: Automate all the things
DevOps: Automate all the thingsDevOps: Automate all the things
DevOps: Automate all the thingsMat Mannion
 

Similar to Terraform - The Road to Self-Service (20)

"The life beyond Terraform, or the rise of Platform Engineering", Stanislav ...
"The life beyond Terraform, or the rise of Platform Engineering",  Stanislav ..."The life beyond Terraform, or the rise of Platform Engineering",  Stanislav ...
"The life beyond Terraform, or the rise of Platform Engineering", Stanislav ...
 
DevOps Fest 2020. immutable infrastructure as code. True story.
DevOps Fest 2020. immutable infrastructure as code. True story.DevOps Fest 2020. immutable infrastructure as code. True story.
DevOps Fest 2020. immutable infrastructure as code. True story.
 
Dev Ops for systems of record - Talk at Agile Australia 2015
Dev Ops for systems of record - Talk at Agile Australia 2015Dev Ops for systems of record - Talk at Agile Australia 2015
Dev Ops for systems of record - Talk at Agile Australia 2015
 
DOES15 - Mirco Hering - Adopting DevOps Practices for Systems of Record – An ...
DOES15 - Mirco Hering - Adopting DevOps Practices for Systems of Record – An ...DOES15 - Mirco Hering - Adopting DevOps Practices for Systems of Record – An ...
DOES15 - Mirco Hering - Adopting DevOps Practices for Systems of Record – An ...
 
Mirco hering devops for systems of record final
Mirco hering devops for systems of record finalMirco hering devops for systems of record final
Mirco hering devops for systems of record final
 
DevOps: The New Face Of Application Development - Global Azure Bootcamp
DevOps: The New Face Of Application Development - Global Azure BootcampDevOps: The New Face Of Application Development - Global Azure Bootcamp
DevOps: The New Face Of Application Development - Global Azure Bootcamp
 
Idi2018 - Serverless does not mean Opsless
Idi2018 - Serverless does not mean OpslessIdi2018 - Serverless does not mean Opsless
Idi2018 - Serverless does not mean Opsless
 
How to get started with Site Reliability Engineering
How to get started with Site Reliability EngineeringHow to get started with Site Reliability Engineering
How to get started with Site Reliability Engineering
 
Enterprise Frameworks: Java & .NET
Enterprise Frameworks: Java & .NETEnterprise Frameworks: Java & .NET
Enterprise Frameworks: Java & .NET
 
Hacking for fun & profit - The Kubernetes Way - Demi Ben-Ari - Panorays
Hacking for fun & profit - The Kubernetes Way - Demi Ben-Ari - PanoraysHacking for fun & profit - The Kubernetes Way - Demi Ben-Ari - Panorays
Hacking for fun & profit - The Kubernetes Way - Demi Ben-Ari - Panorays
 
IT SIMPLY WORKS! … UNTIL IT BREAKS. STANDARDS, BEST PRACTICE AND ENTERPRISE P...
IT SIMPLY WORKS! … UNTIL IT BREAKS. STANDARDS, BEST PRACTICE AND ENTERPRISE P...IT SIMPLY WORKS! … UNTIL IT BREAKS. STANDARDS, BEST PRACTICE AND ENTERPRISE P...
IT SIMPLY WORKS! … UNTIL IT BREAKS. STANDARDS, BEST PRACTICE AND ENTERPRISE P...
 
Design is a process, not a Document
Design is a process, not a DocumentDesign is a process, not a Document
Design is a process, not a Document
 
Kubecon seattle 2018 workshop slides
Kubecon seattle 2018 workshop slidesKubecon seattle 2018 workshop slides
Kubecon seattle 2018 workshop slides
 
Productionalizing Models through CI/CD Design with MLflow
Productionalizing Models through CI/CD Design with MLflowProductionalizing Models through CI/CD Design with MLflow
Productionalizing Models through CI/CD Design with MLflow
 
DevOps: Infrastructure as Code
DevOps: Infrastructure as CodeDevOps: Infrastructure as Code
DevOps: Infrastructure as Code
 
From Mess To Masterpiece - JFokus 2017
From Mess To Masterpiece - JFokus 2017From Mess To Masterpiece - JFokus 2017
From Mess To Masterpiece - JFokus 2017
 
Deploying Python Machine Learning Models with Apache Spark with Brandon Hamri...
Deploying Python Machine Learning Models with Apache Spark with Brandon Hamri...Deploying Python Machine Learning Models with Apache Spark with Brandon Hamri...
Deploying Python Machine Learning Models with Apache Spark with Brandon Hamri...
 
The elements of kubernetes
The elements of kubernetesThe elements of kubernetes
The elements of kubernetes
 
From HDFS to S3: Migrate Pinterest Apache Spark Clusters
From HDFS to S3: Migrate Pinterest Apache Spark ClustersFrom HDFS to S3: Migrate Pinterest Apache Spark Clusters
From HDFS to S3: Migrate Pinterest Apache Spark Clusters
 
DevOps: Automate all the things
DevOps: Automate all the thingsDevOps: Automate all the things
DevOps: Automate all the things
 

Recently uploaded

VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnAmarnathKambale
 
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
 
Exploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfExploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfproinshot.com
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesVictorSzoltysek
 
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
 
How to Choose the Right Laravel Development Partner in New York City_compress...
How to Choose the Right Laravel Development Partner in New York City_compress...How to Choose the Right Laravel Development Partner in New York City_compress...
How to Choose the Right Laravel Development Partner in New York City_compress...software pro Development
 
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdfAzure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdfryanfarris8
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionSolGuruz
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfVishalKumarJha10
 
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
 
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
 
10 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 202410 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 2024Mind IT Systems
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfkalichargn70th171
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Steffen Staab
 
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...kalichargn70th171
 
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
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...Health
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech studentsHimanshiGarg82
 

Recently uploaded (20)

VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
 
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
 
Exploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfExploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdf
 
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
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
 
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
 
How to Choose the Right Laravel Development Partner in New York City_compress...
How to Choose the Right Laravel Development Partner in New York City_compress...How to Choose the Right Laravel Development Partner in New York City_compress...
How to Choose the Right Laravel Development Partner in New York City_compress...
 
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdfAzure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with Precision
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
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...
 
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
 
10 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 202410 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 2024
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
 
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
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students
 

Terraform - The Road to Self-Service

  • 2. Ryan Boyce - Bankrate Platform Engineer - Ramenhead GitHub: github.com/majoras-masque LinkedIn: linkedin.com/in/boyceryan/ 2
  • 4. Overview ➝ Burning questions ➝ Terraform basics ➝ Where we were ➝ Where we are now ➝ How did WE get here? ➝ Terraform Enterprise basics ➝ Key takeaways ➝ Questions 4
  • 5. Burning Questions I know someone is waiting to ask... 5
  • 6. Burning Questions ➝ Why are using Terraform if you’re an AWS shop? ⇾ Cloud Agnostic ⇾ QoL ⇾ Project Organization and Referencing 6
  • 7. Burning Questions ➝ What KPI’s did you measure along the way? ⇾ None officially → Enabled by leadership buy-in and trust, developer feedback ⇾ Unplanned Work (Jira) ➝ What KPI’s should I measure? ⇾ Provisioning Time ⇾ Unplanned Work ⇾ Developer Satisfaction 7
  • 8. Terraform Basics A map so you’re not lost tonight 8
  • 9. Terraform Basics ➝ Workflow ⇾ Write, Init, Plan, Apply… ⇾ State file ➝ Modules 9
  • 10. Terraform Basics Heads up... ➝ HCL 2.0 released! (Terraform >= 0.12) ⇾ First-class expressions → “${var.foo}” becomes var.foo ⇾ For-loops for iterating lists/maps ⇾ Ternary conditionals for all data types ⇾ Rich types in modules (e.g. map with mixed value types) ⇾ Dynamic child-block generation from maps/list ⇾ etc... 10
  • 11. Terraform Basics Providers 11 ➝ 110 official providers, many more community providers ⇾ Examples: AWS, Rancher, PagerDuty, DataDog, NewRelic, Fastly, GitHub, SignalFx, etc. ➝ Provides a set of “resources” than can be created/managed via Terraform
  • 13. Terraform Basics State Files 13 ➝ State File ⇾ Maps resources in code to resources in cloud ⇾ JSON Format ⇾ Can be stored locally, or remotely → Store it remotely, not in VC... - Great example: - https://thorsten-hans.com/terraform-state- demystified
  • 15. 15
  • 16. Terraform Basics Remote State 16 ➝ State file can be stored in S3, Artifactory, Terraform Cloud, etc ⇾ Can even be in custom file server with an api in front of it ➝ Can be referenced by other projects ⇾ A lot of power here!
  • 18. Terraform Basics - Modules 18
  • 19. Where we were Stuck in the middle with you 19
  • 20. Where we were 20 ➝ New Infrastructure ⇾ Ticket System ➝ Something Breaks ⇾ In the cloud? Over the wall! ➝ Why it wasn’t sustainable ⇾ Cloud Bottleneck ⇾ All time writing TF ⇾ Cloud wasn’t evolving → Content with existing modules, etc ⇾ Developers weren’t learning/growing → How their app ran in the cloud → How to design cloud-native
  • 21. Where we were Aside: Thinking Cloud-Native 21 ➝ What does that even mean? ⇾ Asking the right questions: → 1.) Are we rebuilding something someone else already wrote? → 2.) Are we using the best tools for the job? → 3.) Are we writing code for our laptops or for the cloud?
  • 22. Where we are now Unicorns and rainbows baby* 22*Okay not quite...
  • 23. Where we are now 23 ➝ New Infrastructure ⇾ Developers write, approve, apply without our team knowing or helping ⇾ Infra code goes right with app code ➝ Something Breaks ⇾ Developers are involved, often first responders ➝ Developer Requests Transformed ⇾ Reactive turned Proactive
  • 24. How did WE get here? Our journey to self-service, your experience may vary... 24
  • 25. How’d WE get here? 25 ➝ Timeline: Creating new infrastructure ➝ Key Steps ⇾ Developer Education ⇾ Terraform Modules ⇾ Terraform Enterprise
  • 26. How’d WE get here? Timeline: Creating new infrastructure 26 ➝ Ticket with an app name ➝ Tickets had actual details like “ASG, scales on CPU, Postgres DB with X,Y Needs, Fastly" ➝ Pairing on infrastructure tickets ➝ Devs write, PR’s in, we fix ➝ Devs write, PR’s in, we merge/apply (longest phase) ⇾ Opened up QA, Prod still lagging... ➝ Devs write, pair on Terraform Enterprise (TFE) applies ➝ Devs write, devs apply
  • 27. How’d WE get here? Terraform Modules -> Developer Education -> Terraform Enterprise 27 ➝ Started monolithic: call once, creates everything ⇾ Not modular, hard to version ➝ Evolved to submodules strategy ➝ Essentials: ⇾ Plug and Play ⇾ Assumptions are defaults, not rails ⇾ Cowpath not railroad tracks ⇾ Purpose → Faster than rewriting → Enforcing some standards
  • 28. How’d WE get here? Terraform Modules -> Developer Education -> Terraform Enterprise 28 ➝ Pairing + Lunch & Learns ➝ Documentation, coursework, examples ➝ Peers start teaching each other ⇾ (Unicorns start appearing during this phase)
  • 29. How’d WE get here? Terraform Modules -> Developer Education -> Terraform Enterprise 29 ➝ Gifts from the Hashicorp Gods: ⇾ Remote-state locking ⇾ Pipelines ⇾ Audit Trails ⇾ Better scoped Access → AWS → TFE Itself
  • 31. Terraform Enterprise Basics Problems to solve as you expand 31 ➝ Collab (state issues) ➝ Pipelines ➝ Enforcing code standards ➝ Audit trails ➝ Keeping code consistent between environments
  • 32. Terraform Enterprise Basics High Level Overview 32 ➝ Workspaces ⇾ Workspace vars ⇾ State files ➝ Modules ⇾ Enter: Semantic Versioning ➝ Sentinel ⇾ Policy enforcement ➝ Workflow ⇾ VCS, CLI, API driven workflows
  • 33. Terraform Enterprise Basics Workspaces - Enabling CI/CD, Consistency, and Collab 33
  • 34. Terraform Enterprise Basics Modules - Fixing versioning, updates, and consistency 34 ➝ Semantic Versioning
  • 35. Terraform Enterprise Basics Sentinel - Fixing consistency, upholding standards 35 ➝ Policy-as-Code ⇾ Examples: → S3 Buckets must be private → No IAM Policies that allow IAM:* → Mandatory tags → Pre-approved modules
  • 36. 36
  • 37. Terraform Enterprise Basics Workflow - Fixing CI/CD, enabling experimentation 37 ➝ VCS-Driven Workflow ➝ CLI-Driven Workflow ➝ API-Driven Workflow
  • 38. Terraform Enterprise Basics Workflow - VCS-Driven Workflow 38 ➝ Webhook into GitHub/BitBucket ⇾ Points to folder/branch ⇾ Triggers when change happens on that branch ➝ My 2-Cents: Terrible ⇾ Doesn’t support release-based dev ⇾ Encourages different code for QA/Prod ⇾ Hard to iterate/test
  • 39. Terraform Enterprise Basics Workflow - CLI-Driven Workflow 39 ➝ Runs triggered from anywhere via CLI ⇾ Local laptop ⇾ CI/CD → https://circleci.com/orbs/registry/orb/ba nkrate/terraform ➝ Great for automation/pipelines ➝ Great for experimentation, local development ➝ Encourages single copy of code for QA/Prod
  • 40. Terraform Enterprise Basics Workflow - API-Driven Workflow 40 ➝ Just don’t...
  • 41. Key Takeaways But that guy at the meetup told me to... 41
  • 42. Key Takeaways Terraform Best Practices 42 ➝ Build your own vs the cost of TFE ➝ Modules should be modular ➝ Cow Path not Rail Road
  • 43. Key Takeaways Cultural 43 ➝ Just build a platform? No. ⇾ Where are you on your journey? ⇾ Work with devs, leaders to determine end goal ➝ Organization size and needs determine your course ⇾ Embedded engineers ⇾ Tooling Team ⇾ Treading Water ➝ Devs need to be engaged: this is a cultural shift ⇾ Trust your devs ➝ Leaders need to be educated ⇾ Book Club: Accelerate, DevOps Handbook, etc

Editor's Notes

  1. Notes