-
Hi, can anyone give me a working example of how I can create multiple servicebus queues in multiple servicebus namespaces using the CARML module library? The documentation here seems to say that when creating a servicebus namespace, I can use "queues" as a parameter and give it an array to create a bunch of queues in that namespace. When I do this using these 2 files (rgs is the resources groups i am successfully creating prior to the servicebus namespaces):
with this as the params.json:
... I get an error saying that is expecting a type 'Array' but received a value of type 'Object' So I thought it may be the way the main.bicep file is calling the queues param from the json file, so I tried with this instead, setting the queues param as a array:
and then i get this error: Am I doing this wrong? do I need to call the queues module separately? Is my syntax messed up? Cheers |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
Hi alex-frankel AlexanderSher brwilkinson Is there any help available for CARML? Just wondering if it is worth putting in the time to use it if there isn't much support about for it. Would be a shame. I am prob just not doing something right, as I am still new to it all. I am seeing a similar issues with creating key vault secrets and key vault accessPolicies. So I think I am struggling with creating child resources generally. The docs seem to say I can call these parameters from the parent module, but I don't seem to be able to. I have been able to create the keyvault secrets by doing a separate module call to the '../ResourceModules-0.5.0/arm/Microsoft.KeyVault/vaults/secrets/deploy.bicep' but still having trouble with the access policies. Would be helpful to have examples of how to use these. Thanks again, and if I don't hear anything in a day or 2, I will assume this one will drift in to the ether. |
Beta Was this translation helpful? Give feedback.
-
Hey @ca55ar , sorry for the late reply. Not sure what to make of GitHub's Anyhow, to your question, if it is still relevant: You should absolutely be able to deploy child-modules via there parent. I hope we're talking about the same thing though. What we intend to express is, that you can deploy a KeyVault with AccessPolicies & Secrets using for example the following syntax: module testDeployment '../../deploy.bicep' = {
scope: resourceGroup
name: '${uniqueString(deployment().name)}-test-${serviceShort}'
params: {
name: '<<namePrefix>>${serviceShort}001'
accessPolicies: [
{
objectId: resourceGroupResources.outputs.managedIdentityPrincipalId
permissions: {
keys: [
'get'
'list'
'update'
]
secrets: [
'all'
]
}
tenantId: tenant().tenantId
}
{
objectId: resourceGroupResources.outputs.managedIdentityPrincipalId
permissions: {
certificates: [
'backup'
'create'
'delete'
]
secrets: [
'all'
]
}
}
]
secrets: {
secureList: [
{
attributesExp: 1702648632
attributesNbf: 10000
contentType: 'Something'
name: 'secretName'
roleAssignments: [
{
principalIds: [
resourceGroupResources.outputs.managedIdentityPrincipalId
]
roleDefinitionIdOrName: 'Reader'
}
]
value: 'secretValue'
}
]
}
}
} For all our modules, we run usually multiple tests that are designed to test as many aspects of a module as we possibly can. In that sense it's always worth checking the module's I hope this provided some insights, and again sorry for the late reply. The repository is very active and issues weekly reviewed. I'll see to highlight the |
Beta Was this translation helpful? Give feedback.
-
Regarding the Service Bus: I see an syntactical error in the provided parameters block which likely was the reason for the original error. To recap, you provided the following JSON example "servicebusParams": {
"value": [
{
"name": "sb-fruits",
"location": "northeurope",
"resourceGroupToDeployTo": "rg-1",
"skuName": "Basic",
"queues": {
"Value": [
"banana",
"apple",
"jackfruit"
]
}
},
{
"name": "sb-bikes",
"location": "northeurope",
"resourceGroupToDeployTo": "rg-2",
"skuName": "Basic",
"queues": {
"Value": [
"harley",
"ducati",
"ninja"
]
}
}
]
} The issue here is that the currently common parameter files, only expect a That means, you can remove any 'inner' "servicebusParams": {
"value": [
{
"name": "sb-fruits",
"location": "northeurope",
"resourceGroupToDeployTo": "rg-1",
"skuName": "Basic",
"queues": [
"banana",
"apple",
"jackfruit"
]
},
{
"name": "sb-bikes",
"location": "northeurope",
"resourceGroupToDeployTo": "rg-2",
"skuName": "Basic",
"queues": [
"harley",
"ducati",
"ninja"
]
}
]
}
|
Beta Was this translation helpful? Give feedback.
Hi alex-frankel AlexanderSher brwilkinson Is there any help available for CARML? Just wondering if it is worth putting in the time to use it if there isn't much support about for it. Would be a shame. I am prob just not doing something right, as I am still new to it all.
I am seeing a similar issues with creating key vault secrets and key vault accessPolicies. So I think I am struggling with creating child resources generally. The docs seem to say I can call these parameters from the parent module, but I don't seem to be able to. I have been able to create the keyvault secrets by doing a separate module call to the '../ResourceModules-0.5.0/arm/Microsoft.KeyVault/vaults/secrets/deploy.bic…