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
clean azure subscription
Search
kongou-ae
September 09, 2017
Technology
1.3k
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
clean azure subscription
JAZUG 7周年総会のLTで発表したスライドです。
kongou-ae
September 09, 2017
More Decks by kongou-ae
See All by kongou-ae
Azure Arc で Azure Stack HCI 上の仮想マシンを操作する / operate-virtual-machine-on-AzsHCI-by-Arc
kongou_ae
0
490
Windows Update を NSG で許可する / Permit the traffic of windows update by NSG
kongou_ae
0
2.3k
Azure Stack HCI に 21H2 機能更新を適用した時の苦労話 / trouble about applying 21h2 update to Azure Stack HCI OS
kongou_ae
0
720
2020年の Azure Stack Hub を振り返る / review-of-Azure-Stack-Hub-in-2020
kongou_ae
0
620
NSG フローログを確認する方法 / how-to-confirm-nsg-flow-log
kongou_ae
1
3.1k
仮想アプライアンス担当者向け Azure ネットワーク/azure network that focus on network virtual appliance
kongou_ae
2
3.6k
Azure のサービスを利用して Windows Server を運用管理する / operation and management of windows server by Azure service
kongou_ae
0
740
Azure Stack Edge を導入した話 / The story about installing Azure Stack Edge
kongou_ae
0
800
Azure Stack Hub を導入して分かった10のこと / 10 things I learned after installing Azure Stack Hub
kongou_ae
0
2.2k
Other Decks in Technology
See All in Technology
なぜSRE・セキュリティは評価されないのか?守りの組織を事業成長エンジンに変えた実践
cscengineer
PRO
0
180
Introduction to Bill One Development Engineer
sansan33
PRO
0
490
【Oracle AI Spotlight ウェビナー】AWSか、Azureか、Google Cloudか。その議論にオラクルを含める意義。
oracle4engineer
PRO
1
190
Bet AI Day 2026丨バクラク Autopilot、業務システムの再設計
layerx
PRO
1
830
AI時代に、プロダクトの数だけ積み上がる所有コストをどうエンジニアリングするか / Engineering the Cost of Ownership
kzkmaeda
0
240
Jetpack Compose で挑む新聞紙面UI ─ 複合ジェスチャー・ポリゴン記事領域・適応的ページ構成という3つの壁/droidkaigi2026
nikkei_engineer_recruiting
0
140
Guerilla InnerSource in enterprises, during the AI hype
onenashev
PRO
0
130
V8コントリビュート超入門
riyaamemiya
0
110
Backstageでつくるセルフサービスな社内開発基盤
kikunosuke75
1
210
Self Healing Rollouts: Automating Production Fixes with Agentic AI
kdubois
0
130
Bet AI Day 2026丨AIを「使う」から、AIが「働く」へ ― LayerXが進める「組織AI」の社会実装
layerx
PRO
2
1.5k
[RSJ26] Flow as Flow: Modeling Robot Velocity Fields as Probability Velocity Fields
keio_smilab
PRO
0
180
Featured
See All Featured
Marketing to machines
jonoalderson
1
5.7k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.9k
Ruling the World: When Life Gets Gamed
codingconduct
0
320
The Power of CSS Pseudo Elements
geoffreycrofte
82
6.5k
Lightning talk: Run Django tests with GitHub Actions
sabderemane
0
250
Reflections from 52 weeks, 52 projects
jeffersonlam
356
21k
Darren the Foodie - Storyboard
khoart
PRO
3
3.8k
Kristin Tynski - Automating Marketing Tasks With AI
techseoconnect
PRO
0
490
WENDY [Excerpt]
tessaabrams
12
39k
The AI Search Optimization Roadmap by Aleyda Solis
aleyda
1
6.1k
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
PRO
1
1.6k
Agile that works and the tools we love
rasmusluckow
331
22k
Transcript
サブスクリプションを掃除する @kongou_ae
自己紹介 • @kongou_ae • ネットワークエンジニアからクラウドエンジニアに社内 転職 • SIerでAzureとAzure Stackなう
課題 • 検証環境のサブスクリプションが汚い
汚いサブスクリプションとは • 未割当のリソースが大量に残っている
汚れの原因 • VMを消しても関連リソースが消えない – 気軽にVMを作る→VMだけ消す→地獄絵図 VM削除前 VM削除後
そうだ、掃除しよう
もっとも簡単な掃除の仕方 • リソースグループごと消す – リソースグループ内のリソースがきれいさっぱり全部消える – 1つのリソースグループに「いるもの」と「いらないもの」を 入れると掃除地獄が始まる
GUIで掃除する • 「全てのリソース」ではリソースを消せない
GUIで掃除する • 一括操作できるようになります。でも、ポチポチ大変。
せめてCLIで • 未使用Network Interfaceを一括削除 az network nic delete --ids $(az
network nic list –query "[?virtualMachine==null]|[?networkSecurityGroup==null].id" -o tsv) • 未使用Public IP Addressを一括削除 az network public-ip delete --ids $(az network public-ip list -- query "[?ipConfiguration==null].id" -o tsv)
せめてCLIで • 問答無用で消えちゃいませんか? – 消えます – 必要なリソースであればロックする
コマンドを何度も叩くのが面倒 • azClean.shを作った – https://github.com/kongou-ae/azureRM-resource- cleaner – コマンド1発で次の未使用リソースをお掃除します • Public
IP Address • Network Interface • Managed Disk • Network Security Group – Cloud Shellで実行するのお勧め(認証的な意味で
お勧めの掃除方法を教えてください!