Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Terraform workspaces
Search
Mattias Gees
January 17, 2018
Programming
0
100
Terraform workspaces
How can you use Terraform workspaces and how can you structure your Terraform projects better.
Mattias Gees
January 17, 2018
Tweet
Share
More Decks by Mattias Gees
See All by Mattias Gees
A Cloud Native Journey At Scale (Belgium Kubernetes Meetup)
mattiasgees
0
32
Tarmak, why do we need another Kubernetes provisioner?
mattiasgees
1
250
Pod autoscaling with custom-metrics
mattiasgees
0
72
Lightning Talk Prometheus
mattiasgees
0
62
Introduction to Ansible
mattiasgees
0
110
Other Decks in Programming
See All in Programming
PHPで作るWebSocketサーバー ~リアクティブなアプリケーションを知るために~ / WebSocket Server in PHP - To know reactive applications
seike460
PRO
2
720
Recoilを剥がしている話
kirik
5
8.1k
「とりあえず動く」コードはよい、「読みやすい」コードはもっとよい / Code that 'just works' is good, but code that is 'readable' is even better.
mkmk884
6
1.3k
競技プログラミングへのお誘い@阪大BOOSTセミナー
kotamanegi
0
390
StarlingMonkeyを触ってみた話 - 2024冬
syumai
3
320
各クラウドサービスにおける.NETの対応と見解
ymd65536
0
230
PHPUnitしか使ってこなかった 一般PHPerがPestに乗り換えた実録
mashirou1234
0
380
ISUCON14感想戦で85万点まで頑張ってみた
ponyo877
0
110
オニオンアーキテクチャを使って、 Unityと.NETでコードを共有する
soi013
0
340
アクターシステムに頼らずEvent Sourcingする方法について
j5ik2o
6
650
Androidアプリの One Experience リリース
nein37
0
430
20241217 競争力強化とビジネス価値創出への挑戦:モノタロウのシステムモダナイズ、開発組織の進化と今後の展望
monotaro
PRO
0
200
Featured
See All Featured
Learning to Love Humans: Emotional Interface Design
aarron
274
40k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
10
850
Dealing with People You Can't Stand - Big Design 2015
cassininazir
365
25k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
7
540
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
111
50k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
232
17k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
44
6.9k
Become a Pro
speakerdeck
PRO
26
5.1k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
1
150
Why Our Code Smells
bkeepers
PRO
335
57k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
18
2.3k
Bootstrapping a Software Product
garrettdimon
PRO
305
110k
Transcript
Terraform workspaces Mattias Gees
Mattias Gees • Cloud Engineer @skyscrapers • Avid runner •
Likes to experiment github.com/mattiasgees twitter.com/mattiasgees blog.mattiasgees.be
Who has used Terraform?
Some history!
Flat file
Modules
Remote config v1 terraform remote config \ -backend=s3 \ -backend-config="bucket=s3-bucket"
\ -backend-config="key=project" \ -backend-config="region=us-east-1"
Remote config v2 terraform { required_version = ">= 0.11.2" backend
"s3" { bucket = "s3-bucket" key = "project" region = "us-east-1" dynamodb_table = "terraform-state-lock-example-default" encrypt = true } }
Remote config v2 • local • artifactory • azurerm •
consul • etcd • gcs
Remote config v2 • http • manta • s3 •
swift • terraform enterprise
Workspaces
What are they? • First called terraform env • Introduced
in 0.9.0, renamed in 0.10.0 • One codebase, multiple deployments • Works with certain backends
How to use it?
Variables Tfvars vs Maps
Multiple projects • Datasource for remote state • Split up
logically
Terragrunt • Var file per workspace • Specific Terraform CLI
flags • Execute on multiple projects at once • ...
CI/CD Plan before deploy
Partial configuration
CI/CD Tools • Testing • Kitchen-Terraform • AWSpec • Deployment
• Atlantis from Hootsuite • HashiCorp Terraform Enterprise • Your own CI/CD tool
Future
Questions?
None