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
既存AWSリソースをTerraformで管理するのはつらいよ
Search
YouYou
August 25, 2022
Programming
1
520
既存AWSリソースをTerraformで管理するのはつらいよ
YouYou
August 25, 2022
Tweet
Share
More Decks by YouYou
See All by YouYou
AWSマネコンに複数のアカウントで入れるようになりました
yuhta28
2
270
今インフラ技術をイチから学び直すなら
yuhta28
1
280
AWSに詳しくない人でも始められるコスト最適化ガイド
yuhta28
3
660
Datadog外形監視基盤をEC2から ECSへ移行してみた
yuhta28
0
1.7k
アウトプット頑張ったら企業からLT登壇の依頼がきた話
yuhta28
1
1.8k
小さなことから始めるAWSコスト最適入門
yuhta28
1
1.4k
Datadogのコストも監視しよう
yuhta28
1
1k
Rcloneを使った定期的なストレージ同期
yuhta28
0
810
Pulumiを触ってみよう
yuhta28
1
2.7k
Other Decks in Programming
See All in Programming
20260315 AWSなんもわからん🥲
chiilog
2
170
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
1k
Vuetify 3 → 4 何が変わった?差分と移行ポイント10分まとめ
koukimiura
0
190
ネイティブアプリとWebフロントエンドのAPI通信ラッパーにおける共通化の勘所
suguruooki
0
180
DevinとClaude Code、SREの現場で使い倒してみた件
karia
1
1.1k
ファインチューニングせずメインコンペを解く方法
pokutuna
0
180
Migration to Signals, Signal Forms, Resource API, and NgRx Signal Store @Angular Days 03/2026 Munich
manfredsteyer
PRO
0
150
モダンOBSプラグイン開発
umireon
0
180
どんと来い、データベース信頼性エンジニアリング / Introduction to DBRE
nnaka2992
1
330
LM Linkで(非力な!)ノートPCでローカルLLM
seosoft
0
220
The free-lunch guide to idea circularity
hollycummins
0
350
今年もTECHSCOREブログを書き続けます!
hiraoku101
0
120
Featured
See All Featured
SEO in 2025: How to Prepare for the Future of Search
ipullrank
3
3.4k
Jess Joyce - The Pitfalls of Following Frameworks
techseoconnect
PRO
1
120
svc-hook: hooking system calls on ARM64 by binary rewriting
retrage
2
180
Done Done
chrislema
186
16k
How to make the Groovebox
asonas
2
2k
The Illustrated Guide to Node.js - THAT Conference 2024
reverentgeek
1
320
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.7k
The World Runs on Bad Software
bkeepers
PRO
72
12k
Mozcon NYC 2025: Stop Losing SEO Traffic
samtorres
0
190
Faster Mobile Websites
deanohume
310
31k
Digital Ethics as a Driver of Design Innovation
axbom
PRO
1
240
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
54k
Transcript
既存AWSリソースをTerraformで管 理するのはつらいよ 1
Name:ユータ Occupation:SRE Twitter:@Y0u281 (オーでなくゼロです) ブログ:https://zenn.dev/yuta28 自己紹介 Twitter 2
目次 • 背景 • つらいよ ◦ インポート ◦ アカウント移行 •
まとめ 3
背景 • コンソールから作成したAWSリソースをIaC管理したい • terraform importで作成済みリソースをIaC管理できそう • 管理下に置いたら別のAWSアカウントにリソースを移管したい 4
つらいよ(インポート) 5 インポート後のtfファイルと実リソースとのパラメーター差分修正
つらいよ(インポート) 6
つらいよ(インポート) 7 resource "aws_security_group" "example" { name = "terraform-sg" #書かなくてもインポートはできる }
つらいよ(インポート) 8
つらいよ(インポート) 9 アウトバウンドルールの記述がないため削除してしま う。
つらいよ(アカウント移行) 10 Plan時に見落とすパラメーター差分
つらいよ(アカウント移行) 11
つらいよ(アカウント移行) 12
つらいよ(アカウント移行) 13 resource "aws_vpc" "example" { tags = { "Name"
= "Terraform" } }
つらいよ(アカウント移行) 14 resource "aws_vpc" "example" { cidr_block = "10.0.0.0/24" tags
= { "Name" = "Terraform" } }
まとめ 15
まとめ 16 既存リソースをIaC 管理はアカン
ありがとうございました 17 https://cuebic.hatenablog.com/