15 Apr 2025 09:56 AM - edited 16 Apr 2025 12:51 PM
Hello,
I am trying to manage the users, groups and policies via Monaco. The numbers of groups to be managed via SAML is large with some minor differnces.
So is there a way to use the go templating or some other way to configure the groups in Monaco with some loop iteration?
Solved! Go to Solution.
15 Apr 2025 10:10 AM
Hello @AntonPineiro ,
I have seen the mentioned documentation, but I wanted to check for templating options.
Example, - Configure 10 SAML groups with the same default policy.
In this case, I have to add 10 items under the groups. I was looking for an option similar to environment settings where the json file can have templating to perform loops and the yaml can be configured with parameters.
23 Apr 2025 10:16 AM
Not entirely sure of the use case you are describing it sounds like you could reuse the 1 template for all the groups.
But still you can use loops in monaco templating, here is a sample to such configuration https://docs.dynatrace.com/docs/deliver/configuration-as-code/monaco/guides/configuration-as-code-ad...
24 Apr 2025 12:21 PM
I have tried the Monaco templating but that works for the json template file for other configuration. But the account configuration are done directly in the yaml config file. Is there some example which could be used as a reference?
24 Apr 2025 02:28 PM
My bad forgot about the templating in regards to the account configuration, here you have a sample script I have used before to create such entries.
#!/bin/bash
entries=(
"the_innovators"
"creative_collective"
"the_dream_team"
"visionary_voices"
"the_trailblazers"
"unity_squad"
"the_think_tank"
"synergy_circle"
"the_pioneers"
"dynamic_alliance"
)
for entry in "${entries[@]}"; do
cat <<EOL
- name: $entry
id: $entry
description: This is my group
account:
permissions:
- account-viewer
policies:
- Environment role - Access environment
EOL
done
28 Apr 2025 03:36 PM
Thanks @mark_bley for sharing the sample script.
So we need to create the yaml using the script outside Monaco and is not possible directly like in templating option right?
29 Apr 2025 11:16 AM
Yes indeed, that would be an option, afaik for now there is no way to templatize in a large scale account management configurations.