Closed gerrynicol closed 6 months ago
Thanks for reporting. Moving this the Enterprise Scale repo as this is the source of truth for our policies and needs fixing there first and it'll roll down to Bicep & TF 👍
tagging @springstone also
@gerrynicol Took me a bit of time to figure out what is going on here. I think the issue may be related how you are assigning the policy. You are correct, we do not deploy an action group as part of the budget policy, so the action group must exist in order to use it with this policy. Also, if you just provide the action group name, you will get that error (400 Bad Request), you need to provide the full resource ID of the action group like: /subscriptions/mysubscriptionID/resourceGroups/myresourcegroup/providers/microsoft.insights/actiongroups/AGTest
Could you please try again with the full resource ID of the action group?
@Springstone. Nice one. Thanks for looking at that so quickly. Yip, that works a treat :)
What happened? Provide a clear and concise description of the bug, including deployment details.
This custom policy deploys ok when an action group isnt set. When an action group is set in the parameters at time of assignment it fails.
Please provide the correlation id associated with your error or bug.
Resource /subscriptions/xxxxxx/providers/Microsoft.Consumption/budgets/budget-set-by-policy Operation name Create and update budgets Time stamp Wed Apr 24 2024 10:24:23 GMT+0100 (British Summer Time) Event initiated by 6223b87e-5c7e-4767-bf85-f2fbcfaa95f1 Error code 400 Message Bad Request. Request ID: b082aee9-fc42-45f3-9a33-0e0fb4870334
What was the expected outcome?
The Action group should eithe rbe cerated or use an existing Action group tha has already been created in the Subscription and can be referenced by name
Relevant log output
No response
Check previous GitHub issues
Code of Conduct