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
39
Tarmak, why do we need another Kubernetes provisioner?
mattiasgees
1
270
Pod autoscaling with custom-metrics
mattiasgees
0
76
Lightning Talk Prometheus
mattiasgees
0
67
Introduction to Ansible
mattiasgees
0
110
Other Decks in Programming
See All in Programming
ロボットのための工場に灯りは要らない
watany
10
2.7k
Railsの気持ちを考えながらコントローラとビューを整頓する/tidying-rails-controllers-and-views-as-rails-think
moro
5
390
守る「だけ」の優しいEMを抜けて、 事業とチームを両方見る視点を身につけた話
maroon8021
3
770
TipKitTips
ktcryomm
0
160
Claude Code の Skill で複雑な既存仕様をすっきり整理しよう
yuichirokato
1
370
エンジニアの「手元の自動化」を加速するn8n 2026.02.27
symy2co
0
140
S3ストレージクラスの「見える」「ある」「使える」は全部違う ─ 体験から見た、仕様の深淵を覗く
ya_ma23
0
370
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
220
AIとペアプロして処理時間を97%削減した話 #pyconshizu
kashewnuts
1
220
Takumiから考えるSecurity_Maturity_Model.pdf
gessy0129
1
140
RAGでハマりがちな"Excelの罠"を、データの構造化で突破する
harumiweb
9
2.8k
grapheme_strrev関数が採択されました(あと雑感)
youkidearitai
PRO
1
210
Featured
See All Featured
Writing Fast Ruby
sferik
630
63k
Chasing Engaging Ingredients in Design
codingconduct
0
140
Evolving SEO for Evolving Search Engines
ryanjones
0
150
Max Prin - Stacking Signals: How International SEO Comes Together (And Falls Apart)
techseoconnect
PRO
0
110
Tips & Tricks on How to Get Your First Job In Tech
honzajavorek
0
450
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
49
9.9k
Collaborative Software Design: How to facilitate domain modelling decisions
baasie
0
160
エンジニアに許された特別な時間の終わり
watany
106
240k
Typedesign – Prime Four
hannesfritz
42
3k
Everyday Curiosity
cassininazir
0
160
First, design no harm
axbom
PRO
2
1.1k
Build The Right Thing And Hit Your Dates
maggiecrowley
39
3.1k
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