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
Terraform Provider for Azure に貢献してみた話
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Tatsuro Shibamura
February 18, 2020
Technology
650
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Terraform Provider for Azure に貢献してみた話
Tatsuro Shibamura
February 18, 2020
More Decks by Tatsuro Shibamura
See All by Tatsuro Shibamura
# Azure Cosmos DB パフォーマンス最適化入門 - 設計・開発・運用の実践テクニック
shibayan
0
540
Hack Azure! #5 - Geek of Azure Serverless
shibayan
0
130
.NET Conf 2020 Online - .NET 5 リリース記念パーティートーク
shibayan
0
9.9k
Azure Functions と SendGrid の良い関係
shibayan
0
1.3k
Azure Serverless を活用したリアルタイム Web のすべて
shibayan
1
3k
祝 東日本リージョン一般提供! Azure Application Insights 基礎と実践
shibayan
1
42k
なかなか楽にならないSSL/TLS証明書の話
shibayan
2
1.9k
.NET Conf 2018 Tokyo
shibayan
1
4.1k
最近の Azure App Service について
shibayan
0
1.4k
Other Decks in Technology
See All in Technology
脱SaaS!FDEを支えるプロビジョニングと分離設計
knih
0
300
GitHub Copilot 最新アップデート – 「一歩先」の実践活用術
moulongzhang
5
1.7k
2026-06-24_人とAIの責務分離に基づく開発プロセスの提案.pdf
takahiromatsui
0
120
Oracle Cloud Infrastructure:2026年6月度サービス・アップデート
oracle4engineer
PRO
0
330
When Platform Engineering Meets GenAI
sucitw
0
170
AIチャット検索改善の3週間
kworkdev
PRO
2
180
AIをフル活用してオンコール機能のプロトタイプを2日で作った話 / Building an AI-Powered On-Call Prototype in Just Two Days
nari_ex
0
130
スタートアップにAmazon EKSは早すぎる? マルチプロダクト戦略を加速する Platform Engineeringの実践 / Is Amazon EKS Too Soon for Startups? Practical Platform Engineering to Accelerate a Multi-Product Strategy
elmodev09
1
1.8k
Agile and AI Redmine Japan 2026
hiranabe
4
480
AIのReact習熟度を測る
uhyo
2
680
Microsoft のサポートとフィードバック総まとめ
murachiakira
PRO
0
110
「ビジネスがわかるエンジニア」とは何か?
ryooob
0
320
Featured
See All Featured
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
1.2k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
37
6.5k
The browser strikes back
jonoalderson
0
1.3k
Why Your Marketing Sucks and What You Can Do About It - Sophie Logan
marketingsoph
0
170
Impact Scores and Hybrid Strategies: The future of link building
tamaranovitovic
0
310
The Invisible Side of Design
smashingmag
301
52k
GitHub's CSS Performance
jonrohan
1033
470k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
23k
Deep Space Network (abreviated)
tonyrice
0
210
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
2.3k
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
11
950
How People are Using Generative and Agentic AI to Supercharge Their Products, Projects, Services and Value Streams Today
helenjbeal
1
220
Transcript
Terraform Provider for Azure に貢献してみた話 @shibayan
はじめに • AzureRM Terraform Provider に使いたい機能が入ってなかっ たので自分で追加した話です • Go をちゃんと触ったのがこれが最初でした
• 公式の README をちゃんと読めば迷わないです • https://github.com/terraform-providers/terraform-provider- azurerm/blob/master/README.md
今回の経緯 • 何故か Azure Function には ip_restriction 設定がなかった • App
Service 側にはあるので謎 • Issue が上がってて要望も多そうだった(自分もその一人) • 凄く使いたいのに、数か月動きがなかった • ないんだったら自分で実装すれば(以下略 • https://github.com/terraform-providers/terraform-provider- azurerm/pull/5440
必要なもの • Go version 1.13.x • Make for Windows •
ビルドするために必要 • Git Bash for Windows • Git for Windows に付いてきたものを利用した • Visual Studio Code + Go Extension
貢献までの流れ • Issue を検索して、同じ問題が上がっていないか調べる • 無い場合は先に Issue を作ってから • コードを修正、テストを追加
• make build を実行して Provider をビルド、手元で確認 • make test / make testacc でテストが通ることを確認 • testacc は acceptance tests のこと
Visual Studio Code は必須ツール 保存時にインデントを 自動で整えてくれる コンテキストに沿って IntelliSense が動作
ビルドした Provider を確認する • ビルドした terraform-provider-azurerm.exe を “.terraform¥plugins¥windows_amd64” 以下にコピー •
terraform init を再度実行 • これまで通り terraform plan や apply を実行 • ちゃんと PR にはテストコードを追加しましょう
PR を作成すると自動でラベルが付く
Windows 環境での注意点 • Git 設定が autocrlf = true だと make
build で落ちる • Formatter / Linter が crlf だとエラー扱いに • autocrlf = false にしてから clone しなおす • make の実行は Git Bash から行う • シェルスクリプトが使われてるので cmd / pwsh では無理 • WSL を使って構築した方が無難
貢献してみた感想 • Visual Studio Code があれば何とかなる • Formatter / Linter
の設定を読み取っていい感じに保存してくれる • ビルドツール周りが Windows だと少し辛い • Make for Windows や Git Bash for Windows が必要 • Terraform Provider の構造は簡単 • リソースへの CRUD を行うコードを定義している • Azure Resource Manager の知識が重要
おわりに • まだまだ機能が抜け落ちてる部分が多いので貢献しましょう • Issue を立ててリアクションを集めるのも貢献 • CI がガチガチに組まれている安心感 •
コーディングスタイルが統一されて便利でした • HashiCorp の人が丁寧にレビューしてくれました • 負荷を下げるためにスタイルなどはしっかり守る