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
680
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
62
今年のre:inventから学ぶこと
yuki_kurono
0
120
re_invent 2023事前勉強会
yuki_kurono
0
110
CloudFormationの運用が 辛くならない方法を本気で考えてみた
yuki_kurono
0
390
CloudFormationで登場したForEachをちゃんと理解してみる
yuki_kurono
0
930
Turnstileのウィジェット モードとは何者か
yuki_kurono
0
750
CodeGuru Security ってなんだ?
yuki_kurono
0
1.2k
えるしってるか CloudFrontはWAFがあっても カスタムエラーレスポンスを返せる
yuki_kurono
0
470
Terraformのnull_resource ってなに?aws cli が実行できるらしい
yuki_kurono
1
1.6k
Other Decks in Technology
See All in Technology
試験勉強はGrokBotでやれ
maigo999
0
110
AWSを利用する上で知っておきたい名前解決の話 2026
nagisa53
1
260
詳解 never 型 - ボトム型の性質を深掘り
nealle
0
150
[General] 개발자로 해외 기업에서 일하기
skydoves
1
290
re:Invent の去年のスケジュールを公開します!
miu_crescent
PRO
0
280
AIエージェント時代、Kaggleにどう取り組むか
takanao
2
500
AI AgentによるEmbedded SREの取り組み
tgidgd
1
340
reInvent2026stby LT00 "Change your life!"
shinichirokawano
1
570
AX時代の自治体支援リソース再配分と役割分担の再構成:戦略とロードマップ(概要)
sishi2026
0
190
現場を動かすAIエージェント#2_製造業現場でのAI活用から見た、ハマる罠と実践知
kintotechdev
2
140
デザインレビューは自動化できるのか?─ Flutter × Figma で UI 品質保証を考える
techiro
2
790
推論基盤と Scale-Up Interconnect の現状と制約から俯瞰する技術動向
markunet
2
800
Featured
See All Featured
The B2B funnel & how to create a winning content strategy
katarinadahlin
PRO
1
600
Lightning talk: Run Django tests with GitHub Actions
sabderemane
0
320
Amusing Abliteration
ianozsvald
1
380
Bridging the Design Gap: How Collaborative Modelling removes blockers to flow between stakeholders and teams @FastFlow conf
baasie
0
760
How to build a perfect <img>
jonoalderson
1
6.2k
Leveraging LLMs for student feedback in introductory data science courses - posit::conf(2025)
minecr
1
470
SEOcharity - Dark patterns in SEO and UX: How to avoid them and build a more ethical web
sarafernandez
0
320
Bioeconomy Workshop: Dr. Julius Ecuru, Opportunities for a Bioeconomy in West Africa
akademiya2063
PRO
1
440
Raft: Consensus for Rubyists
vanstee
143
7.8k
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
PRO
1
1.7k
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
510
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.9k
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