Monaco 2.0 - Problem with management zone configuration (update instead of create) #916
-
Hi everyone, management-zone.yaml
management-zone.json
And this is the result of the first execution :
There are no problems so far. The management zone has been created correctly in Dynatrace. But when I re-execute the command by changing the environment variables with other values, the existing management zone is updated :
Is it the expected behaviour ? Indeed, I expected monaco to create a new MZ instead of updating the existing one because the names are different. But monaco use the same "externalId" to update the existing object and I don't understand why. management-zone.yaml
I also tried with this syntax but without any success. Regards, |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
Hi @mackermann2 yes this is expected behavior. Settings 2.0 objects are not identified by there name, but via the externalID you also see in the log output. externalID is based on the schemaId and the Monaco configID. You will need to be explicit, and define more than one config Note: The templating tried in @mackermann2 's reply to this does not work. We assume that the ID in the file is unique, and there is no built-in way to define variables in it. For an alternative external way to achieve the desired templating see: |
Beta Was this translation helpful? Give feedback.
-
I thought that it was OK but I probably forgot to delete the management zones from the Dynatrace UI and created in my previous tests... Edit: or add all the new entries in the same YAML file but with a static value for config id for each MZ that I would like to create |
Beta Was this translation helpful? Give feedback.
-
Hi, mgt-zone-template-yaml.txt
where I modify the string "##MGT_ZONE_NAME##" from an external bash script (with sed command) with the value I want :
It works well for me. |
Beta Was this translation helpful? Give feedback.
Hi @mackermann2
yes this is expected behavior.
Settings 2.0 objects are not identified by there name, but via the externalID you also see in the log output.
externalID is based on the schemaId and the Monaco configID.
So even if you change the name via different environment variables, the configID will stay "create-ManagementZone" and result in the same object being identified and updated.
You will need to be explicit, and define more than one config
Note: The templating tried in @mackermann2 's reply to this does not work.
We assume that the ID in the file is unique, and there is no built-in way to define variables in it.
The general assumption here is that these files are the config as…