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
260
Pod autoscaling with custom-metrics
mattiasgees
0
73
Lightning Talk Prometheus
mattiasgees
0
62
Introduction to Ansible
mattiasgees
0
110
Other Decks in Programming
See All in Programming
AIエージェントはこう育てる - GitHub Copilot Agentとチームの共進化サイクル
koboriakira
0
380
童醫院敏捷轉型的實踐經驗
cclai999
0
190
「Cursor/Devin全社導入の理想と現実」のその後
saitoryc
0
150
関数型まつりレポート for JuliaTokai #22
antimon2
0
150
Bytecode Manipulation 으로 생산성 높이기
bigstark
2
380
datadog dash 2025 LLM observability for reliability and stability
ivry_presentationmaterials
0
110
NPOでのDevinの活用
codeforeveryone
0
230
明示と暗黙 ー PHPとGoの インターフェイスの違いを知る
shimabox
2
320
AWS CDKの推しポイント 〜CloudFormationと比較してみた〜
akihisaikeda
3
310
PostgreSQLのRow Level SecurityをPHPのORMで扱う Eloquent vs Doctrine #phpcon #track2
77web
2
340
都市をデータで見るってこういうこと PLATEAU属性情報入門
nokonoko1203
1
570
CursorはMCPを使った方が良いぞ
taigakono
1
170
Featured
See All Featured
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
34
3k
Adopting Sorbet at Scale
ufuk
77
9.4k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
3.9k
The Illustrated Children's Guide to Kubernetes
chrisshort
48
50k
How to train your dragon (web standard)
notwaldorf
93
6.1k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
35
2.3k
KATA
mclloyd
29
14k
The Language of Interfaces
destraynor
158
25k
Producing Creativity
orderedlist
PRO
346
40k
Writing Fast Ruby
sferik
628
61k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
16k
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