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
34
Tarmak, why do we need another Kubernetes provisioner?
mattiasgees
1
260
Pod autoscaling with custom-metrics
mattiasgees
0
74
Lightning Talk Prometheus
mattiasgees
0
63
Introduction to Ansible
mattiasgees
0
110
Other Decks in Programming
See All in Programming
モバイルアプリからWebへの横展開を加速した話_Claude_Code_実践術.pdf
kazuyasakamoto
0
310
Improving my own Ruby thereafter
sisshiki1969
1
160
Tool Catalog Agent for Bedrock AgentCore Gateway
licux
6
2.2k
Design Foundational Data Engineering Observability
sucitw
3
190
Swift Updates - Learn Languages 2025
koher
2
460
MCPとデザインシステムに立脚したデザインと実装の融合
yukukotani
4
1.4k
Protocol Buffersの型を超えて拡張性を得る / Beyond Protocol Buffers Types Achieving Extensibility
linyows
0
110
rage against annotate_predecessor
junk0612
0
160
Zendeskのチケットを Amazon Bedrockで 解析した
ryokosuge
3
290
パッケージ設計の黒魔術/Kyoto.go#63
lufia
3
430
How Android Uses Data Structures Behind The Scenes
l2hyunwoo
0
270
Updates on MLS on Ruby (and maybe more)
sylph01
1
180
Featured
See All Featured
Fireside Chat
paigeccino
39
3.6k
Building Applications with DynamoDB
mza
96
6.6k
Bash Introduction
62gerente
615
210k
A designer walks into a library…
pauljervisheath
207
24k
Site-Speed That Sticks
csswizardry
10
810
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
285
13k
Designing Experiences People Love
moore
142
24k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
22k
The World Runs on Bad Software
bkeepers
PRO
70
11k
StorybookのUI Testing Handbookを読んだ
zakiyama
31
6.1k
Building a Modern Day E-commerce SEO Strategy
aleyda
43
7.6k
Art, The Web, and Tiny UX
lynnandtonic
302
21k
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