Azure / Azure/azure-cli

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

Open
#31,241 1 comment 0 reactions 1 assignee Claimed by @zhoxing-ms View on GitHub
Azure CLI Team customer-reported potential-pruning question
Dominant language
Python
Stars
4.6k
Forks
3.5k
Avg merge
3d 2h
Merged PRs (30d)
60

Description

### 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!

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.