log-analytics extension v1.0.0b1 does not support Azure US Government Cloud #8202
Labels
Auto-Assign
Auto assign by bot
Azure CLI Team
The command of the issue is owned by Azure CLI team
Code Gen
customer-reported
Issues that are reported by GitHub users external to the Azure organization.
Monitor
question
The issue doesn't require a change to the product in order to be resolved. Most issues start as that
Milestone
Describe the bug
When adding the log-analytics extension to a fresh install of azure cli using
az extension add --name log-analytics
this defaults to installing the newest version of the extension1.0.0b1
. Unfortunately, this version does not presently support azure us government cloud. When the extension was switched over to using AAZ CodeGen, it looks like the scopes and host lists were updated to only support standard azure cloud environments.azure-cli-extensions/src/log-analytics/azext_loganalytics/aaz/latest/_clients.py
Lines 16 to 23 in 9ec9484
I believe the generated code needs to be something closer to this for the extension to work with Azure US Government cloud.
If I manually patch the extension to the above, then it works properly.
Related command
az monitor log-analytics query --workspace $WORKSPACE --timespan $TIMESPAN --analytics-query $QUERY
Errors
Fails with no error message and exit code 1
Issue script & Debug output
Some personal information replaced with tokens starting with
$
belowExpected behavior
Command should connect to the log analytics API endpoint in Azure US Government and return log entries.
Environment Summary
Additional context
I can work around this by manually downgrading fresh installs to the prior version
0.2.2
before AAZ Codegen was introduced usingaz extension add --name log-analytics --version 0.2.2 --upgrade
The text was updated successfully, but these errors were encountered: