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
0
1.2k
clean azure subscription
JAZUG 7周年総会のLTで発表したスライドです。
kongou-ae
September 09, 2017
Tweet
Share
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
460
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
660
2020年の Azure Stack Hub を振り返る / review-of-Azure-Stack-Hub-in-2020
kongou_ae
0
570
NSG フローログを確認する方法 / how-to-confirm-nsg-flow-log
kongou_ae
1
3k
仮想アプライアンス担当者向け Azure ネットワーク/azure network that focus on network virtual appliance
kongou_ae
2
3.5k
Azure のサービスを利用して Windows Server を運用管理する / operation and management of windows server by Azure service
kongou_ae
0
710
Azure Stack Edge を導入した話 / The story about installing Azure Stack Edge
kongou_ae
0
760
Azure Stack Hub を導入して分かった10のこと / 10 things I learned after installing Azure Stack Hub
kongou_ae
0
2.1k
Other Decks in Technology
See All in Technology
インフラエンジニア必見!Kubernetesを用いたクラウドネイティブ設計ポイント大全
daitak
1
360
Red Hat OpenStack Services on OpenShift
tamemiya
0
110
レガシー共有バッチ基盤への挑戦 - SREドリブンなリアーキテクチャリングの取り組み
tatsukoni
0
220
量子クラウドサービスの裏側 〜Deep Dive into OQTOPUS〜
oqtopus
0
110
OCI Database Management サービス詳細
oracle4engineer
PRO
1
7.4k
ブロックテーマでサイトをリニューアルした話 / 2026-01-31 Kansai WordPress Meetup
torounit
0
470
日本の85%が使う公共SaaSは、どう育ったのか
taketakekaho
1
160
こんなところでも(地味に)活躍するImage Modeさんを知ってるかい?- Image Mode for OpenShift -
tsukaman
0
140
データの整合性を保ちたいだけなんだ
shoheimitani
8
3.1k
ファインディの横断SREがTakumi byGMOと取り組む、セキュリティと開発スピードの両立
rvirus0817
1
1.4k
Introduction to Bill One Development Engineer
sansan33
PRO
0
360
Webhook best practices for rock solid and resilient deployments
glaforge
1
290
Featured
See All Featured
Building a Scalable Design System with Sketch
lauravandoore
463
34k
Product Roadmaps are Hard
iamctodd
PRO
55
12k
WENDY [Excerpt]
tessaabrams
9
36k
Measuring Dark Social's Impact On Conversion and Attribution
stephenakadiri
1
120
Self-Hosted WebAssembly Runtime for Runtime-Neutral Checkpoint/Restore in Edge–Cloud Continuum
chikuwait
0
320
Marketing Yourself as an Engineer | Alaka | Gurzu
gurzu
0
130
A better future with KSS
kneath
240
18k
職位にかかわらず全員がリーダーシップを発揮するチーム作り / Building a team where everyone can demonstrate leadership regardless of position
madoxten
57
50k
Heart Work Chapter 1 - Part 1
lfama
PRO
5
35k
Balancing Empowerment & Direction
lara
5
890
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
2.1k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
196
71k
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で実行するのお勧め(認証的な意味で
お勧めの掃除方法を教えてください!