-
-
Notifications
You must be signed in to change notification settings - Fork 71
Open
Labels
enhancementNew feature or requestNew feature or request
Description
We have created a separate resource for the rates within a tax category.
So now to define a tax category you need:
resource "commercetools_tax_category" "my-tax-category" {
name = "Standard tax category"
description = "Example category"
}
resource "commercetools_tax_category_rate" "standard-tax-category-DE" {
tax_category_id = commercetools_tax_category.my-tax-category.id
name = "19% MwSt"
amount = 0.19
included_in_price = false
country = "DE"
sub_rate {
name = "example"
amount = 0.19
}
}
In commercetools there is only one resource: the category. By splitting them in terraform in two separate resources we created a 'virtual' resource which does all the actions on the tax category referenced in the resource. So create,update and delete are all updates on the tax category resource.
Alternative approach:
resource "commercetools_tax_category" "my-tax-category" {
name = "Standard tax category"
description = "Example category"
rate {
name = "19% MwSt"
amount = 0.19
included_in_price = false
country = "DE"
sub_rate {
name = "example"
amount = 0.19
}
}
}
onur9, okkevandereijk and martudev
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request