Issue looping through name array to create resources using a module that calls another module #14235
Replies: 1 comment
-
5 minutes after creating this my coworker identified it was due to the name (deployment name) in the module definition: module.UserAssignedIdentity.bicep param name string
param location string
param tags object
module userAssignedIdentity 'br/public:avm/res/managed-identity/user-assigned-identity:0.2.1' = {
+ name: 'userAssignedIdentityDeployment-{name}'
- name: 'userAssignedIdentityDeployment'
params: {
// Required parameters
name: name
// Non-required parameters
location: location
tags: tags
}
} |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm having looping related issues with some modules I've created. My modules call Azure Verified Modules with parameters customized to my organization. In this example I am trying to create three user assigned identities. When I deploy the rg-test.bicep file it creates three deployments. In each deployment Inputs.name shows the correct name but the outputs for all three deployments shows the same name (and other properties). The name shown there is the resource that actually gets created, the others do not.
I am at a loss at this point and couldn't find the right keywords to google to figure it out. Here are roughly the files that I have. Any suggestions are greatly appreciated.
rg-test.bicep
module.UserAssignedIdentity.bicep
Beta Was this translation helpful? Give feedback.
All reactions