-
-
Notifications
You must be signed in to change notification settings - Fork 71
Description
It came to our attention that when any updates are made on tax rates within a tax category manually, CommerceTools (CT) changes the ID of the Tax Rate itself. Consequently, when Terraform attempts to locate a tax category rate using the saved ID in it's statefile, discrepancies arise due to the manual update of taxRates. As a result, Terraform attempts to create a new tax category rate because as far as terraform is concerned the existing tax category rate got deleted somehow. You can view a demonstration of this scenario in the following video [link].
I checked this with commercetools support to clarify if this is an expected behaviour from commercetools or is it a bug. According to them, this is an expected behaviour because this is actually a replace action rather than update action so it is expected to have a change in the Id.
Their recommendation is to use Tax Rate Key instead of Tax Rate Id, as the earlier remains same during a Tax Rate update.