Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
re:Invent 2024の HashiCorp関連(主にTerraform)の アップデー...
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
msato
January 15, 2025
510
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
130
Kiro Powers入門
msato
0
1.1k
生成AIを活用したTerraformワークフロー(HCP Terraform × Claude Code)
msato
0
800
筋肉の大会_NABBA_に出てみた.pptx.pdf
msato
0
360
筋肉の大会(NABBA)に出てみた
msato
0
720
生成AIを活用したTerraformワークフロー
msato
0
1.1k
Terraform Stacks入門 #HashiTalks
msato
6
2.1k
Terraformテスト入門
msato
5
6.1k
AFTを運用していたらAWS Configの課金が急増していた件
msato
0
1k
Featured
See All Featured
Design of three-dimensional binary manipulators for pick-and-place task avoiding obstacles (IECON2024)
konakalab
0
610
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
28
3.7k
The agentic SEO stack - context over prompts
schlessera
0
960
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
Sam Torres - BigQuery for SEOs
techseoconnect
PRO
0
560
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
490
Ruling the World: When Life Gets Gamed
codingconduct
0
380
AI in Enterprises - Java and Open Source to the Rescue
ivargrimstad
0
1.5k
Have SEOs Ruined the Internet? - User Awareness of SEO in 2025
akashhashmi
0
510
How to Build an AI Search Optimization Roadmap - Criteria and Steps to Take #SEOIRL
aleyda
1
2.2k
svc-hook: hooking system calls on ARM64 by binary rewriting
retrage
2
610
Design in an AI World
tapps
1
350
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