SlideShare a Scribd company logo
Terraforming
David Przybilla
dav009 dav009
! コロンビア
first time at JAWS
Tokyo
until recently

Data Engineering / NLP
Slowly get into

Infrastructure
..Ops + Golang + Python..
first week..started looking at projects..
first week..started looking at projects..
Github repos…
first week..started looking at projects..
Github repos…
New project I had to work on…
Terraforming
Terraforming
code
code
terraform apply
code aws
infrastructureterraform apply
lots of small services
lots of infrastructure
..lambda functions..
..kinesis..
..sqs..
..ecs..
early adopters of terraform
many terraform versions
many different project structures
bootstrapping a project is also
tough
where do I run terraform?
what role should run
terraform?
where do I run terraform?
what role should run
terraform?
where do I run terraform?
..credentials..
bootstrapping my project took
longer than I wanted
..complex project structure..
sample_old_project/
sample_old_project/
tf/
sample_old_project/
tf/
lambda_functions.tf
sample_old_project/
tf/
lambda_functions.tf
iam.tf
sample_old_project/
tf/
lambda_functions.tf
iam.tf
apigateways.tf
sample_old_project/
tf/
lambda_functions.tf
iam.tf
apigateways.tf
policies.tf
ecs….
sample_old_project/
tf/
lambda_functions.tf
iam.tf
apigateways.tf
policies.tf
ecs….
Terraforming
api gateways
Terraforming
..when it gets bigger tho..
Terraforming
Terraforming
Terraforming
many api gateways
many lambdas
many iam roles..
many everything..
many api gateways
many lambdas
many iam roles..
many everything..
even they are not exactly related to each other
I had to keep all pieces in my
head at the same time
..experiment a bit..
my_new_project/
tf

/modules
/stg
/prd
my_new_project/
tf

/modules
/stg
/prd
my_new_project/
tf

/modules
/stg
/prd
..shared infrastructure..
between prd and stg
my_new_project/
tf

/modules
/stg
.tfversion
/prd
.tfversion
my_new_project/
tf

/modules
/stg
main.tf
.tfversion
/prd
main.tf
.tfversion
…just import modules..
module:
should be like a function
function/module:
purpose: does only one thing
module:
parameters
outputs
inside is invisible to importer
module:
abstracts complexity
module:
abstracts complexity
don’t need to know how
things are connected
module:
abstracts complexity
don’t need to know how
things are connected
don't need to see all
pieces
database_synchornizer:
main.tf
vars.tf
output.tf
readme.md
lambda.tf
iam.tf
…
module
connect infrastructure together
input parameters
output parameters
database_synchornizer:
main.tf
vars.tf
output.tf
lambda.tf
iam.tf
…
module
all related
database_synchornizer:
main.tf
vars.tf
output.tf
lambda.tf
iam.tf
…
module
all related
less pieces
database_synchornizer:
main.tf
vars.tf
output.tf
lambda.tf
iam.tf
…
module
database_synchornizer:
main.tf
vars.tf
output.tf
lambda.tf
iam.tf
…
module
api:
main.tf
vars.tf
output.tf
….
apigateways
…
database_synchornizer:
main.tf
vars.tf
output.tf
lambda.tf
iam.tf
…
module
api:
main.tf
vars.tf
output.tf
….
apigateways
…
ecs-cluster:
main.tf
vars.tf
output.tf
….
less to remember
less to remember
other modules connect via
output variables
we realise we could reuse modules
so we made our own GitHub repo
only for modules, similar to:
we realise we could share modules
github.com/terraform-community-modules
github.com/segmentio/stack
we realise we could reuse modules
so we made our own GitHub repo
only for modules, similar to:
..looking at other projects..
..looking at other projects..
..how to run terraform..
what terraform version is
this using?
what role should I assume to run terraform for
this project?
..Don’t forget to change
environment..
project A:
do this
but don’t do that
project B:
do this other thing
but don’t do that other one
..running terraform is
scary…
..take down service..
starting a new project?
starting a new project?
difficult to bootstrap
bootstrapping should:
bootstrapping should:
be fast
bootstrapping should:
take little effort
be fast
bootstrapping should:
take little effort
be fast
be easy for a new team member
bootstrapping should:
take little effort
be fast
be easy for a new team member
complexity should be hidden
what to do?
..a module..
.. a terraform automated pipeline
that takes 10 min to set up..
..a trigger..
Terraforming
Terraforming
Terraforming
codepipeline
codecommit
codebuild
Terraforming
how do we use it?
1. import module: terraform_pipeline
2. follow project structure
module “terraform_pipeline" {
source = “git::git@:…//terraform_pipeline?ref=vx.y”
notifications_channel = “slack channel”
terraform_role_arn = “some::arn::role”
env = "stg"
name = “my_project"
}
importing this module
module “terraform_pipeline" {
source = “git::git@:…//terraform_pipeline?ref=vx.y”
notifications_channel = “slack-channel”
terraform_role_arn = “some::arn::role”
env = "stg"
name = “my_project"
}
importing this module
module “terraform_pipeline" {
source = “git::git@:…//terraform_pipeline?ref=vx.y”
notifications_channel = “slack-channel”
terraform_role_arn = “some::arn::role”
env = "stg"
name = “my_project"
}
importing this module
module “terraform_pipeline" {
source = “git::git@:…//terraform_pipeline?ref=vx.y”
notifications_channel = “slack-channel”
terraform_role_arn = “some::arn::role”
env = "stg"
name = “my_project"
}
no need to remember this role anymore!
importing this module
module “terraform_pipeline" {
source = “git::git@:…//terraform_pipeline?ref=vx.y”
notifications_channel = “slack-channel”
terraform_role_arn = “some::arn::role”
env = "stg"
name = “my_project"
}
importing this module
module “terraform_pipeline" {
source = “git::git@:…//terraform_pipeline?ref=vx.y”
notifications_channel = “slack-channel”
terraform_role_arn = “some::arn::role”
env = "stg"
name = “my_project"
}
importing this module
.. details are hidden for importer ..
.. details are hidden for importer ..
importer does not need to worry about :
importer does not need to worry about :
how to send notifications to slack
.. details are hidden for importer ..
.. details are hidden for importer ..
importer does not need to worry about :
how to run terraform
how to send notifications to slack
.. details are hidden for importer ..
importer does not need to worry about :
how to run terraform
module knows that (inside)
how to send notifications to slack
.. details are hidden for importer ..
importer does not need to worry about :
how to run terraform
module knows that (inside)
how to send notifications to slack
a new team member can import it quickly
my_new_project/
tf

/modules
/stg
.tfversion
/prd
.tfversion
my_new_project/
tf

/modules
/stg
.tfversion
/prd
.tfversion
terraform ci module :
1. downloads terraform version specified in .tfversion
2. knows how to run a terraform binary
3. knows how to get git credentials to fetch to our private modules
4. knows how to send notifications to slack
my_new_project/
tf

/modules
/stg
.tfversion
/prd
.tfversion
want to run terraform for stg? go to stg folder
my_new_project/
tf

/modules
/stg
.tfversion
/prd
.tfversion
want to run terraform for stg? go to stg folder
want to run terraform for prd? go to prd folder
Terraforming
Terraforming
Terraforming
Terraforming
reduced the complexity of
bootstrapping a project
reduced the complexity of
bootstrapping a project
means a faster team
reduced the complexity of
bootstrapping a project
means a faster team
also I am less scared to run terraform
reduced the complexity of
bootstrapping a project
means a faster team
also I am less scared to run terraform
all projects use the same pipeline
whats the next step to hide
complexity?
whats the next step to hide
complexity?
github.com/serverless/serverless
serverless
serverless “applications”
serverless
serverless “applications”
code + glue + infrastructure
i.e: serverless service to get a slack bot via FaaS
serverless
serverless “applications”
> serverless install --url <service-github-url>
> sls deploy
code + glue + infrastructure
i.e: serverless service to get a slack bot via FaaS
please be aware a few things have
changed:
- Terraform community modules
- Serverless application repository (aws)
how are you running terraform?
how are you structuring your
terraform projects ?
how are you running terraform?
how are you structuring your
terraform projects ?
how are you running terraform?
my team is using terraform +
github.com/serverless/serverless
how are you structuring your
terraform projects ?
how are you running terraform?
my team is using terraform +
github.com/serverless/serverless
feel free to talk to me!
I would like to learn more
Thanks 🙇
dav009 dav009
Q & A
bit.ly/jd2018-sls

More Related Content

PDF
The LabRat - Physical backdoor hacks and IOT primer
n|u - The Open Security Community
 
PDF
Flaky tests and bugs in Apache software (e.g. Hadoop)
Akihiro Suda
 
PPTX
Tackling non-determinism in Hadoop - Testing and debugging distributed system...
Akihiro Suda
 
PDF
Lambda - Building On-prem GPU Training Infrastructure
Stephen Balaban
 
PDF
PyParis2018 - Python tooling for continuous deployment
Arthur Lutz
 
PPTX
Connect Devices to the Cloud using ZigBee
Revealing Hour Creations
 
PDF
zebra & openconfigd Introduction
Kentaro Ebisawa
 
PPTX
IAB3948 Wiring the internet of things with Node-RED
PeterNiblett
 
The LabRat - Physical backdoor hacks and IOT primer
n|u - The Open Security Community
 
Flaky tests and bugs in Apache software (e.g. Hadoop)
Akihiro Suda
 
Tackling non-determinism in Hadoop - Testing and debugging distributed system...
Akihiro Suda
 
Lambda - Building On-prem GPU Training Infrastructure
Stephen Balaban
 
PyParis2018 - Python tooling for continuous deployment
Arthur Lutz
 
Connect Devices to the Cloud using ZigBee
Revealing Hour Creations
 
zebra & openconfigd Introduction
Kentaro Ebisawa
 
IAB3948 Wiring the internet of things with Node-RED
PeterNiblett
 

Similar to Terraforming (20)

PDF
PuppetConf 2014 Killer R10K Workflow With Notes
Phil Zimmerman
 
PDF
My Hashitalk Indonesia April 2024 Presentation
Ridwan Fadjar
 
PDF
Terraform GitOps on Codefresh
Codefresh
 
PPTX
Go & multi platform GUI Trials and Errors
Yoshiki Shibukawa
 
PDF
Git ops & Continuous Infrastructure with terra*
Haggai Philip Zagury
 
PDF
Transformative Git Practices
Nicola Paolucci
 
PPTX
Terraform Abstractions for Safety and Power
Calvin French-Owen
 
PDF
Version Control in Machine Learning + AI (Stanford)
Anand Sampat
 
PDF
Large-scaled Deploy Over 100 Servers in 3 Minutes
Hiroshi SHIBATA
 
PDF
Build and Run Containers With Lazy Pulling - Adoption status of containerd St...
Kohei Tokunaga
 
PDF
Deep Dive into Futures and the Parallel Programming Library
Jim McKeeth
 
PDF
Containers for Science and High-Performance Computing
Dmitry Spodarets
 
PDF
Python in the land of serverless
David Przybilla
 
PPTX
Learn enough Docker to be dangerous
David Tan
 
PPTX
The Tale of a Docker-based Continuous Delivery Pipeline by Rafe Colton (ModCl...
Docker, Inc.
 
PDF
Proposalforootconf
Ranjith Rajaram
 
PPTX
Terraform training 🎒 - Basic
StephaneBoghossian1
 
PDF
Dockercon EU 2014
Rafe Colton
 
PPTX
carrow - Go bindings to Apache Arrow via C++-API
Yoni Davidson
 
PDF
From SQLAlchemy to Ming with TurboGears2
Alessandro Molina
 
PuppetConf 2014 Killer R10K Workflow With Notes
Phil Zimmerman
 
My Hashitalk Indonesia April 2024 Presentation
Ridwan Fadjar
 
Terraform GitOps on Codefresh
Codefresh
 
Go & multi platform GUI Trials and Errors
Yoshiki Shibukawa
 
Git ops & Continuous Infrastructure with terra*
Haggai Philip Zagury
 
Transformative Git Practices
Nicola Paolucci
 
Terraform Abstractions for Safety and Power
Calvin French-Owen
 
Version Control in Machine Learning + AI (Stanford)
Anand Sampat
 
Large-scaled Deploy Over 100 Servers in 3 Minutes
Hiroshi SHIBATA
 
Build and Run Containers With Lazy Pulling - Adoption status of containerd St...
Kohei Tokunaga
 
Deep Dive into Futures and the Parallel Programming Library
Jim McKeeth
 
Containers for Science and High-Performance Computing
Dmitry Spodarets
 
Python in the land of serverless
David Przybilla
 
Learn enough Docker to be dangerous
David Tan
 
The Tale of a Docker-based Continuous Delivery Pipeline by Rafe Colton (ModCl...
Docker, Inc.
 
Proposalforootconf
Ranjith Rajaram
 
Terraform training 🎒 - Basic
StephaneBoghossian1
 
Dockercon EU 2014
Rafe Colton
 
carrow - Go bindings to Apache Arrow via C++-API
Yoni Davidson
 
From SQLAlchemy to Ming with TurboGears2
Alessandro Molina
 
Ad

More from David Przybilla (6)

PDF
Reproducible datascience [with Terraform]
David Przybilla
 
PDF
Transition Based Dependency Parsing
David Przybilla
 
PDF
Apache Spark - Introduccion a RDDs
David Przybilla
 
PDF
Procesamiento de Lenguaje Natural
David Przybilla
 
PDF
Label propagation - Semisupervised Learning with Applications to NLP
David Przybilla
 
PDF
Automatic generation of domain models for call centers
David Przybilla
 
Reproducible datascience [with Terraform]
David Przybilla
 
Transition Based Dependency Parsing
David Przybilla
 
Apache Spark - Introduccion a RDDs
David Przybilla
 
Procesamiento de Lenguaje Natural
David Przybilla
 
Label propagation - Semisupervised Learning with Applications to NLP
David Przybilla
 
Automatic generation of domain models for call centers
David Przybilla
 
Ad

Recently uploaded (20)

PDF
Adobe Illustrator Crack Full Download (Latest Version 2025) Pre-Activated
imang66g
 
PDF
49785682629390197565_LRN3014_Migrating_the_Beast.pdf
Abilash868456
 
PDF
vAdobe Premiere Pro 2025 (v25.2.3.004) Crack Pre-Activated Latest
imang66g
 
PDF
Protecting the Digital World Cyber Securit
dnthakkar16
 
PPTX
GALILEO CRS SYSTEM | GALILEO TRAVEL SOFTWARE
philipnathen82
 
PDF
49784907924775488180_LRN2959_Data_Pump_23ai.pdf
Abilash868456
 
PDF
An Experience-Based Look at AI Lead Generation Pricing, Features & B2B Results
Thomas albart
 
PDF
Key Features to Look for in Arizona App Development Services
Net-Craft.com
 
PPTX
Presentation about variables and constant.pptx
kr2589474
 
PPTX
The-Dawn-of-AI-Reshaping-Our-World.pptxx
parthbhanushali307
 
PDF
MiniTool Power Data Recovery Crack New Pre Activated Version Latest 2025
imang66g
 
PPT
Why Reliable Server Maintenance Service in New York is Crucial for Your Business
Sam Vohra
 
PDF
Enhancing Healthcare RPM Platforms with Contextual AI Integration
Cadabra Studio
 
PDF
Bandai Playdia The Book - David Glotz
BluePanther6
 
PPTX
ASSIGNMENT_1[1][1][1][1][1] (1) variables.pptx
kr2589474
 
PDF
ChatPharo: an Open Architecture for Understanding How to Talk Live to LLMs
ESUG
 
PDF
Generating Union types w/ Static Analysis
K. Matthew Dupree
 
PDF
WatchTraderHub - Watch Dealer software with inventory management and multi-ch...
WatchDealer Pavel
 
PDF
advancepresentationskillshdhdhhdhdhdhhfhf
jasmenrojas249
 
PPTX
classification of computer and basic part of digital computer
ravisinghrajpurohit3
 
Adobe Illustrator Crack Full Download (Latest Version 2025) Pre-Activated
imang66g
 
49785682629390197565_LRN3014_Migrating_the_Beast.pdf
Abilash868456
 
vAdobe Premiere Pro 2025 (v25.2.3.004) Crack Pre-Activated Latest
imang66g
 
Protecting the Digital World Cyber Securit
dnthakkar16
 
GALILEO CRS SYSTEM | GALILEO TRAVEL SOFTWARE
philipnathen82
 
49784907924775488180_LRN2959_Data_Pump_23ai.pdf
Abilash868456
 
An Experience-Based Look at AI Lead Generation Pricing, Features & B2B Results
Thomas albart
 
Key Features to Look for in Arizona App Development Services
Net-Craft.com
 
Presentation about variables and constant.pptx
kr2589474
 
The-Dawn-of-AI-Reshaping-Our-World.pptxx
parthbhanushali307
 
MiniTool Power Data Recovery Crack New Pre Activated Version Latest 2025
imang66g
 
Why Reliable Server Maintenance Service in New York is Crucial for Your Business
Sam Vohra
 
Enhancing Healthcare RPM Platforms with Contextual AI Integration
Cadabra Studio
 
Bandai Playdia The Book - David Glotz
BluePanther6
 
ASSIGNMENT_1[1][1][1][1][1] (1) variables.pptx
kr2589474
 
ChatPharo: an Open Architecture for Understanding How to Talk Live to LLMs
ESUG
 
Generating Union types w/ Static Analysis
K. Matthew Dupree
 
WatchTraderHub - Watch Dealer software with inventory management and multi-ch...
WatchDealer Pavel
 
advancepresentationskillshdhdhhdhdhdhhfhf
jasmenrojas249
 
classification of computer and basic part of digital computer
ravisinghrajpurohit3
 

Terraforming