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
Cloudflare初心者がIaCから基本構成を学んでみた
Search
Yuki_Kurono
March 28, 2023
Technology
660
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Cloudflare初心者がIaCから基本構成を学んでみた
「Cloudflare Meetup Nagoya Kick Off!」の資料です。
Yuki_Kurono
March 28, 2023
More Decks by Yuki_Kurono
See All by Yuki_Kurono
Terraform(IaC)と実環境の乖離どうしていますか?
yuki_kurono
0
49
今年のre:inventから学ぶこと
yuki_kurono
0
110
re_invent 2023事前勉強会
yuki_kurono
0
100
CloudFormationの運用が 辛くならない方法を本気で考えてみた
yuki_kurono
0
380
CloudFormationで登場したForEachをちゃんと理解してみる
yuki_kurono
0
910
Turnstileのウィジェット モードとは何者か
yuki_kurono
0
730
CodeGuru Security ってなんだ?
yuki_kurono
0
1.2k
えるしってるか CloudFrontはWAFがあっても カスタムエラーレスポンスを返せる
yuki_kurono
0
450
Terraformのnull_resource ってなに?aws cli が実行できるらしい
yuki_kurono
1
1.6k
Other Decks in Technology
See All in Technology
Mastering Agentic Development: Harness Engineering for Effective Coding Agents
konippi
3
560
LLMに渡さなかった仕事
nanaism
0
11k
EventBridge に「合流」はない ― サーバーレスのワークフローを育てるということ / No Join in EventBridge
yusukeshimizu
2
550
AWS FinOps Agent 結局何が得意なの?
siromi
0
170
AI coding 整合正規方法
philipz
0
550
「大丈夫そう?」をObservabilityで確かめる
mrmtsu
0
160
[Kiro Meetup #7] Kiro Crew Dive Deep
konippi
0
340
2026-09-08 そのJavaモダナイゼーション、AIに丸投げで大丈夫?IBM Bobで変わる品質と効率
yutanonaka
1
190
事業課題から技術的負債に向き合う
sansantech
PRO
2
2.4k
Von-Neumann Machines, Dreams & The Futures of IT
ufried
0
130
バイブコーディング時代のWebアプリ開発入門~Cloud Runで学ぶセキュアなビルドとデプロイ
waiwai2111
1
150
Amazon Bedrock Agents ClassicからAmazon Bedrock AgentCoreへ移行した際、ガードレール設定が2箇所に割れた話
matsunobu
0
100
Featured
See All Featured
How to train your dragon (web standard)
notwaldorf
97
6.8k
Crafting Experiences
bethany
1
350
Digital Projects Gone Horribly Wrong (And the UX Pros Who Still Save the Day) - Dean Schuster
uxyall
1
3.1k
Collaborative Software Design: How to facilitate domain modelling decisions
baasie
1
330
Why Your Marketing Sucks and What You Can Do About It - Sophie Logan
marketingsoph
0
410
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
16k
Building an army of robots
kneath
307
46k
The Mindset for Success: Future Career Progression
greggifford
PRO
0
510
Chasing Engaging Ingredients in Design
codingconduct
0
340
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
[Rails World 2026] Durable orchestration on Rails: from continuation to workflow
palkan
1
320
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1.6k
Transcript
Cloudflare初心者がIaCから基本構成を 学んでみた 黒野 雄稀 | 2023/3/28 1 Cloudflare Meetup Nagoya
Kick Off!
自己紹介 黒野 雄稀 Yuki Kurono kurono_98 kurono アイレット株式会社 所属 普段はインフラ設計・構築や運用構築に従事
2022 APN ALL AWS Certifications Engineers 名古屋に住んでいるらしい Cloudflareは初心者 2
3 Cloudflareは詳しくないけど、 IaCならいける! 今のぼくの状態
4 CloudflareってIacできるの!?
5 CloudflareってIacできるの!? →できます。 https://developers.cloudflare.com/terraform/
6 だいたいのイメージ コード記述 デプロイ
7 作成する構成 S3(コンテンツ)
8 書き方 part1 terraform { cloudflare = { source =
"cloudflare/cloudflare" version = "3.11.0" } } provider "cloudflare" { email = "
[email protected]
" api_key = "xxxxxxxxxxxxxxxxxxxxxxxxxxx" } resource "cloudflare_zone" "hogehoge" { zone = "hogehoge.com" } 最小限これくらいのコードでWebサイトの追加ができる。 DNSの設定とかは別です。
9 書き方 part2 .name_serversを指定で登録するDNS名が配列取得できる。 resource "cloudflare_zone" "example" { zone =
"hogehoge.com" } resource "aws_route53domains_registered_domain" "example" { domain_name = "hogehoge.com" name_server { name = cloudflare_zone.example.name_servers[0] } name_server { name = cloudflare_zone.example.name_servers[1] } }
10 書き方 part2 curlでちゃんとレスポンスが返ってくるか確認 $curl http://hogehoge.com <html> <head> <meta charset="utf-8">
<title>タイトル</title> </head> <body> <h1>Cloudflare最高!</h1> </body> </html> ヨシ!
11 なにが嬉しいのか • バックエンドのAWSなどのリソースと併せて管理できる • 複数作成する場合には再利用性があって良い ◦ なかなか、無い気がするけど • IaCで得られる恩恵はそのまま受け取れるはず
12 使ってみた感想 • 個人的にTerraformで管理することが多いのでありがた い • コンソールで入門するよりも理解はしやすい印象 ◦ コンソールだとある程度ラップされてるので •
使ってる人がすごく多いわけではないので、ドキュメ ント系が若干少なめ ◦ リソースへの対応自体はかなりできてそう resource "cloudflare_zone" "hogehoge" { # account_id = "xxxxxxxxxxxxxxxx" # 不要 zone = "hogehoge.com" } ドキュメントには必要って書いてあったのに要らないらしい →
13