Azure / template-specs

MIT License
31 stars 4 forks source link

Allow Duplicate "relativePath" Entries #49

Closed Kittoes0124 closed 3 years ago

Kittoes0124 commented 3 years ago

Background: I have added support in my templates for a set of pre-deployment and post-deployment scripts. Both of these inner deployments depend on a common template called "Microsoft.Resources/deploymentScripts.json". If it is at all useful to you, my source code can be found here.

Issue: Executing the command az ts create --name 'ResourceGroupDeployment' --resource-group 'byteterrace' --template-file 'resourceGroupDeployment.json' --version '1.0.0' --yes results in the error "TemplateSpecVersionInvalidArtifactPath: The artifact path 'Microsoft.Resources/deploymentScripts.json' is not supported. An artifact path should be unique and not contain any expressions."

Temporary Workaround: Removing the post-deployment section of the script before executing the az ts create command and then manually adding it back to the template spec via the Portal UI makes it possible to deploy the template with the exact behavior one would expect.

alex-frankel commented 3 years ago

Closing as the fix for this issue has now been deployed. Installing Az CLI version 2.28.0 should resolve this.

Kittoes0124 commented 3 years ago

Confirmed, thanks!