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
Yuki_Kurono
March 28, 2023
Technology
620
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
25
今年のre:inventから学ぶこと
yuki_kurono
0
110
re_invent 2023事前勉強会
yuki_kurono
0
99
CloudFormationの運用が 辛くならない方法を本気で考えてみた
yuki_kurono
0
320
CloudFormationで登場したForEachをちゃんと理解してみる
yuki_kurono
0
870
Turnstileのウィジェット モードとは何者か
yuki_kurono
0
690
CodeGuru Security ってなんだ?
yuki_kurono
0
1.2k
えるしってるか CloudFrontはWAFがあっても カスタムエラーレスポンスを返せる
yuki_kurono
0
440
Terraformのnull_resource ってなに?aws cli が実行できるらしい
yuki_kurono
1
1.5k
Other Decks in Technology
See All in Technology
2026TECHFRESH畢業分享會 - Lightning Talk - E起 See See : 電商推薦讀心術? 數據說了算
line_developers_tw
PRO
0
640
SIer20年! 培ったスキルがスタートアップで輝く時
shucho0103
0
820
社内 AI エージェント Synapse と セマンティックレイヤーの育て方
hiroakis
2
1.6k
あなたの AI ワークスペースに、 専門コーダーを連れてくる - Amazon Quick Desktop 最新情報
kawaji_scratch
1
130
AIの性能が向上しても未解決な組織の重大問題は何か?/An Unsolved Organizational Problem in the Age of AI
moriyuya
3
600
Oracle AI Database@AWS:サービス概要のご紹介
oracle4engineer
PRO
4
2.9k
非エンジニアがClaudeと挑んだ「1ヶ月間プロダクト30本ノック」
askokc
0
230
エンジニアリング戦略の作り方 / Crafting Engineering Strategy
iwashi86
18
6.3k
地球に⽣きるAI —GeoAIと「中間領域」— / AI Living on Earth — GeoAI and the “Intermediate Layer” —
ykiyota
0
220
小さくはじめるSLI/SLO ~育てながら組織に定着させる実践知~ / Starting Small with SLI/SLOs: Building Adoption Through Continuous Growth
nari_ex
2
1.3k
LLMにもCAP定理があるという話
harukasakihara
0
280
AGENTS.mdとSkillsで始めるAIエージェント活用
sonoda_mj
2
190
Featured
See All Featured
Digital Projects Gone Horribly Wrong (And the UX Pros Who Still Save the Day) - Dean Schuster
uxyall
0
1.7k
Visual Storytelling: How to be a Superhuman Communicator
reverentgeek
2
560
Practical Orchestrator
shlominoach
191
11k
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
220
Building an army of robots
kneath
306
46k
Code Reviewing Like a Champion
maltzj
528
40k
Test your architecture with Archunit
thirion
1
2.3k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
Ten Tips & Tricks for a 🌱 transition
stuffmc
0
130
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
330
Measuring & Analyzing Core Web Vitals
bluesmoon
9
860
Leveraging LLMs for student feedback in introductory data science courses - posit::conf(2025)
minecr
1
280
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