Skip to content

How does one get outputs from dynamic module outputs #5460

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

You must be logged in to vote

@WhitWaldo

You can always iterate over the same list that was used to execute the module loop.

e.g.

module MyDeployment './myModule.bicep' = [for (dep, index) in deployments: {  // <-- same
  name: 'deployment-${index}'
}]

output DeploymentFQDNs array = [for (dep, index) in deployments: {  // <-- same
  FQDN: MyDeployment[index].outputs.FQDN
}]

Add docs link as well: https://docs.microsoft.com/en-us/azure/azure-resource-manager/bicep/loops#integer-index

Replies: 1 comment 2 replies

Comment options

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

@WhitWaldo
Comment options

Answer selected by WhitWaldo
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