Skip to content

AzureCLI@2 Fails to Provision VM in USGov Cloud with Version 2.71.0 #31241

@kady1711

Description

@kady1711

Describe the bug

When using the AzureCLI@2 task with Azure CLI version 2.71.0 to provision a virtual machine in the US Government cloud, the task fails to locate VM images that are available in the USGov cloud image gallery. However, the same operation works correctly when using Azure CLI version 2.70.0.

Related command

Steps to Reproduce
Set the Azure cloud to AzureUSGovernment using az cloud set --name AzureUSGovernment.

Use AzureCLI@2 with version 2.71.0 to provision a virtual machine in the USGov cloud.

Specify an image from the USGov cloud image gallery.

Execute the provisioning task.

Errors

Actual Behavior
The task fails with an error stating that the VM image cannot be found in the USGov cloud image gallery.

Issue script & Debug output

VM image cannot be found in the USGov cloud image gallery.

Expected behavior

Expected Behavior
The VM provisioning task should successfully locate and use the specified image from the USGov cloud image gallery.

Environment Summary

Environment Details
Azure CLI Task Version: AzureCLI@2

Azure CLI Version: 2.71.0 (failing) vs 2.70.0 (working)

Cloud: AzureUSGovernment

Error Location: VM Image Gallery in USGov Cloud

Additional context

Workaround
Downgrading to Azure CLI version 2.70.0 resolves the issue, and provisioning works as expected.

Additional Notes
The issue appears specific to version 2.71.0 of Azure CLI and its handling of VM images in the USGov cloud environment.

This may be related to differences in how commands or API calls interact with the USGov cloud, as noted in similar cases where commands need adjustments for this environment.

Request for Resolution
Please investigate and address this regression in version 2.71.0 of Azure CLI to ensure compatibility with VM provisioning tasks in the USGov cloud.

Thank you!

Metadata

Metadata

Assignees

Labels

Azure CLI TeamThe command of the issue is owned by Azure CLI teamcustomer-reportedIssues that are reported by GitHub users external to the Azure organization.questionThe issue doesn't require a change to the product in order to be resolved. Most issues start as that

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions