SlideShare a Scribd company logo
TERRAFORM: TAMING THE
MACHINES WITH
CONTINUOUS
INTEGRATION Justin Rice
Source Code: jsrice7391/tf-talk
Medium: Jsrice7391
Twitter: jsrice617
GitHub: Jsrice7391
JUSTIN RICE
• DevOps Engineer @
Indigo Ag
• Full-Stack Web
Development Teacher
@ 2U
• New England Native
• Four years in IT
• Broadcast before IT
• Sports, Cyber Sec,
Dogs, Education and
Snow enthusiast
INDIGO
• Indigo works to improve
grower profitability,
environmental sustainability, and
consumer health through the use
of natural microbiology and
digital technologies
• Working with digital
technologies in the many
different sectors of the
agricultural distribution pipeline
to bring farmers and consumers
closer to one another and make
a more natural and modern
approach from seed to shelf
INDIGO +
TERRAFOR
M
In early 2019, Indigo purchased a company called Tellus
labs, a company that specialized in geospatial mapping
and engineering.
With Tellus being acquired, and a growing software
company that released its first public facing app in July
2018, our DevOps team saw a need for control, but for a
modern age of continuous integration.
This is what we learned, and we’re happy to share it with
you.
PROLOGUE
THE CLASSIC SCENARIO
• Architecture of applications is fixed
and is rarely iterated on
• Big Releases for the sake of
compliance or feature releases.
• Big and scary
NOW…
Quick Iterations
Continuous Integration
Accessible Version control systems
Hybrid Cloud with multi different services
changing as fast as the customers need
PROBLEMS
Lots of tools to choose
from
Infrastructure over time
needs documentation.
If you want something
scalable, it has to be
repeatable
Not everyone knows
which shiny button to
click.
Terraform: Taming the Machines Through Continuous Integration
ALONG COMES
TERRAFORM…
WHY IT’S AWESOME
• Terraform is a platform that uses
Infrastructure as code (IaC) to allow its
users to manage cloud and local
architecture
• The community version is open sourced
with an available enterprise version
through HashiCorp.
• Reproducible environments
• Idempotence and convergence through
state
• Easing collaboration
• No need for the learning curve that
comes with different services and their
APIs
WHAT ITS NOT
• Cloud Formation – modularization and can handle writing true logic.
• Vagrant - Terraform can help create Vagrant resources.
• Puppet, Chef, Ansible – not cloud native
WHAT WE
WILL
COVER…
Deeper into Terraforms true power.
Key Concepts
Provider Examples
AWS Deep Dive
Advanced Concepts
Take a Tiny Step Back…
“No need for the learning
curve that comes with
different services and their
APIs”
- Justin Rice
(About a minute Ago)
NUTS AND
BOLTS…IN THE
CLOUD
RESOURCES
• The main reason we use terraform.
• All other tooling within Terraform is
built around the ability to manage
these resources.
PROVIDERS
• Responsible for writing
and understanding the
API interactions.
• Commonly written in GO
• Could be compared to as
a wrapper.
• AWS provider attempts to
be an exhaustive wrapper
around the API.
Modules
• Reusable configurations that can be
used throughout terraform.
• A module can consist of multiple,
related resources.
Variables
• Inputs given to a module to be able
to make the resource parameters
more dynamic
• Declared in HCL specific way
• Strongly typed
QUICK QUIZ
You want to start experimenting with terraform, but with something smaller and
with less expensive resources. You go and look for one of Terraforms many:
A. Providers
B. Resources
C. Services
D. Employees
Providers
Terraform has a large amount of
providers that can be used to
manage resources.
You pitch this new idea to your boss of using Terraform. She asks you to
name two of the major benefits of using Terraform. Which of the following are
two benefits of Terraform?
A. Configurations are written in YAML/YML and everyone loves yml.
B. It allows versioning of resources through the use of state.
C. It provides documentation for all services and their APIs
D. One singular language can be used to configure resources from multiple
different providers
B AND D
TERRAFORM USES A STRONGLY TYPED LANGUAGE PAIRED
WITH A CATALOG OF DIFFERENT PROVIDERS TO HANDLE
THEIR CONFIGURATION AND VERSIONS THEIR STATE
OVER TIME THROUGH STATE.
She then replies, “That sounds great, but how much does it cost.” What is your
best answer to this question?
A. “Terraform community version is well-supported, documented and free. You
only pay for the underlying resources you create with it.”
B. “It’s the holiday season, is cost really a concern?”
C. “Wicked expensive”
A
TERRAFORMS COMMUNITY VERSION IS FREE, IS WELL
DOCUMENTED AND CARRIES NO COST. YOU ONLY
PAY FOR THE RESOURCES YOU CREATE AS YOU USE
IT.
LET’S
BUILD
1. Code A VPC
2. Make that VPC
3. Make the subnets within that VPC.
4. Talk about state and then making it remote.
5. Hashi Corp Language.
6. More TF Concepts
7. Using loops for maximum Power
8. Using Terraform in Continuous Integration
9. The Beyond
STARTERS
• Every Terraform project
should begin with a
provider.
• Each provider has its own
set of resources that it is
capable of creating and
managing.
TERRAFORM INIT
WILL PULL DOWN THE PROVIDERS CONFIGURATION
SO WE CAN USE IT TO CREATE THE RESOURCES.
TERRAFORM PLAN
WILL SHOW THE USER WHAT TERRAFORM PLANS TO DO WITH
THE NEW CONFIGURATIONS COMPARED TO WHAT IT ALREADY
KNOWS.
TERRAFORM APPLY
WILL TAKE THE CURRENT RESOURCES FROM
TERRAFORM PLAN AND APPLY THEM.
NOW FOR A DEMO…
STATE
VERSION CONTROLLING INFRASTRUCTURE.
STATE
• State is where terraform really shines.
• It can be viewed in the new terraform.tfstate file that was just created.
• As you continue to add more resources and modify resources, Terraform will create new
versions of the state file and modify the objects
“EASING
COLLABORATION”
JUSTIN RICE
A NUMBER OF SLIDES AGO
TERRAFORM
BACKENDS
• Allows Terraform to send
the state file to another
location such that other
developers (or a CI
pipeline) can iterate on it.
• Hashi Corp provides a
service called Consul, but
also supports s3 for a
backend service.
LET’S CODE…
MOVING STATE FILE TO THE CLOUD AND BUILDING COOL
THINGS.
BEYOND THE
BASICS
WHERE PROVIDERS MEET PROGRAMMING
Data
• As seen in other languages, but
defined in a slightly unique manner.
• Can be used to create dynamic
values throughout.
Locals
• Creates a reference block for resources
to be able to access.
• A resource not quite in terraform or in
another location? Create a data block
to be able to access those needed
values.
• Common for providers to create
provider specific references to this.
OUTPUT• Allows for users to find values from
within the command line without
needing to access the state file
• Outputs should be used on variables
you might want to access after the
apply and be used
TERRAFORM
FUNCTIONS
• Terraform comes with a multitude
of different kinds of functions to
modify the data that we use to
create resources.
• These can also be used to create
”loops” without having to write as
much code.
FUNCTIONS AND
MODULES
UNLOCKING THE POWER OF HCL
CONTINUOUS
INTEGRATION
USING TERRAFORM TO CREATE ITS OWN CI PIPELINE.
Terraform: Taming the Machines Through Continuous Integration
CREATE THE CI
PIPELINE…
A SLIDE TO REMIND ME TO STOP AND MAKE A PIPELINE
THAT’S COOL AND ALL,
BUT…
THE INEVITABLE QUESTION THAT COMES WHEN WE MAKE
BIG DECISIONS IN ARCHITECTURE HAVE NOT CHANGED.
Terraform: Taming the Machines Through Continuous Integration
TERRAFOR
M IMPORT
Currently a feature that TF allows
that still requires a bit more
overhead, but works like a charm.
Import allows each provider to be
able to import a resource to state
file.
As of this writing, Terraform does
not automatically write a tf file, it
does however update the state.
DO IT…
TOPICS FOR
CONVERSATIO
N
Implement Terraform within multiple accounts, created from
Terraform. Block master branch to this repo. All Pull requests
generate a TFPlan file. Upon PR approval, merge to master and
make the changes.
Developers need exact stacks, add an object to the collection, TF
apply. Done.
Pushback from the organization to make sure all resources are
tagged, a certain ami, different version over multiple VMS in
multiple accounts. Change it in terraform.
QUESTION
S?
Ad

More Related Content

Similar to Terraform: Taming the Machines Through Continuous Integration (20)

A brief introduction to IaC with Terraform by Kenton Robbins (codeHarbour May...
A brief introduction to IaC with Terraform by Kenton Robbins (codeHarbour May...A brief introduction to IaC with Terraform by Kenton Robbins (codeHarbour May...
A brief introduction to IaC with Terraform by Kenton Robbins (codeHarbour May...
Alex Cachia
 
Going Cloud Native with Cloud Foundry
Going Cloud Native with Cloud FoundryGoing Cloud Native with Cloud Foundry
Going Cloud Native with Cloud Foundry
Chip Childers
 
A case study why Zoominfo uses Terraform Cloud in high-scale environment.
A case study why Zoominfo uses Terraform Cloud in high-scale environment. A case study why Zoominfo uses Terraform Cloud in high-scale environment.
A case study why Zoominfo uses Terraform Cloud in high-scale environment.
Tal Hibner
 
Terraform Automation in Azure Cloud Online Training in Hyderabad.pptx
Terraform Automation in Azure Cloud Online Training in Hyderabad.pptxTerraform Automation in Azure Cloud Online Training in Hyderabad.pptx
Terraform Automation in Azure Cloud Online Training in Hyderabad.pptx
sivavisualpath
 
Terraform vs Pulumi
Terraform vs PulumiTerraform vs Pulumi
Terraform vs Pulumi
HoaiNam307
 
Linode_eBook_Declarative_Cloud_Infrastructure_Management_with_Terraform.pptx
Linode_eBook_Declarative_Cloud_Infrastructure_Management_with_Terraform.pptxLinode_eBook_Declarative_Cloud_Infrastructure_Management_with_Terraform.pptx
Linode_eBook_Declarative_Cloud_Infrastructure_Management_with_Terraform.pptx
AkwasiBoateng6
 
What are the Benefits of Using Terraform?
What are the Benefits of Using Terraform?What are the Benefits of Using Terraform?
What are the Benefits of Using Terraform?
Ravendra Singh
 
Terraform
TerraformTerraform
Terraform
An Nguyen
 
Why Learn Terraform?
Why Learn Terraform?Why Learn Terraform?
Why Learn Terraform?
Ravendra Singh
 
Introduction to IAC and Terraform
Introduction to IAC and Terraform Introduction to IAC and Terraform
Introduction to IAC and Terraform
Venkat NaveenKashyap Devulapally
 
Kubernetes vs Terraform 111023.pdf
Kubernetes vs Terraform 111023.pdfKubernetes vs Terraform 111023.pdf
Kubernetes vs Terraform 111023.pdf
JacksonLane4
 
Devops Columbia October 2020 - Gabriel Alix: A Discussion on Terraform
Devops Columbia October 2020 - Gabriel Alix: A Discussion on TerraformDevops Columbia October 2020 - Gabriel Alix: A Discussion on Terraform
Devops Columbia October 2020 - Gabriel Alix: A Discussion on Terraform
Drew Malone
 
Devops Columbia October 2020 - Gabriel Alix: A Discussion on Terraform
Devops Columbia October 2020 - Gabriel Alix: A Discussion on Terraform Devops Columbia October 2020 - Gabriel Alix: A Discussion on Terraform
Devops Columbia October 2020 - Gabriel Alix: A Discussion on Terraform
DevOpsColumbia
 
Terraform day 1
Terraform day 1Terraform day 1
Terraform day 1
Kalkey
 
Infrastructure as Code with Terraform
Infrastructure as Code with TerraformInfrastructure as Code with Terraform
Infrastructure as Code with Terraform
Tim Berry
 
Terraform vs Kubernetes, Key Differences and Comparison.pdf
Terraform vs Kubernetes, Key Differences and Comparison.pdfTerraform vs Kubernetes, Key Differences and Comparison.pdf
Terraform vs Kubernetes, Key Differences and Comparison.pdf
EIT Academy
 
Collaborative Terraform with Atlantis
Collaborative Terraform with AtlantisCollaborative Terraform with Atlantis
Collaborative Terraform with Atlantis
Ferenc Kovács
 
Zero-to-Hero: Running Postgres in Kubernetes
Zero-to-Hero: Running Postgres in KubernetesZero-to-Hero: Running Postgres in Kubernetes
Zero-to-Hero: Running Postgres in Kubernetes
EDB
 
Room 2 - 3 - Nguyễn Hoài Nam & Nguyễn Việt Hùng - Terraform & Pulumi Comparin...
Room 2 - 3 - Nguyễn Hoài Nam & Nguyễn Việt Hùng - Terraform & Pulumi Comparin...Room 2 - 3 - Nguyễn Hoài Nam & Nguyễn Việt Hùng - Terraform & Pulumi Comparin...
Room 2 - 3 - Nguyễn Hoài Nam & Nguyễn Việt Hùng - Terraform & Pulumi Comparin...
Vietnam Open Infrastructure User Group
 
Getting Started with Cloud Foundry on Bluemix
Getting Started with Cloud Foundry on BluemixGetting Started with Cloud Foundry on Bluemix
Getting Started with Cloud Foundry on Bluemix
Jake Peyser
 
A brief introduction to IaC with Terraform by Kenton Robbins (codeHarbour May...
A brief introduction to IaC with Terraform by Kenton Robbins (codeHarbour May...A brief introduction to IaC with Terraform by Kenton Robbins (codeHarbour May...
A brief introduction to IaC with Terraform by Kenton Robbins (codeHarbour May...
Alex Cachia
 
Going Cloud Native with Cloud Foundry
Going Cloud Native with Cloud FoundryGoing Cloud Native with Cloud Foundry
Going Cloud Native with Cloud Foundry
Chip Childers
 
A case study why Zoominfo uses Terraform Cloud in high-scale environment.
A case study why Zoominfo uses Terraform Cloud in high-scale environment. A case study why Zoominfo uses Terraform Cloud in high-scale environment.
A case study why Zoominfo uses Terraform Cloud in high-scale environment.
Tal Hibner
 
Terraform Automation in Azure Cloud Online Training in Hyderabad.pptx
Terraform Automation in Azure Cloud Online Training in Hyderabad.pptxTerraform Automation in Azure Cloud Online Training in Hyderabad.pptx
Terraform Automation in Azure Cloud Online Training in Hyderabad.pptx
sivavisualpath
 
Terraform vs Pulumi
Terraform vs PulumiTerraform vs Pulumi
Terraform vs Pulumi
HoaiNam307
 
Linode_eBook_Declarative_Cloud_Infrastructure_Management_with_Terraform.pptx
Linode_eBook_Declarative_Cloud_Infrastructure_Management_with_Terraform.pptxLinode_eBook_Declarative_Cloud_Infrastructure_Management_with_Terraform.pptx
Linode_eBook_Declarative_Cloud_Infrastructure_Management_with_Terraform.pptx
AkwasiBoateng6
 
What are the Benefits of Using Terraform?
What are the Benefits of Using Terraform?What are the Benefits of Using Terraform?
What are the Benefits of Using Terraform?
Ravendra Singh
 
Kubernetes vs Terraform 111023.pdf
Kubernetes vs Terraform 111023.pdfKubernetes vs Terraform 111023.pdf
Kubernetes vs Terraform 111023.pdf
JacksonLane4
 
Devops Columbia October 2020 - Gabriel Alix: A Discussion on Terraform
Devops Columbia October 2020 - Gabriel Alix: A Discussion on TerraformDevops Columbia October 2020 - Gabriel Alix: A Discussion on Terraform
Devops Columbia October 2020 - Gabriel Alix: A Discussion on Terraform
Drew Malone
 
Devops Columbia October 2020 - Gabriel Alix: A Discussion on Terraform
Devops Columbia October 2020 - Gabriel Alix: A Discussion on Terraform Devops Columbia October 2020 - Gabriel Alix: A Discussion on Terraform
Devops Columbia October 2020 - Gabriel Alix: A Discussion on Terraform
DevOpsColumbia
 
Terraform day 1
Terraform day 1Terraform day 1
Terraform day 1
Kalkey
 
Infrastructure as Code with Terraform
Infrastructure as Code with TerraformInfrastructure as Code with Terraform
Infrastructure as Code with Terraform
Tim Berry
 
Terraform vs Kubernetes, Key Differences and Comparison.pdf
Terraform vs Kubernetes, Key Differences and Comparison.pdfTerraform vs Kubernetes, Key Differences and Comparison.pdf
Terraform vs Kubernetes, Key Differences and Comparison.pdf
EIT Academy
 
Collaborative Terraform with Atlantis
Collaborative Terraform with AtlantisCollaborative Terraform with Atlantis
Collaborative Terraform with Atlantis
Ferenc Kovács
 
Zero-to-Hero: Running Postgres in Kubernetes
Zero-to-Hero: Running Postgres in KubernetesZero-to-Hero: Running Postgres in Kubernetes
Zero-to-Hero: Running Postgres in Kubernetes
EDB
 
Room 2 - 3 - Nguyễn Hoài Nam & Nguyễn Việt Hùng - Terraform & Pulumi Comparin...
Room 2 - 3 - Nguyễn Hoài Nam & Nguyễn Việt Hùng - Terraform & Pulumi Comparin...Room 2 - 3 - Nguyễn Hoài Nam & Nguyễn Việt Hùng - Terraform & Pulumi Comparin...
Room 2 - 3 - Nguyễn Hoài Nam & Nguyễn Việt Hùng - Terraform & Pulumi Comparin...
Vietnam Open Infrastructure User Group
 
Getting Started with Cloud Foundry on Bluemix
Getting Started with Cloud Foundry on BluemixGetting Started with Cloud Foundry on Bluemix
Getting Started with Cloud Foundry on Bluemix
Jake Peyser
 

Recently uploaded (20)

Role of Data Annotation Services in AI-Powered Manufacturing
Role of Data Annotation Services in AI-Powered ManufacturingRole of Data Annotation Services in AI-Powered Manufacturing
Role of Data Annotation Services in AI-Powered Manufacturing
Andrew Leo
 
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes
 
tecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdftecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdf
fjgm517
 
Procurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptxProcurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptx
Jon Hansen
 
Semantic Cultivators : The Critical Future Role to Enable AI
Semantic Cultivators : The Critical Future Role to Enable AISemantic Cultivators : The Critical Future Role to Enable AI
Semantic Cultivators : The Critical Future Role to Enable AI
artmondano
 
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptxDevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
Justin Reock
 
Andrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell: Transforming Business Strategy Through Data-Driven InsightsAndrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell
 
Special Meetup Edition - TDX Bengaluru Meetup #52.pptx
Special Meetup Edition - TDX Bengaluru Meetup #52.pptxSpecial Meetup Edition - TDX Bengaluru Meetup #52.pptx
Special Meetup Edition - TDX Bengaluru Meetup #52.pptx
shyamraj55
 
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
BookNet Canada
 
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Aqusag Technologies
 
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptxIncreasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Anoop Ashok
 
How Can I use the AI Hype in my Business Context?
How Can I use the AI Hype in my Business Context?How Can I use the AI Hype in my Business Context?
How Can I use the AI Hype in my Business Context?
Daniel Lehner
 
Greenhouse_Monitoring_Presentation.pptx.
Greenhouse_Monitoring_Presentation.pptx.Greenhouse_Monitoring_Presentation.pptx.
Greenhouse_Monitoring_Presentation.pptx.
hpbmnnxrvb
 
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdfSAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
Precisely
 
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep DiveDesigning Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
ScyllaDB
 
Big Data Analytics Quick Research Guide by Arthur Morgan
Big Data Analytics Quick Research Guide by Arthur MorganBig Data Analytics Quick Research Guide by Arthur Morgan
Big Data Analytics Quick Research Guide by Arthur Morgan
Arthur Morgan
 
Generative Artificial Intelligence (GenAI) in Business
Generative Artificial Intelligence (GenAI) in BusinessGenerative Artificial Intelligence (GenAI) in Business
Generative Artificial Intelligence (GenAI) in Business
Dr. Tathagat Varma
 
Linux Support for SMARC: How Toradex Empowers Embedded Developers
Linux Support for SMARC: How Toradex Empowers Embedded DevelopersLinux Support for SMARC: How Toradex Empowers Embedded Developers
Linux Support for SMARC: How Toradex Empowers Embedded Developers
Toradex
 
AI and Data Privacy in 2025: Global Trends
AI and Data Privacy in 2025: Global TrendsAI and Data Privacy in 2025: Global Trends
AI and Data Privacy in 2025: Global Trends
InData Labs
 
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc
 
Role of Data Annotation Services in AI-Powered Manufacturing
Role of Data Annotation Services in AI-Powered ManufacturingRole of Data Annotation Services in AI-Powered Manufacturing
Role of Data Annotation Services in AI-Powered Manufacturing
Andrew Leo
 
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes
 
tecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdftecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdf
fjgm517
 
Procurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptxProcurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptx
Jon Hansen
 
Semantic Cultivators : The Critical Future Role to Enable AI
Semantic Cultivators : The Critical Future Role to Enable AISemantic Cultivators : The Critical Future Role to Enable AI
Semantic Cultivators : The Critical Future Role to Enable AI
artmondano
 
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptxDevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
Justin Reock
 
Andrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell: Transforming Business Strategy Through Data-Driven InsightsAndrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell
 
Special Meetup Edition - TDX Bengaluru Meetup #52.pptx
Special Meetup Edition - TDX Bengaluru Meetup #52.pptxSpecial Meetup Edition - TDX Bengaluru Meetup #52.pptx
Special Meetup Edition - TDX Bengaluru Meetup #52.pptx
shyamraj55
 
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
BookNet Canada
 
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Aqusag Technologies
 
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptxIncreasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Anoop Ashok
 
How Can I use the AI Hype in my Business Context?
How Can I use the AI Hype in my Business Context?How Can I use the AI Hype in my Business Context?
How Can I use the AI Hype in my Business Context?
Daniel Lehner
 
Greenhouse_Monitoring_Presentation.pptx.
Greenhouse_Monitoring_Presentation.pptx.Greenhouse_Monitoring_Presentation.pptx.
Greenhouse_Monitoring_Presentation.pptx.
hpbmnnxrvb
 
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdfSAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
Precisely
 
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep DiveDesigning Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
ScyllaDB
 
Big Data Analytics Quick Research Guide by Arthur Morgan
Big Data Analytics Quick Research Guide by Arthur MorganBig Data Analytics Quick Research Guide by Arthur Morgan
Big Data Analytics Quick Research Guide by Arthur Morgan
Arthur Morgan
 
Generative Artificial Intelligence (GenAI) in Business
Generative Artificial Intelligence (GenAI) in BusinessGenerative Artificial Intelligence (GenAI) in Business
Generative Artificial Intelligence (GenAI) in Business
Dr. Tathagat Varma
 
Linux Support for SMARC: How Toradex Empowers Embedded Developers
Linux Support for SMARC: How Toradex Empowers Embedded DevelopersLinux Support for SMARC: How Toradex Empowers Embedded Developers
Linux Support for SMARC: How Toradex Empowers Embedded Developers
Toradex
 
AI and Data Privacy in 2025: Global Trends
AI and Data Privacy in 2025: Global TrendsAI and Data Privacy in 2025: Global Trends
AI and Data Privacy in 2025: Global Trends
InData Labs
 
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc
 
Ad

Terraform: Taming the Machines Through Continuous Integration

  • 1. TERRAFORM: TAMING THE MACHINES WITH CONTINUOUS INTEGRATION Justin Rice Source Code: jsrice7391/tf-talk Medium: Jsrice7391 Twitter: jsrice617 GitHub: Jsrice7391
  • 2. JUSTIN RICE • DevOps Engineer @ Indigo Ag • Full-Stack Web Development Teacher @ 2U • New England Native • Four years in IT • Broadcast before IT • Sports, Cyber Sec, Dogs, Education and Snow enthusiast
  • 3. INDIGO • Indigo works to improve grower profitability, environmental sustainability, and consumer health through the use of natural microbiology and digital technologies • Working with digital technologies in the many different sectors of the agricultural distribution pipeline to bring farmers and consumers closer to one another and make a more natural and modern approach from seed to shelf
  • 4. INDIGO + TERRAFOR M In early 2019, Indigo purchased a company called Tellus labs, a company that specialized in geospatial mapping and engineering. With Tellus being acquired, and a growing software company that released its first public facing app in July 2018, our DevOps team saw a need for control, but for a modern age of continuous integration. This is what we learned, and we’re happy to share it with you.
  • 6. THE CLASSIC SCENARIO • Architecture of applications is fixed and is rarely iterated on • Big Releases for the sake of compliance or feature releases. • Big and scary
  • 7. NOW… Quick Iterations Continuous Integration Accessible Version control systems Hybrid Cloud with multi different services changing as fast as the customers need
  • 8. PROBLEMS Lots of tools to choose from Infrastructure over time needs documentation. If you want something scalable, it has to be repeatable Not everyone knows which shiny button to click.
  • 11. WHY IT’S AWESOME • Terraform is a platform that uses Infrastructure as code (IaC) to allow its users to manage cloud and local architecture • The community version is open sourced with an available enterprise version through HashiCorp. • Reproducible environments • Idempotence and convergence through state • Easing collaboration • No need for the learning curve that comes with different services and their APIs
  • 12. WHAT ITS NOT • Cloud Formation – modularization and can handle writing true logic. • Vagrant - Terraform can help create Vagrant resources. • Puppet, Chef, Ansible – not cloud native
  • 13. WHAT WE WILL COVER… Deeper into Terraforms true power. Key Concepts Provider Examples AWS Deep Dive Advanced Concepts
  • 14. Take a Tiny Step Back…
  • 15. “No need for the learning curve that comes with different services and their APIs” - Justin Rice (About a minute Ago)
  • 17. RESOURCES • The main reason we use terraform. • All other tooling within Terraform is built around the ability to manage these resources.
  • 18. PROVIDERS • Responsible for writing and understanding the API interactions. • Commonly written in GO • Could be compared to as a wrapper. • AWS provider attempts to be an exhaustive wrapper around the API.
  • 19. Modules • Reusable configurations that can be used throughout terraform. • A module can consist of multiple, related resources. Variables • Inputs given to a module to be able to make the resource parameters more dynamic • Declared in HCL specific way • Strongly typed
  • 21. You want to start experimenting with terraform, but with something smaller and with less expensive resources. You go and look for one of Terraforms many: A. Providers B. Resources C. Services D. Employees
  • 22. Providers Terraform has a large amount of providers that can be used to manage resources.
  • 23. You pitch this new idea to your boss of using Terraform. She asks you to name two of the major benefits of using Terraform. Which of the following are two benefits of Terraform? A. Configurations are written in YAML/YML and everyone loves yml. B. It allows versioning of resources through the use of state. C. It provides documentation for all services and their APIs D. One singular language can be used to configure resources from multiple different providers
  • 24. B AND D TERRAFORM USES A STRONGLY TYPED LANGUAGE PAIRED WITH A CATALOG OF DIFFERENT PROVIDERS TO HANDLE THEIR CONFIGURATION AND VERSIONS THEIR STATE OVER TIME THROUGH STATE.
  • 25. She then replies, “That sounds great, but how much does it cost.” What is your best answer to this question? A. “Terraform community version is well-supported, documented and free. You only pay for the underlying resources you create with it.” B. “It’s the holiday season, is cost really a concern?” C. “Wicked expensive”
  • 26. A TERRAFORMS COMMUNITY VERSION IS FREE, IS WELL DOCUMENTED AND CARRIES NO COST. YOU ONLY PAY FOR THE RESOURCES YOU CREATE AS YOU USE IT.
  • 28. 1. Code A VPC 2. Make that VPC 3. Make the subnets within that VPC. 4. Talk about state and then making it remote. 5. Hashi Corp Language. 6. More TF Concepts 7. Using loops for maximum Power 8. Using Terraform in Continuous Integration 9. The Beyond
  • 29. STARTERS • Every Terraform project should begin with a provider. • Each provider has its own set of resources that it is capable of creating and managing.
  • 30. TERRAFORM INIT WILL PULL DOWN THE PROVIDERS CONFIGURATION SO WE CAN USE IT TO CREATE THE RESOURCES.
  • 31. TERRAFORM PLAN WILL SHOW THE USER WHAT TERRAFORM PLANS TO DO WITH THE NEW CONFIGURATIONS COMPARED TO WHAT IT ALREADY KNOWS.
  • 32. TERRAFORM APPLY WILL TAKE THE CURRENT RESOURCES FROM TERRAFORM PLAN AND APPLY THEM.
  • 33. NOW FOR A DEMO…
  • 35. STATE • State is where terraform really shines. • It can be viewed in the new terraform.tfstate file that was just created. • As you continue to add more resources and modify resources, Terraform will create new versions of the state file and modify the objects
  • 37. TERRAFORM BACKENDS • Allows Terraform to send the state file to another location such that other developers (or a CI pipeline) can iterate on it. • Hashi Corp provides a service called Consul, but also supports s3 for a backend service.
  • 38. LET’S CODE… MOVING STATE FILE TO THE CLOUD AND BUILDING COOL THINGS.
  • 40. Data • As seen in other languages, but defined in a slightly unique manner. • Can be used to create dynamic values throughout. Locals • Creates a reference block for resources to be able to access. • A resource not quite in terraform or in another location? Create a data block to be able to access those needed values. • Common for providers to create provider specific references to this.
  • 41. OUTPUT• Allows for users to find values from within the command line without needing to access the state file • Outputs should be used on variables you might want to access after the apply and be used
  • 42. TERRAFORM FUNCTIONS • Terraform comes with a multitude of different kinds of functions to modify the data that we use to create resources. • These can also be used to create ”loops” without having to write as much code.
  • 44. CONTINUOUS INTEGRATION USING TERRAFORM TO CREATE ITS OWN CI PIPELINE.
  • 46. CREATE THE CI PIPELINE… A SLIDE TO REMIND ME TO STOP AND MAKE A PIPELINE
  • 47. THAT’S COOL AND ALL, BUT… THE INEVITABLE QUESTION THAT COMES WHEN WE MAKE BIG DECISIONS IN ARCHITECTURE HAVE NOT CHANGED.
  • 49. TERRAFOR M IMPORT Currently a feature that TF allows that still requires a bit more overhead, but works like a charm. Import allows each provider to be able to import a resource to state file. As of this writing, Terraform does not automatically write a tf file, it does however update the state.
  • 51. TOPICS FOR CONVERSATIO N Implement Terraform within multiple accounts, created from Terraform. Block master branch to this repo. All Pull requests generate a TFPlan file. Upon PR approval, merge to master and make the changes. Developers need exact stacks, add an object to the collection, TF apply. Done. Pushback from the organization to make sure all resources are tagged, a certain ami, different version over multiple VMS in multiple accounts. Change it in terraform.