Preflight: warn-only on quota for the Bicep variant#24
Merged
Conversation
Bicep's azd provisionParametersResolver already runs ARM preflight and prints a clean InsufficientQuota with a continue-prompt. The script's hard fail was producing a duplicate diagnostic and blocking azd's better UX. Detect provider from ./azure.yaml. Bicep => warn + continue (exit 0). Terraform => hard fail (exit 6) unchanged, because azapi_resource bypasses ARM preflight and the RP returns the opaque 400 715-123420 instead. Unknown variant (script run outside a variant folder) => hard fail, safe default. Reported by @pamelafox.
This was referenced May 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #23. Follow-up to #21 / #22.
After the previous fix, deploying the Bicep variant with quota exhausted produced two near-identical quota warnings — one from the preflight script, one from azd's own
provisionParametersResolver. Pamela hit this oneastus2after #22:That second message is azd doing its own ARM preflight and prompting the customer to continue. For Bicep, it's the source of truth. The preflight's hard fail just blocks that better UX.
What changes
Both preflight scripts now detect the IaC variant from
./azure.yaml:provider: bicepprovider: terraformazapi_resourceswallows quota into the opaque400 715-123420The marketplace-offer check (exit 4) stays a hard fail in both variants.
Verification
Same
CLAUDE_SONNET_CAPACITY=999request againsteastus2(limit 80):infra-terraform/:infra-bicep/:skills/claude-on-foundry/SKILL.mdand both scripts' header comments are updated to describe the new behavior.