Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Some azure cli commands return SubscriptionNotExists errors?

I have a free trial subscription on Azure:

$ az account subscription list                  
                                                                                         
Command group 'account subscription' is experimental and under development. Reference and support levels: https://aka.ms/CLI_refstatus
[
  {
    "authorizationSource": "RoleBased",
    "displayName": "Azure subscription 1",
    "id": "/subscriptions/fffffff-ffff-ffff-ffff-ffffffffffff",
    "state": "Enabled",
    "subscriptionId": "fffffff-ffff-ffff-ffff-ffffffffffff",
    "subscriptionPolicies": {
      "locationPlacementId": "Public_2014-09-01",
      "quotaId": "FreeTrial_2014-09-01",
      "spendingLimit": "On"
    }
  }
]

but when I execute the command (list MariaDB SKUs) I get the following error:

$ az mariadb server list-skus --location eastus       
                                                                                  
(SubscriptionNotExists) Subscription 'fffffff-ffff-ffff-ffff-ffffffffffff' does not exist.
Code: SubscriptionNotExists
Message: Subscription 'fffffff-ffff-ffff-ffff-ffffffffffff' does not exist.

Works fine under my other account where I have a pay-as-you-go subscription. Same thing with the go SDK.

If the free trial is the issue it would be great to document it somewhere.

like image 230
chingis Avatar asked Sep 16 '25 03:09

chingis


1 Answers

Turns out you have to register provider resources for your subscription before you can use them. For some reason MariaDB was already registered for one of my accounts but not for the other. The error SubscriptionNotExists is extremely confusing in that regard.

like image 171
chingis Avatar answered Sep 18 '25 16:09

chingis