Hello,
I’m newbie in TF templates, just trying to resolve following scenario: need to create multiple AzureServiceBus topics with subscriptions (one to any). Each subscription can contain one to N rules. I just want to manage topics, subscriptions and rules on one place. My idea was to have config file holding required objects configuration and looking somehow as following sample (names used in the example are just placeholders, the topics sesction would finally definitelly have more than one topic)
"topics": [
{
"topicName": "test-topic1",
"subscriptions":[
{
"subsriptionName":"to-test",
"rules":[
{
"rule":{
"ruleFilterExpression" : "TARGET='TEST'",
"ruleActionExpression" :"",
"ruleSuffix":"-for-TEST"
}
}
],
"subscriptionSettings":{
"status": "Disabled"
}
},
{
"subsriptionName":"from-test",
"rules":[
{
"rule":{
"ruleFilterExpression" : "SOURCE='TEST'",
"ruleActionExpression" :"",
"ruleSuffix":"-to-TEST"
}
}
],
"subscriptionSettings":{
"status": "Disabled"
}
}
]
}
]
}
I already tried to create such deployment using ARM template but failed as wasn’t able to create nested loops there… I found that TF supports nested loops bud didn’t find any example similar to above described so the question is if I would be able to accomodate my above usecase using TF template. Can somebody pls. help?
Thanks
Jan Kreuz