Using monaco v2 now which supports settings API.
I want to update existing configurations (starting with management zones) which were configured manually.
According to the documentation the {{.name}} is used to make the comparison (check if it is already there). However, although the names are the same monaco complains…
2023/02/23 16:31:16 ERROR failed to deploy config global:builtin:management-zones:nasca-300REL: failed to upsert dynatrace obj: failed to upsert config "nasca-300REL" after 3 retries: (HTTP 400)!
Response was: [{"code":400,"error":{"code":400,"message":"Validation failed for 1 Validators.","constraintViolations":[{"path":"builtin:management-zones/7/name","message":"Management zone with this name already exists. Please provide a different one."
I found out that actually the externalId is used of a settings object is used. When I change the name of my config it works and we see this via the API
"externalId": "monaco:YnVpbHRpbjptYW5hZ2VtZW50LXpvbmVzJG5hc2NhLTMwMFJFTA==",
"value": {
"name": "NASCA-301REL",
...
The value after monaco: is actually base64 encoded and corresponds with the monaco id. (builtin:management-zones$nasca-300REL)
So, if I could update the externalId via the PUT api it would be solved. However, that does not seem to be supported.
On the other hand, this is a very complex way of dealing with this. I think it should just work “by name” like documented with a fallback to externalId