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
37
Tarmak, why do we need another Kubernetes provisioner?
mattiasgees
1
270
Pod autoscaling with custom-metrics
mattiasgees
0
74
Lightning Talk Prometheus
mattiasgees
0
65
Introduction to Ansible
mattiasgees
0
110
Other Decks in Programming
See All in Programming
Raku Raku Notion 20260128
hareyakayuruyaka
0
280
AWS re:Invent 2025参加 直前 Seattle-Tacoma Airport(SEA)におけるハードウェア紛失インシデントLT
tetutetu214
2
110
Fragmented Architectures
denyspoltorak
0
160
AIによる開発の民主化を支える コンテキスト管理のこれまでとこれから
mulyu
3
300
Implementation Patterns
denyspoltorak
0
290
Automatic Grammar Agreementと Markdown Extended Attributes について
kishikawakatsumi
0
190
登壇資料を作る時に意識していること #登壇資料_findy
konifar
4
1.2k
Unicodeどうしてる? PHPから見たUnicode対応と他言語での対応についてのお伺い
youkidearitai
PRO
1
2.5k
カスタマーサクセス業務を変革したヘルススコアの実現と学び
_hummer0724
0
700
izumin5210のプロポーザルのネタ探し #tskaigi_msup
izumin5210
1
130
責任感のあるCloudWatchアラームを設計しよう
akihisaikeda
3
180
Patterns of Patterns
denyspoltorak
0
1.4k
Featured
See All Featured
The Illustrated Children's Guide to Kubernetes
chrisshort
51
51k
<Decoding/> the Language of Devs - We Love SEO 2024
nikkihalliwell
1
130
Optimizing for Happiness
mojombo
379
71k
Six Lessons from altMBA
skipperchong
29
4.1k
The Impact of AI in SEO - AI Overviews June 2024 Edition
aleyda
5
730
Speed Design
sergeychernyshev
33
1.5k
Art, The Web, and Tiny UX
lynnandtonic
304
21k
Game over? The fight for quality and originality in the time of robots
wayneb77
1
120
Building a Scalable Design System with Sketch
lauravandoore
463
34k
The SEO Collaboration Effect
kristinabergwall1
0
350
BBQ
matthewcrist
89
10k
The Organizational Zoo: Understanding Human Behavior Agility Through Metaphoric Constructive Conversations (based on the works of Arthur Shelley, Ph.D)
kimpetersen
PRO
0
240
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