Replies: 4 comments 2 replies
-
Hi @jikuja, This is not a Bicep issue, this is just how the Azure Security Center API behaves. Some APIs have intelligence built-in to handle multiple requests at once, some don't. The way to solve this is to add the batchSize decorator. Ex: @batchSize(1) This will make sure the request to the Security Center API is done sequentially and not in parallel. Create a loop to iterate over the plans to simplify your code. |
Beta Was this translation helpful? Give feedback.
-
Any known documentation for this behaviour? I feel like IaC using deployment API endpoint is being neglected or left fully untested :(
I'm not sure if loop would simplify the code. Because I'm setting different settings for plans and even some subplans:
Copying behaviour of the landing zone resources might be cleaner solution even it will create linter warnings. |
Beta Was this translation helpful? Give feedback.
-
I was facing the same issue, and find out the way that works as expected by creating a module for security/pricings.
the main bicep looks like this:
|
Beta Was this translation helpful? Give feedback.
-
@alex-frankel Do you happen to have a good instructions who to get through first support tiers when opening issues about missing Those can be solved only by the PG and honestly I don't want to use 4-x weeks with level 1 support and their workarounds. Should I try |
Beta Was this translation helpful? Give feedback.
-
Hello all,
The issue
I've tried to deploy following template:
So the template is:
When I try to deploy that template 1-4 resources fail to deploy with following error messages:
This happened for me at least on two tenants and three subscriptions.
Related work
Azure landing zone templating is using dependsOn two deploy
Microsoft.Security/pricing
resources in on by one.I have earlier deployed similar templates without any errors.
Azure Support
Bicep
If this is a well-known issue this should be documented by PG and then maybe Bicep should have linting rule to check if template has well-known issues.
Beta Was this translation helpful? Give feedback.
All reactions