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サブスクリプションをCLIから作成する(EA契約限定)

Posted at

EA契約を利用中であればCLIやアプリケーションからサブスクリプションを作成することができます。

EAポータルに「アカウント」として登録されているユーザーでaz loginを実施した上で、以下Azure CLIのコマンドで作成可能です。

az account alias create --name "sampleAlias" --billing-scope "/providers/Microsoft.Billing/billingAccounts/<your billingAccounts>/enrollmentAccounts/<your enrollmentAccounts> --display-name "subscripution_name" --workload "Production"
  • billingAccounts:EAポータルから確認できる加入契約番号
  • enrollmentAccounts:Azure portalの「コスト管理と請求」からEA契約の課金スコープを選択し、「アカウント」に移動、サブスクリプションを作成するアカウントの「ID」を確認
    image.png

公式のドキュメントを見ても指定するオプションが何なのかわかりづからかったので補足してみました。
これを利用すればDevOpsやワークフローの中でAzureサブスクリプションを作成することも実現できるかもしれません。
次回は自動化に組み込む方法を検証して紹介できればと思います。

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?