Azure / azure-blueprints

A library of sample Blueprints that can be easily imported via API or PowerShell
MIT License
258 stars 152 forks source link

Creating a blueprint of target scope 'managementGroup' fails #67

Open sflandergan opened 2 years ago

sflandergan commented 2 years ago

I'd like to create a blueprint with target scope managementGroup. The template should then have multiple resourceGroups for statically defined subscriptions. Is this possible?

When I create a blueprint via portal the target scope is always subscription and I have to pick a subscription on assignment. The az command fails completely:

$> az blueprint create -n mgmt-group-test -m "<hidden>" --target-scope managementGroup

(InvalidSchema) Path:properties.targetScope, Schema:#/definitions/SharedBlueprintProperties/properties/targetScope, Error: Value "managementGroup" is not defined in enum.
Code: InvalidSchema
Message: Path:properties.targetScope, Schema:#/definitions/SharedBlueprintProperties/properties/targetScope, Error: Value "managementGroup" is not defined in enum.
alex-frankel commented 2 years ago

It is not possible to have a single blueprint assignment deploy to multiple subscriptions. A blueprint assignment stored at MG scope can still only target one subscription.