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
re:Invent 2024の HashiCorp関連(主にTerraform)の アップデー...
Search
msato
January 15, 2025
430
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
re:Invent 2024の HashiCorp関連(主にTerraform)の アップデート&セッション共有
msato
January 15, 2025
More Decks by msato
See All by msato
トリキはいいぞ
msato
0
100
Kiro Powers入門
msato
0
710
生成AIを活用したTerraformワークフロー(HCP Terraform × Claude Code)
msato
0
610
筋肉の大会_NABBA_に出てみた.pptx.pdf
msato
0
250
筋肉の大会(NABBA)に出てみた
msato
0
700
生成AIを活用したTerraformワークフロー
msato
0
930
Terraform Stacks入門 #HashiTalks
msato
6
2k
Terraformテスト入門
msato
5
5.6k
AFTを運用していたらAWS Configの課金が急増していた件
msato
0
970
Featured
See All Featured
The State of eCommerce SEO: How to Win in Today's Products SERPs - #SEOweek
aleyda
2
11k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
360
30k
The Impact of AI in SEO - AI Overviews June 2024 Edition
aleyda
5
1.1k
コードの90%をAIが書く世界で何が待っているのか / What awaits us in a world where 90% of the code is written by AI
rkaga
62
44k
From Legacy to Launchpad: Building Startup-Ready Communities
dugsong
0
230
Unsuck your backbone
ammeep
672
58k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
35
2.5k
WCS-LA-2024
lcolladotor
0
630
How People are Using Generative and Agentic AI to Supercharge Their Products, Projects, Services and Value Streams Today
helenjbeal
1
210
The Cult of Friendly URLs
andyhume
79
6.9k
Pawsitive SEO: Lessons from My Dog (and Many Mistakes) on Thriving as a Consultant in the Age of AI
davidcarrasco
0
160
Collaborative Software Design: How to facilitate domain modelling decisions
baasie
1
250
Transcript
2025/1/15 佐藤雅樹 re:Invent 2024の HashiCorp関連(主にTerraform)の アップデート&セッション共有
⾃⼰紹介 resource “my_profile” “this” { name = “佐藤雅樹” x =
“@chari7311” company = “クラスメソッド株式会社” department = “ソリューションアーキテクト” }
• Terraformとは • アップデート紹介 • セッション紹介 アジェンダ
Terraformとは
• インフラのコードによる管理とプロビジョニング⾃動化を実現するツール • IaCツールのデファクトスタンダード • 様々な環境に対応 → 各環境に対応した「プロバイダー」を使⽤する (AWS, Azure,
Google Cloud, Kubernetes, GitLab, Datadog, etc.) Terraformとは
Terraformの提供形態 セルフマネージド マネージド Community
組織でTerraformを運⽤するためのプラットフォーム • バージョン管理システムとの統合 • Statefileの管理 • Private Registry • Policy
As Code • ドリフト検出 • etc… HCP Terraform‧Terraform Enterpriseとは
組織でTerraformを運⽤するためのプラットフォーム • バージョン管理システムとの統合 • Statefileの管理 • Policy As Code •
ドリフト検出 • Private Registry • etc… HCP Terraform‧Terraform Enterpriseとは
アップデート
10 Pre-written Sentinel policies for AWSを発表(パブリックベータ) • AWS向けの事前定義された Sentinelポリシーがリリース •
CISに準拠しており、CIS AWS Foundation Benchmarks v1.2、 v1.4、v3.0の対応に役⽴つ • 対応リソース - EC2 - S3 - IAM - RDS - KMS - etc..
セキュリティインシデントの予防のために、AWSリソースをセキュアな設定にす る必要がある • セキュアではない設定は、AWS Security Hubのセキュリティ基準で検知可能 • しかし、設定変更にはダウンタイムを伴う場合も 検知は簡単だが、対応するのは⼤変 AWSリソースをセキュアに
組織のポリシーに違反する リソース作成を禁⽌したい
• HashiCorpが開発したポリシー実⾏フレームワーク • terraformのPlan結果に対してポリシーチェックを⾏う • ポリシーの例) - RDSのストレージが暗号化されているか - 「ManagedBy
= terraform」タグが付いているか - Applyが⾦曜⽇に⾏われていないか • HCP Terraform/EnterpriseにはSentinelポリシーチェックを⾏う機能が組み 込まれている Sentinelとは
14 Sentinel https://developer.hashicorp.com/terraform/tutorials/policy/sentinel-policy Nameタグの強制 インスタンスタイプの制限
⼀からすべてのポリシーを 書くのは⼤変
16 Pre-written Sentinel policies for AWS を使うことで、デプロイ前にチェック が可能 -> Terraformでデプロイ
= Security Hub(CIS) セキュリティ基準 に準拠 Pre-written Sentinel policies for AWSで解決
⼀般的な静的解析と⽐べてSentinel - Plan結果に対してチェックを⾏うため、踏み込んだチェックが可能 - ポリシーを書くのが⼤変 -> Pre-writtenを使うことで⾃前実装を減らせる‧コードの内容も公開されている ため参考にできる Terraform静的解析ツールとSentinel
セッション
• [AIM102-S]Infrastructure at the speed of AI • [DOP101-S]Build for
massive scale and security with the HashiCorp Cloud Platform • [SEC204-S]How to get dynamic with secrets management • [DOP206-S]Building multi-account multi-region applications with Terraform stacks HashiCorp関連セッション
20 個⼈的おすすめセッション • HCP Terraformの新機能Terraform Stacksの紹介セッション • Terraform Stacksの基本概念から 動作をデモを交えて学ぶことがで
きる Building multi-account multi-region applications with Terraform stacks
Terraform Stacksとは • 機能: 複数環境が必要なインフラ環境の管理を効率化‧簡素化 • フェーズ: パブリックベータ - HashiConf
2023で発表(プライベートプレビュー) - HashiConf 2024でパブリックベータ版を発表 • 注意事項 - HCP Terraformで利⽤可能(コミュニティ版への組み込みも予定あり) - 500 Resourceまでの制限あり(Standard‧Plusプランでも同様) ※本スライドの情報は、2025/1時点の情報になります。
22 適切な分割がされていないStatefileの課題 • リソース変更の影響範囲⼤きい • Terraform実⾏時間が⻑い • 管理責任の分離ができない
23 Statefileを分割 以下の単位で分割 • 環境 • リソース種別(Network,Compute等)
24 Statefile毎にWorkspaceを作成 [補⾜] Workspace: Terraformリソースを管理 する単位。実⾏やStatefileを管理。 HCP Terraformで実現(Workspace)
Workspace(Statefile)増加による課題
26 Terraform Stacksで解決 Terraform Stacksを使うことで以下を 効率化‧簡素化 • 複数Workspaceの管理 • プロビジョニング
• 依存関係の管理
27 [再掲]個⼈的おすすめセッション • HCP Terraformの新機能Terraform Stacksの紹介セッション • Terraform Stacksの基本概念から 動作をデモを交えて学ぶことがで
きる Building multi-account multi-region applications with Terraform stacks
• Terraformには3つの提供形態があり、組織利⽤はHCP Terraformを推奨 • 「Pre-written Sentinel policies for AWS」でAWS環境をセキュアに構築 •
Terraform Stacksでマルチリージョン‧マルチアカウント環境のデプロ イを簡素化 まとめ
• Pre-written Sentinel policy Set for AWS - Simplify policy
adoption in Terraform with pre-written Sentinel policies for AWS | HashiCorp Blog - Scale Your AWS Environment Securely with HashiCorp Terraform and Sentinel Policy as Code - TerraformレジストリでPre-written Sentinel policy Set for AWSが公開されました | Developres IO • Terraform Stacks - Terraform Stacks, explained | HashiCorp Blog - [レポート]Building multi-account, multi-region apps with Terraform Stacks (DOP206) # AWSreInvent | DevelopersIO - 「Terraform Stacks⼊⾨」というタイトルでHashiTalks:Japan 2024に登壇しました #HashiTalks #HashiTalks Japan 2024 | Developers IO 関連リンク
None