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
GitHub Copilot CLI で Azure Portal to Bicep
Search
Yuta Matsumura
March 23, 2026
Technology
510
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
ChatGPT製:GitHub Copilotの紹介(デモ)
tsubakimoto_s
1
65
MCPをつなげて作る組織横断のAIエージェント基盤(の開発工程)
tsubakimoto_s
0
320
Microsoft MVP プログラムを紹介するから目指す人増えてくれ
tsubakimoto_s
0
220
MCPをつなげて作る組織横断のAIエージェント基盤
tsubakimoto_s
0
920
github/awesome-copilotのPHPのエージェントスキルを読む
tsubakimoto_s
0
110
エージェントスキルを作って自分のインプットに役立てよう v2
tsubakimoto_s
0
75
エージェントスキルを作って自分のインプットに役立てよう
tsubakimoto_s
0
910
やさしいとこから始めるGitHubリポジトリのセキュリティ
tsubakimoto_s
4
2.7k
使って学ぼう MCP (と GitHub Codespaces)
tsubakimoto_s
1
410
Other Decks in Technology
See All in Technology
二歩目のフロントエンド・ウェブアクセシビリティ
camiha
2
330
分析AIエージェントを育てる、動く環境を育てる
codatum
1
760
夫婦で子育てするための育児標準化
codmoninc
PRO
0
130
自分で立ててみるLLMサービス
y_sera15
0
160
SREでアラート疲れを 解決しよう!
kairim0
1
220
[AWS 秋のクラウドオペレーション祭り 2026]AWS DevOps Agentで変わるリリースと運用対応 ~リリース管理機能と Directed actions のご紹介~
furuton
4
1.2k
3つのアプローチで目指す チームを強くするAI駆動開発
thkt
0
150
今こそ知りたいAmplifyGen2
mkdev10
2
160
AI駆動開発、viviONの1年 ── うまくいったこと・いかなかったこと
vivion
0
290
UniFi(ユニファイ)AIカメラの現場活用
ludicmind
1
410
DevelopersIO 2026 知識の地図を描く ─ オントロジーとは何か?
ishikawa_satoru
1
1.3k
会社説明資料
persolserverworks
0
9.7k
Featured
See All Featured
16th Malabo Montpellier Forum Presentation
akademiya2063
PRO
0
400
Bridging the Design Gap: How Collaborative Modelling removes blockers to flow between stakeholders and teams @FastFlow conf
baasie
0
720
Ruling the World: When Life Gets Gamed
codingconduct
0
400
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
10k
Information Architects: The Missing Link in Design Systems
soysaucechin
1
1.2k
GraphQLの誤解/rethinking-graphql
sonatard
75
12k
Making Projects Easy
brettharned
120
6.8k
Build The Right Thing And Hit Your Dates
maggiecrowley
39
3.5k
AI: The stuff that nobody shows you
jnunemaker
PRO
10
1.1k
What’s in a name? Adding method to the madness
productmarketing
PRO
24
4.2k
Git: the NoSQL Database
bkeepers
PRO
433
67k
Applied NLP in the Age of Generative AI
inesmontani
PRO
4
2.5k
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