0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Azure Functions が参照している Storage アカウントを確認する

Last updated at Posted at 2021-12-06

アプリケーション設定 AzureWebJobsStorage から辿れるので、ゴニョゴニョすると一覧表示できる。

shell.sh
#!/bin/bash -l
set -Ceu

ids=`az functionapp list --query '[].id' -o tsv`
for id in $ids; do
  read rg name <<< $(echo $id | awk -F '/' '{print $5, $9}')
  storage=$(az functionapp config appsettings list -g $rg -n $name --query "[?name == 'AzureWebJobsStorage'].value" -o tsv | awk -F ';' '{for(i = 1; i <= NF; i++){printf $i "\n"}}' | grep AccountName | awk -F '=' '{print $2}')
  echo $rg, $name, $storage
done

Usage

./shell.sh | column -t
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?