Azure / azure-blueprints

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

What is the reason to require blueprintid in assignment file if Blueprint is already passed to cmdlet? #46

Closed artisticcheese closed 3 years ago

artisticcheese commented 3 years ago

Confused with wording here https://docs.microsoft.com/en-us/azure/governance/blueprints/how-to/manage-assignments-ps#example-2-use-a-json-assignment-definition-file which using assignment file with published blueprint id as part of it. What is reason to have blueprint -Blueprint parameter in such cases since blueprint ID is already part of assignment file itself and is required (Example is below https://docs.microsoft.com/en-us/powershell/module/az.blueprint/new-azblueprintassignment?view=azps-5.2.0#example-4)

alex-frankel commented 3 years ago

You shouldn't have to supply both -Blueprint and -AssignmentFile parameters. It should be either/or. Is that not what you are seeing?

artisticcheese commented 3 years ago

New-AzBlueprintAssignment cmdlet has 2 parameter sets, one with assignment file and another one without it. For parameter set which accepts assignment file why -Blueprint parameter is needed at all?

alex-frankel commented 3 years ago

I think at one point both parameters were required, but we realized it was redundant so we made it optional