Skip to content

Transient failures when deploying a module that deploys a module #4852

Answered by brwilkinson
vexingpos asked this question in Q&A
Discussion options

You must be logged in to vote

Since your policy name matches your module name, then you reference it, that should add a dependson in your json template.

  • Be careful with this since if the resource name doesn't match the module name (which is actually the deployment name), below will not work, in that case you need to add the dependson yourself explicitly.
// this should add the dependson: ProductNameTagOnResource_InheritFromRG_IfMissing.name
policyDefinitionId: extensionResourceId(mgId, 'Microsoft.Authorization/policyDefinitions', ProductNameTagOnResource_InheritFromRG_IfMissing.name)

// also for this: taggingInitiative.name
policyDefinitionId: extensionResourceId(mgId, 'Microsoft.Authorization/policySetDefinitions', 

Replies: 1 comment 6 replies

Comment options

You must be logged in to vote
6 replies
@brwilkinson
Comment options

@brwilkinson
Comment options

@vexingpos
Comment options

@brwilkinson
Comment options

@brwilkinson
Comment options

Answer selected by vexingpos
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants