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
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
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
53
今年のre:inventから学ぶこと
yuki_kurono
0
120
re_invent 2023事前勉強会
yuki_kurono
0
110
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
460
Terraformのnull_resource ってなに?aws cli が実行できるらしい
yuki_kurono
1
1.6k
Other Decks in Technology
See All in Technology
IoTデバイスを繋げるプロトコルMatterをAndroidで使用する方法
harutiro
0
120
今こそ知りたいAmplifyGen2
mkdev10
2
150
契約書画像からの情報抽出に特化した視覚接地モデルを育てる話
sansantech
PRO
1
140
React Nativeでの OTA Updateって、 どう説明する?
ichiki1023
0
150
[2026 Oracle Technical Deep Dive] オンプレミスDBのCloud移行アプローチ:移行計画に基づくメソッドとツールの選択 (2026年9月17日開催)
oracle4engineer
PRO
0
150
【データ横丁主催】AI Agentがコンテキストを使って仕事をした後、何が残るのか― 組織の経験を次の判断に引き継ぐ「Agent Memory」
shisyu_gaku
2
330
おそらく日本で唯一のDevRelインターン生として
husengs7
0
170
BedrockとLambdaで作る リアルタイム進行型推理ゲーム
kawametho
0
190
AI時代に必要な脅威モデリング― 変化の速度に負けない理解とリスク判断
masakane55
4
1k
FinTech 1-2 : Overview of FinTech
ks91
PRO
0
150
組み立てて楽しむ AWS Blocks 入門
kmiya84377
0
220
AgentCoreで実践するハーネスエンジニアリング
yakumo
1
280
Featured
See All Featured
Game over? The fight for quality and originality in the time of robots
wayneb77
1
300
Fantastic passwords and where to find them - at NoRuKo
philnash
52
4k
Visual Storytelling: How to be a Superhuman Communicator
reverentgeek
2
700
Dominate Local Search Results - an insider guide to GBP, reviews, and Local SEO
greggifford
PRO
0
350
Technical Leadership for Architectural Decision Making
baasie
3
590
職位にかかわらず全員がリーダーシップを発揮するチーム作り / Building a team where everyone can demonstrate leadership regardless of position
madoxten
69
66k
Building a Modern Day E-commerce SEO Strategy
aleyda
45
9.2k
Navigating the Design Leadership Dip - Product Design Week Design Leaders+ Conference 2024
apolaine
2
460
Reality Check: Gamification 10 Years Later
codingconduct
0
2.3k
Future Trends and Review - Lecture 12 - Web Technologies (1019888BNR)
signer
PRO
0
3.8k
New Earth Scene 8
popppiees
4
2.6k
How to Build an AI Search Optimization Roadmap - Criteria and Steps to Take #SEOIRL
aleyda
1
2.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