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
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
kongou-ae
September 09, 2017
Technology
1.2k
0
Share
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
470
Windows Update を NSG で許可する / Permit the traffic of windows update by NSG
kongou_ae
0
2.2k
Azure Stack HCI に 21H2 機能更新を適用した時の苦労話 / trouble about applying 21h2 update to Azure Stack HCI OS
kongou_ae
0
680
2020年の Azure Stack Hub を振り返る / review-of-Azure-Stack-Hub-in-2020
kongou_ae
0
590
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
730
Azure Stack Edge を導入した話 / The story about installing Azure Stack Edge
kongou_ae
0
780
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
実践ハーネスエンジニアリング:TAKTで実現するAIエージェント制御 / Practical Harness Engineering: AI Agent Control Enabled by TAKT
nrslib
12
4.8k
AI: Making Admin and Users, Lives Better
kbmsg
0
110
Percolatorを廃止し、マルチ検索サービスへ刷新した話 / Search Engineering Tech Talk 2026 Spring
visional_engineering_and_design
0
130
AWS Agent Registry の基礎・概要を理解する/aws-agent-registry-intro
ren8k
3
390
基盤を育てる 外部SaaS連携の運用
gamonges_dresscode
1
120
[OAWTT26][THR1028] Oracle AI Database 26ai へのアップグレード:ベストプラクティスと最新情報
oracle4engineer
PRO
1
110
データ定義の混乱と戦う 〜 管理会計と財務会計 〜
wonohe
0
140
AI バイブコーティングでキーボード不要?!
samakada
0
600
運用システムにおけるデータ活用とPlatform
sansantech
PRO
0
120
AWS Transform CustomでIaCコードを自由自在に変換しよう
duelist2020jp
0
120
クラウドネイティブな開発 ~ 認知負荷に立ち向かうためのコンテナ活用
literalice
0
150
サイボウズ 開発本部採用ピッチ / Cybozu Engineer Recruit
cybozuinsideout
PRO
10
79k
Featured
See All Featured
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
35
2.4k
How to train your dragon (web standard)
notwaldorf
97
6.6k
The Organizational Zoo: Understanding Human Behavior Agility Through Metaphoric Constructive Conversations (based on the works of Arthur Shelley, Ph.D)
kimpetersen
PRO
0
310
Raft: Consensus for Rubyists
vanstee
141
7.4k
SEOcharity - Dark patterns in SEO and UX: How to avoid them and build a more ethical web
sarafernandez
0
170
sira's awesome portfolio website redesign presentation
elsirapls
0
220
Data-driven link building: lessons from a $708K investment (BrightonSEO talk)
szymonslowik
1
1k
Agile Leadership in an Agile Organization
kimpetersen
PRO
0
140
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
280
How to Build an AI Search Optimization Roadmap - Criteria and Steps to Take #SEOIRL
aleyda
1
2k
Accessibility Awareness
sabderemane
1
100
The Pragmatic Product Professional
lauravandoore
37
7.2k
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で実行するのお勧め(認証的な意味で
お勧めの掃除方法を教えてください!