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
36
Tarmak, why do we need another Kubernetes provisioner?
mattiasgees
1
260
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
Django Ninja による API 開発効率化とリプレースの実践
kashewnuts
0
1.3k
CSC305 Lecture 06
javiergs
PRO
0
220
アメ車でサンノゼを走ってきたよ!
s_shimotori
0
220
Serena MCPのすすめ
wadakatu
4
980
CI_CD「健康診断」のススメ。現場でのボトルネック特定から、健康診断を通じた組織的な改善手法
teamlab
PRO
0
210
その面倒な作業、「Dart」にやらせませんか? Flutter開発者のための業務効率化
yordgenome03
1
120
Devvox Belgium - Agentic AI Patterns
kdubois
1
120
Go言語はstack overflowの夢を見るか?
logica0419
0
150
階層構造を表現するデータ構造とリファクタリング 〜1年で10倍成長したプロダクトの変化と課題〜
yuhisatoxxx
3
1k
Pull-Requestの内容を1クリックで動作確認可能にするワークフロー
natmark
2
490
NixOS + Kubernetesで構築する自宅サーバーのすべて
ichi_h3
0
640
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
300
Featured
See All Featured
For a Future-Friendly Web
brad_frost
180
9.9k
Product Roadmaps are Hard
iamctodd
PRO
54
11k
Docker and Python
trallard
46
3.6k
How GitHub (no longer) Works
holman
315
140k
Site-Speed That Sticks
csswizardry
11
900
Navigating Team Friction
lara
190
15k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.5k
Leading Effective Engineering Teams in the AI Era
addyosmani
1
26
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
37
2.6k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.5k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
189
55k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
127
53k
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