Make terraform process Map argumented in a sorted manner?

I’m using Terraform Registry azurerm_data_factory_pipeline resource. It accepts a parameters map object, likt this:

 parameters = {
    "source"      = "source"
    "destination" = "destination"

However, upon applying this, I noticed than in azure, the parameters are not added in the order I have them in my terraform code. Upon research, it seems that the map order is not guaranteed. I wonder if there is some way to guarantee it?

Hi @AKG,

The provider itself ultimately decides which data type to use, which then implies how the result can be used. If a provider selects a map type then that implies that the collection is unordered.

As a user of the provider you cannot force the provider to treat it as ordered. If the remote system treats these items as ordered while the provider does not, then I would suggest opening an issue in the provider’s GitHub repository to discuss that inconsistency, so the the provider team can consider changing the provider to better match the API it is wrapping.

I see, then I will turn to the provider instead, hopefully it is possible to fix!