01 Sep 2023 01:44 PM
Hi All,
I was trying to update multiple alerting profiles in an environment.
For now, i have done it with an offline automation that involves Settings API.
(Settings API - PUT an object | Dynatrace Docs)
But this option updates the Settings schema one by one, as we need to update the Object Id in the above API for each of the profile.
I was looking for a more one stretch solution. Even tried using monaco deploy, but seems monaco can create but not update existing settings.
Let me know if there is any other method i can go with.
Thanks
Solved! Go to Solution.
02 Sep 2023 09:20 AM - edited 02 Sep 2023 09:26 AM
Try to use Terraform
if you need just replace some things bulk replace could be faster rather than parsing
https://registry.terraform.io/providers/dynatrace-oss/dynatrace/latest/docs/data-sources/alerting_pr...
to make a deal with existed config you need to do initial steps:
0. Create config with module, execute terraform init
1. Export module (from remote api)
2. Import all resources into state (accept remote files into local state)
3. Than you can make changes and send to Dynatrace with terraform plan and apply
04 Sep 2023 11:55 AM
@Viachaslau , never knew we could use terrarform for this.
This should work. Let me try it out this week.