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.2k
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
480
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
700
2020年の Azure Stack Hub を振り返る / review-of-Azure-Stack-Hub-in-2020
kongou_ae
0
600
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
790
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
データ基盤をDataformで整えた話 〜 開発環境を添えて 〜
takapy
0
140
LLMにもCAP定理があるという話
harukasakihara
0
280
「エンジニア進化論」2028年の開発完全自動化、エンジニアはどう進化するか
cyberagentdevelopers
PRO
4
3.1k
SIer20年! 培ったスキルがスタートアップで輝く時
shucho0103
0
810
タクシーアプリ『GO』の実践的データ活用
mot_techtalk
3
190
日本 Fintech 未来予測レポート 2027〜2028年(オリジナル版)
8maki
0
320
AI駆動開発が変える、大規模開発の前提 ーHuman in the Loop から Human on the Loop へ / AIE2026
visional_engineering_and_design
30
23k
失敗を資産に変えるClaude Code
shinyasaita
0
180
Oracle AI Database@Azure:サービス概要のご紹介
oracle4engineer
PRO
6
1.9k
自律型AIエージェントは何を破壊するのか
kojira
0
140
2026TECHFRESH畢業分享會 - Lightning Talk - E起 See See : 電商推薦讀心術? 數據說了算
line_developers_tw
PRO
0
580
noUncheckedIndexedAccess、3時間、1万円。 / noUncheckedIndexedAccess, 3 Hours, 10,000 JPY.
kaonavi
1
340
Featured
See All Featured
Ecommerce SEO: The Keys for Success Now & Beyond - #SERPConf2024
aleyda
1
2k
Why Your Marketing Sucks and What You Can Do About It - Sophie Logan
marketingsoph
0
170
Marketing to machines
jonoalderson
1
5.4k
30 Presentation Tips
portentint
PRO
1
320
Future Trends and Review - Lecture 12 - Web Technologies (1019888BNR)
signer
PRO
0
3.6k
Money Talks: Using Revenue to Get Sh*t Done
nikkihalliwell
0
250
State of Search Keynote: SEO is Dead Long Live SEO
ryanjones
0
200
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.5k
A Tale of Four Properties
chriscoyier
163
24k
Speed Design
sergeychernyshev
33
1.8k
Joys of Absence: A Defence of Solitary Play
codingconduct
1
390
Building AI with AI
inesmontani
PRO
1
1.1k
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で実行するのお勧め(認証的な意味で
お勧めの掃除方法を教えてください!