Azure / deployment-stacks

Contains Deployment Stacks CLI scripts and releases
MIT License
87 stars 6 forks source link

Cannot set empty tag value on deployment stack #115

Closed slavizh closed 12 months ago

slavizh commented 1 year ago

I get the the following error:

New-AzManagementGroupDeploymentStack: Cannot validate argument on parameter 'Tag'. The argument is null, empty, or an element of the argument collection contains a null value. Supply a collection that does not contain any null values and then try the command again.

if the tag value is:

-Tag @{}

On all stack commands. You should be able to clear tags with empty value.

dantedallag commented 1 year ago

Yes, you are correct; this is a bug. A fix for this will be part of the next release.

For now, tags can be cleared by not passing in a tag value on an update. In the next release, an empty tag list being passed in will clear tags and not passing in a tag value will be a no-op.

dantedallag commented 12 months ago

@slavizh This should be fixed as I described in the newest release.