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
Cloudflare初心者がIaCから基本構成を学んでみた
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Yuki_Kurono
March 28, 2023
Technology
610
1
Share
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
12
今年のre:inventから学ぶこと
yuki_kurono
0
95
re_invent 2023事前勉強会
yuki_kurono
0
92
CloudFormationの運用が 辛くならない方法を本気で考えてみた
yuki_kurono
0
310
CloudFormationで登場したForEachをちゃんと理解してみる
yuki_kurono
0
830
Turnstileのウィジェット モードとは何者か
yuki_kurono
0
670
CodeGuru Security ってなんだ?
yuki_kurono
0
1.2k
えるしってるか CloudFrontはWAFがあっても カスタムエラーレスポンスを返せる
yuki_kurono
0
430
Terraformのnull_resource ってなに?aws cli が実行できるらしい
yuki_kurono
1
1.5k
Other Decks in Technology
See All in Technology
PicoRuby as a Multi-VM Operating System
kishima
1
220
Do Vibe Coding ao LLM em Produção para Busca Agêntica - TDC 2026 - Summit IA - São Paulo
jpbonson
3
160
Google Cloud Next '26 の裏でこっそりリリースされたCloud Number Registry & Cloud Hub コスト分析 を試してみた
hikaru1001
0
110
AIはハッカーを減らすのか、増やすのか?──現役ホワイトハッカーから見るAI時代のリアル【MEGU-Meet】
cscengineer
PRO
0
220
AI活用時代の事業判断高度化を導くエンジニアリング基盤 / 20260424 Atsushi Funahashi
shift_evolve
PRO
2
100
Choose your own adventure in agentic design patterns
glaforge
0
160
「誰一人取り残されない」 AIエージェント時代のプロダクト設計思想 Product Management Summit 2026
mizushimac
1
1.8k
Chasing Real-Time Observability for CRuby
whitegreen
0
280
20260423_執筆の工夫と裏側 技術書の企画から刊行まで / From the planning to the publication of technical book
nash_efp
3
620
AIが書いたコードを信じられない問題 〜レビュー負荷を下げるために変えたこと〜 / The AI Code Trust Gap: Reducing the Review Burden
bitkey
PRO
8
1.4k
Expiration of Secure Boot Certificates for vSphere Virtual Machines
mirie_sd
0
120
バイブコーディングで3倍早く⚪⚪を作ってみた
samakada
0
180
Featured
See All Featured
Done Done
chrislema
186
16k
Future Trends and Review - Lecture 12 - Web Technologies (1019888BNR)
signer
PRO
0
3.5k
SEO Brein meetup: CTRL+C is not how to scale international SEO
lindahogenes
1
2.6k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.5k
Site-Speed That Sticks
csswizardry
13
1.2k
Build your cross-platform service in a week with App Engine
jlugia
234
18k
BBQ
matthewcrist
89
10k
SEO for Brand Visibility & Recognition
aleyda
0
4.5k
The Curse of the Amulet
leimatthew05
1
12k
The Mindset for Success: Future Career Progression
greggifford
PRO
0
310
Product Roadmaps are Hard
iamctodd
PRO
55
12k
Six Lessons from altMBA
skipperchong
29
4.2k
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