Open trylvis opened 2 weeks ago
Have you considered using modules to model your scenario? You can start with a management group target scope deployment that triggers modules, each module is downscoped to the subscription and resource group using the scope
property of a module
Is your feature request related to a problem? Please describe.
In multi-tenant, multi-subscription environments, deploying Bicep templates requires switching Azure contexts frequently. Currently, we maintain a
bicepparam
file for each deployment, which includes most of the necessary parameters. However, specifying "Subscription ID" and "Tenant ID" is done externally, and we need to useaz account set
every time we switch tenants or subscriptions. This process can be cumbersome and error-prone.Describe the solution you'd like
It would be helpful if
subscriptionId
andtenantId
could be specified directly within thebicepparam
file. Theaz deployment create
command could then check these values inbicepparam
for deployment context, defaulting to the current Azure CLI context if they aren’t provided.This way, instead of first running
az account set
to adjust the context, then runningaz deployment create
, we would only need to runaz deployment create
with context pulled directly from the parameter file, simplifying multi-environment deployments and reducing potential for errors.