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
FastlyとTerraform Cloudで最高な自動化を実現しよう
Search
Kazuto Kusama
March 04, 2023
Technology
400
0
Share
FastlyとTerraform Cloudで最高な自動化を実現しよう
Fastly Yamagoya2022で登壇した資料です
Kazuto Kusama
March 04, 2023
More Decks by Kazuto Kusama
See All by Kazuto Kusama
プラットフォームエンジニアリングはAI時代の開発者をどう救うのか
jacopen
9
4.7k
OpenClawで回す組織運営
jacopen
3
870
SREの仕事を自動化する際にやっておきたい5つのポイント
jacopen
6
1.5k
AI時代のインシデント対応 〜時代を切り抜ける、組織アーキテクチャ〜
jacopen
4
350
AI時代の開発とPlatform Engineeringについて考える
jacopen
0
150
AI によってシステム障害が増える!? ~AI エージェント時代だからこそ必要な、インシデントとの向き合い方~
jacopen
4
380
インシデント対応に必要となるAIの利用パターンとPagerDutyの関係
jacopen
0
350
今日からはじめるプラットフォームエンジニアリング
jacopen
8
4.7k
Platform Engineeringで クラウドの「楽しくない」を解消しよう
jacopen
8
1.9k
Other Decks in Technology
See All in Technology
Hooks, Filters & Now Context: Why MCPs Are the “Hooks” of the AI Era
miriamschwab
0
120
スクラムを支える内部品質の話
iij_pr
0
320
AWS DevOps Agent or Kiro の使いどころを考える_20260402
masakiokuda
0
190
ZOZOTOWNリプレイスでのSkills導入までの流れとこれから
zozotech
PRO
4
3k
Oracle Cloud Infrastructure(OCI):Onboarding Session(はじめてのOCI/Oracle Supportご利⽤ガイド)
oracle4engineer
PRO
2
17k
「できない」のアウトプット 同人誌『精神を壊してからの』シリーズ出版を 通して得られたこと
comi190327
3
620
第26回FA設備技術勉強会 - Claude/Claude_codeでデータ分析 -
happysamurai294
0
390
Oracle AI Databaseデータベース・サービス: BaseDB/ExaDB-Dの可用性
oracle4engineer
PRO
1
150
サイボウズ 開発本部採用ピッチ / Cybozu Engineer Recruit
cybozuinsideout
PRO
10
77k
Webアクセシビリティは“もしも”に備える設計
tomokusaba
0
170
ふりかえりを 「あそび」にしたら、 学習が勝手に進んだ / Playful Retros Drive Learning
katoaz
0
390
サイバーフィジカル社会とは何か / What Is a Cyber-Physical Society?
ks91
PRO
0
150
Featured
See All Featured
How to Get Subject Matter Experts Bought In and Actively Contributing to SEO & PR Initiatives.
livdayseo
0
96
Six Lessons from altMBA
skipperchong
29
4.2k
Docker and Python
trallard
47
3.8k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
199
73k
New Earth Scene 8
popppiees
2
2k
The Organizational Zoo: Understanding Human Behavior Agility Through Metaphoric Constructive Conversations (based on the works of Arthur Shelley, Ph.D)
kimpetersen
PRO
0
300
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
27
3.4k
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
270
VelocityConf: Rendering Performance Case Studies
addyosmani
333
25k
Facilitating Awesome Meetings
lara
57
6.8k
End of SEO as We Know It (SMX Advanced Version)
ipullrank
3
4.1k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1.2k
Transcript
Copyright © 2021 HashiCorp FastlyとTerraform Cloudで 最高な自動化を実現しよう .
Copyright © 2021 HashiCorp 草間一人 Sr. Solutions Engineer @jacopen Kazuto
Kusama
None
None
会場のみなさんに聞きたい Fastlyといえば何?
会場のみなさんに聞きたい Fastlyといえば何? CDN VCL
会場のみなさんに聞きたい Fastlyといえば何? CDN VCL TLS WAF Compute
めっちゃ便利だけど 設定どうやって管理しよう?
自動化している 自動化していない
で自動化しませんか?
▪ インフラのプロビジョニングツール ▪ 構成をHCL(HashiCorp Configration Language)で コード化 ▪ Infrastructure as
Codeを実現
resource "aws_network_interface" "foo" { subnet_id = aws_subnet.my_subnet.id private_ips = ["172.16.10.100"]
tags = { Name = "primary_network_interface" } } resource "aws_instance" "foo" { ami = "ami-005e54dee72cc1d00" instance_type = "t2.micro" network_interface { network_interface_id = aws_network_interface.foo.id device_index = 0 } credit_specification { cpu_credits = "unlimited" } } Network Interface AMI Instance type Network interfaceと紐 付け
Fastly Terraform Provider
Fastly Terraform Provider Compute@Edge TLS WAF VCL
Customer 何故Terraformで自動化が重要なのか
Customer Backend
Customer Backend Deploy
Customer Backend Log, Metrics Deploy これらの環境をミス無く、効率よく管理
None
Terraform Providers Cloud Network SaaS Orchestrator On-Prem Monitoring
None
None
Terraformは便利、でも・・・ 規模が大きくなればなるほど 悩みも増える
Terraformは便利、でも・・・ バージョン管理 したい Gitにcommitしたら 自動でPlanしたい Stateファイルを 良い感じに管理したい
None
▪ HashiCorpが提供するSaaS ▪ Terraformの最適なワークフローを提供 – 各種VCSとの連携(GitHub, GitLab, Azure DevOps etc..)
– ステートの管理 – 変数の管理 ▪ 有償版のTerraform Cloud Businessもある – Policy as Code – Audit Log – SSO Integration
None
ステートファイルの保存 apply 生成 ステートファイル
ステートファイルの保存 apply 生成 ステートファイル
Gitリポジトリとの連携 push apply
Gitリポジトリとの連携 push apply
Gitリポジトリとの連携 push apply
複数人でTerraform運用 チームが何人になっても Terraformの運用を スケールできる
IaCでよくある悩み Fastly設定のコード化・自動化 詳しくないメンバーが 直接設定を変更してしまう 差分が生まれる
IaCでよくある悩み 差分が生まれる 管理されていない 設定が入っていることによ るセキュリティ問題 気づかずにTerraformを実 行して設定がまき戻る問 題
1. 検知 2. 通知 3. ステート修正 Drift Detection
こういう場合はどうする? https://example.com/ https://example.com/ui https://example.com/api https://example.com/auth On-prem S3 Amplify チームのスケールに 管理が追いつかない
Workspace & terraform_remote_state FastlyをIaCするリポジトリ アプリをIaCするリポジトリ
アプリのIaC リポジトリ & Workspace側 S3 Bucketを作成 & website_endpointをoutput Terraform Cloud上のStateを
terraform-fastly workspaceに共有
FastlyのIaC リポジトリ & Workspace側 Terraform Cloudの terraform-fastly-app workspaceの Stateを使うと宣言 State内の
output(website_endpoint)を backendのaddressに設定
こういう場合はどうする? https://example.com/ https://example.com/ui https://example.com/api https://example.com/auth On-prem S3 Amplify 自分たちのリソースは 自分たちで管理
リモートステートで 緩やかに連携
None
Thank You
[email protected]
www.hashicorp.com