terraform-provider-commercetools
terraform-provider-commercetools copied to clipboard
commercetools_cart_discount to support stores
The commercetools_cart_discount creates cart discounts, but cannot be used to assign those discounts to particular stores.
In the commercetools API the CartDiscountDraft object takes an array of stores, and there are update cart discount actions to add and remove stores.
(There are also APIs for creating and updating a cart discount within a store, but I suggest these are less useful for Terraform.)
Currently, the commercetools terraform provider ignores the stores property of the cart discount, so these can be changed manually after creation and not noticed on updates.