-
Notifications
You must be signed in to change notification settings - Fork 16
Idempotence in "instana_alerting_config" only with priorities/event_filter_event_types in alphabetical order #43
Comments
The root cause of this issue is the terraform data type. The data is stored in a list which is ordered. As we update the state is updated with the data coming from instana api, the order might change if instana is not returning the exact same order. As an alternative the data type could be kept but the state is not getting updated with the data coming from instana. The only benefit of this approach would be to avoid a state migration. However I think changing the data type is the better approach. |
The issue applies to the following resources:
For all of them, the items should be unique and Instana API might change the order. This exactly matches to the set behaviour of terraform (see also https://www.terraform.io/docs/extend/schemas/schema-types.html) |
#43 all mentioned fields are now migrated to sets to support unique elements and do not depend on the order
@ppuschmann I provided a new version 0.8.2. This version should fix the issue for all the resources mentioned above including the alerting config. Can you please cross check |
I need some time for this, but will come back to you. |
I did check: It works! |
There's a difference between writing
and
If written in the "human"-order of descending priorities /
event_filter_event_types
, you'd constantly get some changes on aterraform apply
:If the priorities /
event_filter_event_types
are defined in alphabetical order, there will be no change.This issue has only low priority.
The text was updated successfully, but these errors were encountered: