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
GitHub Copilot CLI で Azure Portal to Bicep
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Yuta Matsumura
March 23, 2026
Technology
450
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
GitHub Copilot CLI で Azure Portal to Bicep
第59回 Tokyo Jazug Night
https://jazug.connpass.com/event/384470/
Yuta Matsumura
March 23, 2026
More Decks by Yuta Matsumura
See All by Yuta Matsumura
MCPをつなげて作る組織横断のAIエージェント基盤
tsubakimoto_s
0
64
github/awesome-copilotのPHPのエージェントスキルを読む
tsubakimoto_s
0
75
エージェントスキルを作って自分のインプットに役立てよう v2
tsubakimoto_s
0
51
エージェントスキルを作って自分のインプットに役立てよう
tsubakimoto_s
0
800
やさしいとこから始めるGitHubリポジトリのセキュリティ
tsubakimoto_s
4
2.5k
使って学ぼう MCP (と GitHub Codespaces)
tsubakimoto_s
1
340
GitHub Copilot CLI を使いやすくしよう
tsubakimoto_s
1
420
AspireとGitHub Modelsで作るお手軽AIアプリ
tsubakimoto_s
0
120
Memories of GitHub Universe & San Francisco
tsubakimoto_s
0
91
Other Decks in Technology
See All in Technology
[Droidcon Orlando '26] The Android Lens: Applying Mobile Forensics to AI Performance
amanda_hinchman
1
100
「休む」重要さ
smt7174
5
1.6k
複数プロダクトで進めるAI機能実装 ── 実践から得たリアルな学びとロードマップ実現への挑戦 / AICon2026_yanari
rakus_dev
1
270
【公開用】AI_Dev_Ex2026_AI_登壇資料
matsuritechnologies
PRO
1
450
AI時代の開発生産性を捉え直す — 経営と現場をつなぐ「開発組織のオブザーバビリティ」— / AI Dev Ex Conference 2026
tkyowa
1
1.3k
設計レビューとAIハーネスで向き合う AIが生み出した新しいボトルネックの対処法 / Design Reviews and AI Harnesses Against New Bottlenecks Created by AI
nstock
4
410
PHPで作って学ぶリアルタイム音声対話AIとWebSocket入門 by ムナカタ
munakata
0
120
AI時代におけるテストの基礎の再定義 / Rethinking the Fundamentals of Testing in the AI Era
mineo_matsuya
11
3.2k
変更し続けられるシステムをどう保つか — AI時代のSSoTという設計原則
kawauso
1
1k
Vポイント分析基盤におけるデータモデリング20年史
taromatsui_cccmkhd
4
700
2026年のソフトウェア開発を考える(2026/07版) / Agentic Software Engineering 2026-07 Findy Edition
twada
PRO
21
9.4k
インフラと開発の垣根を超えていき!〜元AWSインフラエンジニアがAWS開発で奮闘している話〜
hatahata021
3
390
Featured
See All Featured
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
23k
Pawsitive SEO: Lessons from My Dog (and Many Mistakes) on Thriving as a Consultant in the Age of AI
davidcarrasco
0
190
Discover your Explorer Soul
emna__ayadi
2
1.2k
A Tale of Four Properties
chriscoyier
163
24k
Skip the Path - Find Your Career Trail
mkilby
1
170
The agentic SEO stack - context over prompts
schlessera
0
850
svc-hook: hooking system calls on ARM64 by binary rewriting
retrage
2
370
Lightning Talk: Beautiful Slides for Beginners
inesmontani
PRO
2
610
Measuring & Analyzing Core Web Vitals
bluesmoon
9
900
Navigating Weather and Climate Data
rabernat
0
390
Leo the Paperboy
mayatellez
8
1.9k
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
910
Transcript
GitHub Copilot CLI で Azure Portal to Bicep 2026/03/23 Tokyo
JAZUG Night Yuta Matsumura © 2026 Yuta Matsumura. #jazug 1
松村 優大 (MLBお兄さん) © 2026 Yuta Matsumura. #jazug 株式会社オルターブース (Chief
Technical Architect) Microsoft MVP for Developer Technologies Microsoft Top Partner Engineer Award 2025 GitHub 公認トレーナー C#, PHP, Azure, GitHub #fukuten #devblogradio #fukuoka_mcp https://linktr.ee/tsubakimoto 2
© 2026 Yuta Matsumura. #jazug 3 4/17 Global Azure @福岡を
開催します! 登壇者・参加者を募集中です! https://jazug.connpass.com/event/384711/
明日 Microsoft AI Tour に参加される方 朝は早いけど楽しみましょう! © 2026 Yuta Matsumura.
#jazug 4
コーディングアシスタントを使っていますか? GitHub Copilot などのコーディングアシスタントを使った開発の敷居が 下がると、色んな個人アプリや社内アプリを作ってみたくなるものです。 私は最近どうしているかというと・・・ アプリ:AI を使って開発 インフラ:IaC も用意しようと思いつつ、とりあえずポータルで作る
© 2026 Yuta Matsumura. #jazug 5
Bicep テンプレートを書く 1. ゼロから書く 2. ポータルで作ったリソースの テンプレートをエクスポート © 2026 Yuta
Matsumura. #jazug 6
Bicep テンプレートを書く 1. ゼロから書く 2. ポータルで作ったリソースの テンプレートをエクスポート 3. GitHub Copilot
で 真似る © 2026 Yuta Matsumura. #jazug 7
使うもの • GitHub Copilot • GitHub Copilot CLI • Azure
CLI • Microsoft Learn MCP Server • (Azure MCP Server) © 2026 Yuta Matsumura. #jazug 8
GitHub Copilot CLI • GitHub Copilot のコマンドラインツール `copilot` • Visual
Studio Code の Copilot でできることは大抵できる • おすすめの使い方は • Markdown 文章の生成 (素の Markdown が生成) • 他のコマンドライン結果を Copilot に渡す copilot -p "1行コミットメッセージを生成して: $(git diff --cached)" © 2026 Yuta Matsumura. #jazug 10
// All platforms npm install -g @github/copilot // Windows winget
install GitHub.Copilot // macOS and Linux brew install copilot-cli // Install script (macOS and Linux) curl -fsSL https://gh.io/copilot-install | bash © 2026 Yuta Matsumura. #jazug 11 インストール方法
© 2026 Yuta Matsumura. #jazug 12 MCP サーバー登録
デモ 右のような構成の リソースグループを 例とします © 2026 Yuta Matsumura. #jazug 13
以下の内容でBicepに関するタスクを実施してください。 1. 指定のリソースのBicepテンプレートを取得して作業フォルダに保存して - 対象のリソースグループ: `rg-jazug` - 作業フォルダ: `rg-jazug-bicep` 2.
別リソースグループにデプロイできるように作業フォルダ内のテンプレートをパラメーター化して 3. リソースプレフィックスは推奨される省略形を使用すること - 参照: https://learn.microsoft.com/... 4. テンプレートの構成とAzure CLI(PowerShell)でのデプロイ手順を作業フォルダの `README.md` に 記載して 5. Bicepテンプレートのエラーを修正して、正常にデプロイできるようにして © 2026 Yuta Matsumura. #jazug 14
以下の内容でBicepに関するタスクを実施してください。 1. 指定のリソースのBicepテンプレートを取得して作業フォルダに保存して - 対象のリソースグループ: `rg-jazug` - 作業フォルダ: `rg-jazug-bicep` 2.
別リソースグループにデプロイできるように作業フォルダ内のテンプレートをパラメーター化して 3. リソースプレフィックスは推奨される省略形を使用すること - 参照: https://learn.microsoft.com/... 4. テンプレートの構成とAzure CLI(PowerShell)でのデプロイ手順を作業フォルダの `README.md` に 記載して 5. Bicepテンプレートのエラーを修正して、正常にデプロイできるようにして © 2026 Yuta Matsumura. #jazug 15 Azure CLI Microsoft Learn MCP Server
Microsoft Learn MCP Server • learn.microsoft.com に対して検索ができる • 3つのツールが利用可能 ©
2026 Yuta Matsumura. #jazug 16 ツール名 用途 microsoft_docs_search ページ検索 microsoft_docs_fetch ページを Markdown 形式に変換 microsoft_code_sample_search コードサンプル検索 (言語指定可)
◐ Let me analyze the task: 1. Get Bicep templates
from resource group `rg-jazug` … 2. Parameterize the templates for deployment … 3. Use recommended resource prefixes/abbreviations 4. Create README.md with template structure and Azure CLI … 5. Fix any Bicep template errors Let me start by: 1. Checking Azure subscription and resource group 2. Getting the resource group contents 3. Exporting Bicep templates 4. Creating the working folder structure © 2026 Yuta Matsumura. #jazug 17 タスクの計画
• List Azure Subscriptions └ {"status":200,"message":"Success","results ... } • Check
rg-jazug resource group $ az group show --name rg-jazug ... 2>&1 └ 5 lines... • List resources in rg-jazug $ az resource list --resource-group rg-jazug ... └ 10 lines... © 2026 Yuta Matsumura. #jazug 18 Azure CLI でリソース取得
◐ I can see the resources in `rg-jazug`: 1. `plan-yuta-jazug`
- App Service Plan 2. `vnet-yuta-jazug` - Virtual Network 3. `privatelink.postgres.database.azure.com` - Privat 4. `appi-yuta-jazug` - Application Insights 5. `app-yuta-jazug` - App Service (Web App) 6. `psql-yuta-jazug` - PostgreSQL Flexible Server 7. `privatelink.postgres.database.azure.com/link-2sww - Private DNS Zone VNet Link © 2026 Yuta Matsumura. #jazug 19 出力対象リソースの確認
• Create working folder and export ARM template $ New-Item
-ItemType Directory -Path "..." -Force | Out-Null az group export --name rg-jazug ... 2>&1 | Out-File "...¥template.json" -Encoding utf8 Write-Host "Done" └ 1 line... © 2026 Yuta Matsumura. #jazug 20 テンプレートの出力
• Decompile ARM template to Bicep $ az bicep decompile
--file "...¥template.json" 2>&1 └ 4 lines... • Check exported template content $ Get-Content "...¥template.json" -First 5 └ 6 lines... ◐ The export added warnings/errors to the beginning of the JSON file. I need to re-export and redirect only the actual JSON output (not stderr). Let me do this differently. © 2026 Yuta Matsumura. #jazug 21 Bicep の作成や検証
• デコンパイルにエラーがあるため、各リソースの設定を取得して手動でクリーンなBicep テンプレートを作成します。 • Get VNet details $ az network
vnet show -g rg-jazug -n vnet-yuta-jazug -o json 2>&1 └ 72 lines... • Get App Service Plan details $ az appservice plan show -g rg-jazug -n plan-yuta-jazug -o json 2>&1 └ 77 lines... © 2026 Yuta Matsumura. #jazug 22 Bicep のエラー修正
© 2026 Yuta Matsumura. #jazug 23
© 2026 Yuta Matsumura. #jazug 24 オリジナル (ポータルで作成) オリジナル (ポータルで作成)
Bicep をデプロイして構築 Bicep をデプロイして構築
2つのリソースグループを比較し、構成や設定の違いを表形式でまとめてください。 - Resource Group: rg-jazug - Resource Group: rg-jazug-dev ©
2026 Yuta Matsumura. #jazug 25
© 2026 Yuta Matsumura. #jazug 26
© 2026 Yuta Matsumura. #jazug 27
© 2026 Yuta Matsumura. #jazug 28
なぜ Copilot CLI でやるのか VS Code の GitHub Copilot Chat
でも同様の作業は可能です。 しかし出力内容のコピーがしづらく、 Markdown がレンダリングされ、プ レーンテキストで扱えないことが 煩わしいこともたまにあります・・・ © 2026 Yuta Matsumura. #jazug 29
個人的な工夫 >リソースプレフィックスは推奨される省略形を使用すること 1. 該当のドキュメントを指定し、Web 検索で情報取得 2. 目的の処理を実行する Agent Skills を利用する
3. 目的の処理を実行する Agent Skills を自作する © 2026 Yuta Matsumura. #jazug 30
Agent Skills Agent Skills とは、エージェントに能力と専門知識を与えるため仕組み。 SKILL.md やスクリプトファイルを用意し、タスクの実行を支援する。 https://agentskills.io skill-creator (anthropics/skills)
を使い、 リソースの推奨プレフィックスのスキルを自作しました。 azure-resource-abbreviations (tsubakimoto/skills) © 2026 Yuta Matsumura. #jazug 31
後日談 (未検証) Azure のスキル (microsoft/azure-skills) が最近公開されましたが、 別の Azure スキルにリソースの推奨プレフィックスがありました。 azure-cloud-adoption-framework
(MicrosoftDocs/Agent-Skills) © 2026 Yuta Matsumura. #jazug 32 ※公開するなら1箇所にまとめてほしい・・・
まとめ • CLI のほうが向いている作業・環境もあります • IaC も AI パワーで作っていくことができます •
Azure ポータル (GUI) で作ったリソースから、ベースとなる Bicep を 生成できますが、完全コピーではないため確認必須です © 2026 Yuta Matsumura. #jazug 33
ご清聴ありがとうございました © 2026 Yuta Matsumura. #jazug 34