Closed ewall closed 2 years ago
Thanks for the feedback @ewall. We appreciate the detailed description and possible solution. We had a similar issue in the past that was fixed in #27 , but this seems to not have fixed the whole problem. We will check this one and get back to you.
Fix available in v2.5.2
.
Much appreciated! 💯
Every time I do a new
terraform plan
(or apply) on a module that uses thecyral_datamap
component, terraform wants to update that resource with the same list of mapping.data_location.attributes, but in a different order, like this (simplified for visibility):It seems that each time terraform plans it shows a different order for the current state of the attributes lists that it wants to remove. For example, if I plan again it may suggest that the old state it wants to overwrite it now something like this:
I find this extra confusing since the
schema.TypeList
that I see in the code should be ordered, according to the terraform developer documentation.(I do understand that terraform maps do not guarantee order, but that doesn't seem to be the problem here -- it's the order within the list of attributes.)
Presumably we could use terraform's lifecycle
ignore_changes
option to prevent this reordering every time, but that's counter-intuitive here as these datamaps will need to change over time as the database changes.I have observed this issue on the current version of the Cyral provider available at this time (2.5.1) and an older one (2.0.1).