Skip to content

New TaxRates are being created by ignoring existing TaxRates #462

@sebin-vincent-ayata

Description

@sebin-vincent-ayata

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.
image

Their recommendation is to use Tax Rate Key instead of Tax Rate Id, as the earlier remains same during a Tax Rate update.
image

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions