Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

az consumption budget create failing #29950

Open
letmaik opened this issue Sep 22, 2024 · 2 comments
Open

az consumption budget create failing #29950

letmaik opened this issue Sep 22, 2024 · 2 comments
Labels
bug This issue requires a change to an existing behavior in the product in order to be resolved. consumption Service Attention This issue is responsible by Azure service team.

Comments

@letmaik
Copy link

letmaik commented Sep 22, 2024

Describe the bug

--resource-group-filter doesn't seem to work.

Related command

az consumption budget create --amount 1000 --budget-name ... --category cost --start-date 2024-09-22 --end-date 2025-09-22 --time-grain annually --resource-group-filter abc-rg def-rg --subscription ... --debug

Errors

{"error":{"code":"400","message":"Invalid budget configuration, please use filter interface with 2019-05-01-preview version (Request ID: f93d3dce-0a4b-4f28-b971-d347a23903eb)"}}

Issue script & Debug output

cli.azure.cli.core.sdk.policies: Request URL: 'https://management.azure.com/subscriptions/.../providers/Microsoft.Consumption/budgets/...?api-version=2023-05-01'
cli.azure.cli.core.sdk.policies: Request method: 'PUT'
cli.azure.cli.core.sdk.policies: Request headers:
cli.azure.cli.core.sdk.policies:     'Content-Type': 'application/json'
cli.azure.cli.core.sdk.policies:     'Accept': 'application/json'
cli.azure.cli.core.sdk.policies:     'Content-Length': '248'
cli.azure.cli.core.sdk.policies:     'x-ms-client-request-id': '3b7b38c9-7910-11ef-b199-f3f9b7eefc77'
cli.azure.cli.core.sdk.policies:     'CommandName': 'consumption budget create'
cli.azure.cli.core.sdk.policies:     'ParameterSetName': '--amount --budget-name --category --start-date --end-date --time-grain --resource-group-filter --subscription --debug'
cli.azure.cli.core.sdk.policies:     'User-Agent': 'AZURECLI/2.64.0 (DEB) azsdk-python-core/1.28.0 Python/3.11.8 (Linux-5.15.153.1-microsoft-standard-WSL2-x86_64-with-glibc2.35)'
cli.azure.cli.core.sdk.policies:     'Authorization': '*****'
cli.azure.cli.core.sdk.policies: Request body:
cli.azure.cli.core.sdk.policies: {"properties": {"amount": 1000.0, "category": "cost", "filters": {"resourceGroups": ["def-rg", "abc-rg"]}, "timeGrain": "annually", "timePeriod": {"endDate": "2025-09-21T23:00:00.000Z", "startDate": "2024-09-21T23:00:00.000Z"}}}

Expected behavior

No error.

Environment Summary

$ az version
{
"azure-cli": "2.64.0",
"azure-cli-core": "2.64.0",
"azure-cli-telemetry": "1.1.0",
"extensions": {
"ml": "2.30.1",
"ssh": "2.0.5",
"storage-preview": "1.0.0b4"
}
}

Additional context

No response

@letmaik letmaik added the bug This issue requires a change to an existing behavior in the product in order to be resolved. label Sep 22, 2024
@yonzhan
Copy link
Collaborator

yonzhan commented Sep 22, 2024

Thank you for opening this issue, we will look into it.

@yonzhan yonzhan added consumption Service Attention This issue is responsible by Azure service team. labels Sep 22, 2024
Copy link
Contributor

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @ms-premp.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue requires a change to an existing behavior in the product in order to be resolved. consumption Service Attention This issue is responsible by Azure service team.
Projects
None yet
Development

No branches or pull requests

2 participants