Azure / azure-cli

Azure Command-Line Interface
MIT License
4.01k stars 2.98k forks source link

az keyvault -- vaults operations fail in AzureUSGovernment #18006

Closed glennmusa closed 3 years ago

glennmusa commented 3 years ago

This is autogenerated. Please review and update as needed.

Describe the bug

Unable to run az keyvault create or az keyvault show in AzureUSGovernment because the preview API 2021-04-01-preview is not available.

Here's the output from az provider show --namespace Microsoft.KeyVault --query "resourceTypes[?resourceType=='vaults']":

[
  {
    "aliases": null,
    "apiProfiles": [
      {
        "apiVersion": "2016-10-01",
        "profileVersion": "2019-03-01-hybrid"
      }
    ],
    "apiVersions": [
      "2019-09-01",
      "2018-02-14-preview",
      "2018-02-14",
      "2016-10-01",
      "2015-06-01"
    ],
    "capabilities": "CrossResourceGroupResourceMove, CrossSubscriptionResourceMove, SupportsTags, SupportsLocation",
    "defaultApiVersion": "2019-09-01",
    "locationMappings": null,
    "locations": [
      "USGov Virginia",
      "USGov Iowa",
      "USDoD Central",
      "USDoD East",
      "USGov Texas",
      "USGov Arizona"
    ],
    "properties": null,
    "resourceType": "vaults"
  }
]

Command Name az keyvault create

Errors:

(NoRegisteredProviderFound) No registered resource provider found for location 'usgovvirginia' and API version '2021-04-01-preview' for type 'vaults'. The supported api-versions are '2015-06-01, 2016-10-01, 2018-02-14-preview, 2018-02-14, 2019-09-01'. The supported locations are 'usgovvirginia, usgoviowa, usdodcentral, usdodeast, usgovtexas, usgovarizona'.

To Reproduce:

Steps to reproduce the behavior. Note that argument values have been redacted, as they may contain sensitive information.

Expected Behavior

Vault operations succeed.

Environment Summary

Linux-4.15.0-1113-azure-x86_64-with-debian-10.2 (Cloud Shell)
Python 3.6.10
Installer: DEB

azure-cli 2.23.0

Extensions:
ai-examples 0.2.5
ssh 0.1.5

Additional Context

ghost commented 3 years ago

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @RandalliLama, @schaabs, @jlichwa.

Issue Details
### **This is autogenerated. Please review and update as needed.** ## Describe the bug Unable to run `az keyvault create` or `az keyvault show` in AzureUSGovernment because the preview API `2021-04-01-preview` is not available. Here's the output from `az provider show --namespace Microsoft.KeyVault --query "resourceTypes[?resourceType=='vaults']"`: ```json [ { "aliases": null, "apiProfiles": [ { "apiVersion": "2016-10-01", "profileVersion": "2019-03-01-hybrid" } ], "apiVersions": [ "2019-09-01", "2018-02-14-preview", "2018-02-14", "2016-10-01", "2015-06-01" ], "capabilities": "CrossResourceGroupResourceMove, CrossSubscriptionResourceMove, SupportsTags, SupportsLocation", "defaultApiVersion": "2019-09-01", "locationMappings": null, "locations": [ "USGov Virginia", "USGov Iowa", "USDoD Central", "USDoD East", "USGov Texas", "USGov Arizona" ], "properties": null, "resourceType": "vaults" } ] ``` **Command Name** `az keyvault create` **Errors:** ``` (NoRegisteredProviderFound) No registered resource provider found for location 'usgovvirginia' and API version '2021-04-01-preview' for type 'vaults'. The supported api-versions are '2015-06-01, 2016-10-01, 2018-02-14-preview, 2018-02-14, 2019-09-01'. The supported locations are 'usgovvirginia, usgoviowa, usdodcentral, usdodeast, usgovtexas, usgovarizona'. ``` ## To Reproduce: Steps to reproduce the behavior. Note that argument values have been redacted, as they may contain sensitive information. - `az cloud set -n AzureUSGovernment` - `az keyvault create -n {} -g {} -l {}` ## Expected Behavior Vault operations succeed. ## Environment Summary ``` Linux-4.15.0-1113-azure-x86_64-with-debian-10.2 (Cloud Shell) Python 3.6.10 Installer: DEB azure-cli 2.23.0 Extensions: ai-examples 0.2.5 ssh 0.1.5 ``` ## Additional Context
Author: glennmusa
Assignees: -
Labels: `KeyVault`, `Service Attention`, `needs-triage`
Milestone: -
yungezz commented 3 years ago

Checking with Keyvault service team on feature parity support among different clouds. cc @fengzhou-msft @houk-ms for awareness.

glennmusa commented 3 years ago

For others who stumble upon this issue, a workaround specific to these commands is setting the profile version:

az cloud set --name AzureUSGovernment --profile 2020-09-01-hybrid
glennmusa commented 3 years ago

Any updates @yungezz ?

Setting a previous profile version works specifically for this set of commands, but switching profiles between calls to other command groups isn't ideal.

evelyn-ys commented 3 years ago

@glennmusa CLI can hardly help with this until service ready in AzureUSGovernment😟 @amitbapat Could you help update the status here if service ready?

amitbapat commented 3 years ago

Key Vault resource type 'vault' has been available in Azure US Gov for several years now.

evelyn-ys commented 3 years ago

Key Vault resource type 'vault' has been available in Azure US Gov for several years now.

Thanks for confirmation. According to the error response:

No registered resource provider found for location 'usgovvirginia' and API version '2021-04-01-preview' for type 'vaults'.

Does that mean 'vaults' has been available but not for API version '2021-04-01-preview'? Since the response also says that:

The supported api-versions are '2015-06-01, 2016-10-01, 2018-02-14-preview, 2018-02-14, 2019-09-01'.

Gentle ask for further confirmation and updates 😃 @amitbapat

amitbapat commented 3 years ago

Adding @Ashok @.> and @Chandan @.>

Get Outlook for iOShttps://aka.ms/o0ukef


From: Yishi Wang @.> Sent: Thursday, June 10, 2021 10:09:11 PM To: Azure/azure-cli @.> Cc: Amit Bapat @.>; Mention @.> Subject: Re: [Azure/azure-cli] az keyvault -- vaults operations fail in AzureUSGovernment (#18006)

Key Vault resource type 'vault' has been available in Azure US Gov for several years now.

Thanks for confirmation. According to the error response:

No registered resource provider found for location 'usgovvirginia' and API version '2021-04-01-preview' for type 'vaults'.

Does that mean 'vaults' has been available but not for API version '2021-04-01-preview'? Since the response also says that:

The supported api-versions are '2015-06-01, 2016-10-01, 2018-02-14-preview, 2018-02-14, 2019-09-01'.

Gentle ask for further confirmation and updates 😃 @amitbapathttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Famitbapat&data=04%7C01%7Camit.bapat%40microsoft.com%7Ccc1e387df643451deb3008d92c970c99%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637589849532165775%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=IMpWTbDYdol%2FAUaq3JQKNhGmz0lyeO3dxAmB3c29GKI%3D&reserved=0

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FAzure%2Fazure-cli%2Fissues%2F18006%23issuecomment-859269230&data=04%7C01%7Camit.bapat%40microsoft.com%7Ccc1e387df643451deb3008d92c970c99%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637589849532175765%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=sQSTMbUgjjEL33Hy77IA6lQJNt46tUm3ZhR%2BUMoOXOY%3D&reserved=0, or unsubscribehttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAEO763GTJRW3P6VM5MZ57FDTSGK7PANCNFSM44K3OTMQ&data=04%7C01%7Camit.bapat%40microsoft.com%7Ccc1e387df643451deb3008d92c970c99%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637589849532185761%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=4MzFhFNt2TkY28BCdiQFYqIY4khzjiLjh14tx%2BmIa0k%3D&reserved=0.

amitbapat commented 3 years ago

See incident Incident-241704977 Details - IcM (microsofticm.com)https://portal.microsofticm.com/imp/v3/incidents/details/241704977/home

The workaround is to override the default profile in latest CLI

az cloud set --name AzureUSGovernment--profile 2020-09-01-hybrid

From: Amit Bapat @.> Sent: Friday, June 11, 2021 7:56 AM To: Azure/azure-cli @.>; Azure/azure-cli @.>; Ashok Chandrasekaran @.>; Chandan Reddy @.> Cc: Mention @.> Subject: Re: [Azure/azure-cli] az keyvault -- vaults operations fail in AzureUSGovernment (#18006)

Adding @Ashok @.> and @Chandan @.>

Get Outlook for iOShttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Faka.ms%2Fo0ukef&data=04%7C01%7CAshok.Chandrasekaran%40microsoft.com%7Cb3d3d98e429b46e5604508d92ce8ffd3%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637590201514345081%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=thBmckL%2B5RuYqxhHgfULxhuY6cWRZHx1kA7WbEflkvY%3D&reserved=0


From: Yishi Wang @.**@.>> Sent: Thursday, June 10, 2021 10:09:11 PM To: Azure/azure-cli @.**@.>> Cc: Amit Bapat @.**@.>>; Mention @.**@.>> Subject: Re: [Azure/azure-cli] az keyvault -- vaults operations fail in AzureUSGovernment (#18006)

Key Vault resource type 'vault' has been available in Azure US Gov for several years now.

Thanks for confirmation. According to the error response:

No registered resource provider found for location 'usgovvirginia' and API version '2021-04-01-preview' for type 'vaults'.

Does that mean 'vaults' has been available but not for API version '2021-04-01-preview'? Since the response also says that:

The supported api-versions are '2015-06-01, 2016-10-01, 2018-02-14-preview, 2018-02-14, 2019-09-01'.

Gentle ask for further confirmation and updates 😃 @amitbapathttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Famitbapat&data=04%7C01%7CAshok.Chandrasekaran%40microsoft.com%7Cb3d3d98e429b46e5604508d92ce8ffd3%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637590201514355054%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=AZtAsYntLsf6U4mjlMVYsNmbIt6UlEIJlpXpJcORDqY%3D&reserved=0

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FAzure%2Fazure-cli%2Fissues%2F18006%23issuecomment-859269230&data=04%7C01%7CAshok.Chandrasekaran%40microsoft.com%7Cb3d3d98e429b46e5604508d92ce8ffd3%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637590201514355054%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=NI%2FMV6yVgBw1bwu6kn4bzapLQlTfS59uU5hGrY7K090%3D&reserved=0, or unsubscribehttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAEO763GTJRW3P6VM5MZ57FDTSGK7PANCNFSM44K3OTMQ&data=04%7C01%7CAshok.Chandrasekaran%40microsoft.com%7Cb3d3d98e429b46e5604508d92ce8ffd3%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637590201514365006%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=WY8gD3QHtBFta6%2BQR9%2FRMmahB1Q6R7Flp2giJOOfBd0%3D&reserved=0.

glennmusa commented 3 years ago

Yes, that works as a workaround. The behavior is still broken out of the box and references a Preview API that is not available in other clouds.

glennmusa commented 3 years ago
The supported api-versions are '2015-06-01, 2016-10-01, 2018-02-14-preview, 2018-02-14, 2019-09-01'.

Gentle ask for further confirmation and updates 😃 @amitbapat

This is correct @evelyn-ys vaults have been available for some time now -- the API version the keyvault commands currently use is in Preview and is not available in AzureUsGovernment.

evelyn-ys commented 3 years ago

According to the email thread, @adarce is working on adding 2021-04-01-preview to arm manifest and deploying to Fairfax! If any updates, pls sync here🌺

glennmusa commented 3 years ago

az keyvault working in AzureUsGovernment on az v2.25 -- thanks for the help @adarce @amitbapat @yungeez @evelyn-ys