thousandeyes / terraform-provider-thousandeyes

ThousandEyes Terraform Provider
Apache License 2.0
21 stars 26 forks source link

fix: alert rule and tests association #167

Closed brumarqu-te closed 3 months ago

brumarqu-te commented 3 months ago

fixes #158

Changes the alert rule test_ids schema attribute to be computed so that it is not considered in the TF plan. Also, since the alert rule returns a field tests when getting by id and receives a field testIds when updating the alert rule, had to implement a map from the GenericTest to get only the testId.

One drawback of this approach (not a huge one IMO) is that the state may not always be accurate. This is because a test <-> alert rules association can be changed from the test perspective and not get reflected on the alert rule perspective. Anyways, it will eventually update the state when the next alert rule update is performed.

The compilation and test failure is because the following PR needs to be merged and released and then updated the version here: https://github.com/thousandeyes/thousandeyes-sdk-go/pull/122

brumarqu-te commented 3 months ago

closing in favour of https://github.com/thousandeyes/terraform-provider-thousandeyes/pull/168