Skip to content

Commit afab6c4

Browse files
author
Thomas De Meyer
authored
Merge pull request #610 from labd/606-project-update-inconsistent-plan
feat: Updated various commercetools projects settings. Made change management more robust
2 parents dbdf2c5 + 33f0d75 commit afab6c4

11 files changed

Lines changed: 498 additions & 306 deletions

File tree

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
kind: Added
2+
body: Updated various commercetools projects settings. Made change management more robust
3+
time: 2025-09-16T12:36:38.546145346+02:00

docs/resources/project_settings.md

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ See also the [Project Settings API Documentation](https://docs.commercetools.com
1717

1818
```terraform
1919
resource "commercetools_project_settings" "my-project" {
20-
key = "my-project-key"
2120
name = "My project"
2221
countries = ["NL", "DE", "US", "CA"]
2322
currencies = ["EUR", "USD", "CAD"]
@@ -30,10 +29,23 @@ resource "commercetools_project_settings" "my-project" {
3029
enabled = true
3130
}
3231
carts {
33-
country_tax_rate_fallback_enabled = true
32+
country_tax_rate_fallback_enabled = false
33+
delete_days_after_last_modification = 10
34+
price_rounding_mode = "HalfUp"
35+
tax_rounding_mode = "HalfUp"
3436
}
37+
38+
shopping_lists {
39+
delete_days_after_last_modification = 100
40+
}
41+
3542
shipping_rate_input_type = "CartClassification"
3643
44+
enable_search_index_products = true
45+
enable_search_index_orders = true
46+
enable_search_index_customers = true
47+
enable_search_index_business_units = true
48+
3749
shipping_rate_cart_classification_value {
3850
key = "Small"
3951
label = {
@@ -53,6 +65,7 @@ resource "commercetools_project_settings" "my-project" {
5365
- `carts` (Block List) [Carts Configuration](https://docs.commercetools.com/api/projects/project#cartsconfiguration) (see [below for nested schema](#nestedblock--carts))
5466
- `countries` (List of String) A two-digit country code as per [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)
5567
- `currencies` (List of String) A three-digit currency code as per [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217)
68+
- `enable_search_index_business_units` (Boolean) Enable the Search Indexing of business units
5669
- `enable_search_index_customers` (Boolean) Enable the Search Indexing of customers
5770
- `enable_search_index_orders` (Boolean) Enable the Search Indexing of orders
5871
- `enable_search_index_product_search` (Boolean) Enable the Search Indexing of products
@@ -64,6 +77,7 @@ resource "commercetools_project_settings" "my-project" {
6477
- `shipping_rate_cart_classification_value` (Block List) If shipping_rate_input_type is set to CartClassification these values are used to create tiers
6578
. Only a key defined inside the values array can be used to create a tier, or to set a value for the shippingRateInput on the cart. The keys are checked for uniqueness and the request is rejected if keys are not unique (see [below for nested schema](#nestedblock--shipping_rate_cart_classification_value))
6679
- `shipping_rate_input_type` (String) Three ways to dynamically select a ShippingRatePriceTier exist. The CartValue type uses the sum of all line item prices, whereas CartClassification and CartScore use the shippingRateInput field on the cart to select a tier
80+
- `shopping_lists` (Block List) [Shopping List Configuration](https://docs.commercetools.com/api/projects/project#ctp:api:type:ShoppingListsConfiguration) (see [below for nested schema](#nestedblock--shopping_lists))
6781

6882
### Read-Only
6983

@@ -87,6 +101,8 @@ Optional:
87101

88102
- `country_tax_rate_fallback_enabled` (Boolean) Indicates if country - no state tax rate fallback should be used when a shipping address state is not explicitly covered in the rates lists of all tax categories of a cart line items
89103
- `delete_days_after_last_modification` (Number) Number - Optional The default value for the deleteDaysAfterLastModification parameter of the CartDraft. Initially set to 90 for projects created after December 2019.
104+
- `price_rounding_mode` (String) Default value for the priceRoundingMode parameter of the CartDraft. Indicates how the total prices on LineItems and CustomLineItems are rounded when calculated.
105+
- `tax_rounding_mode` (String) Default value for the taxRoundingMode parameter of the CartDraft. Indicates how monetary values are rounded when calculating taxes for taxedPrice.
90106

91107

92108
<a id="nestedblock--external_oauth"></a>
@@ -117,3 +133,11 @@ Required:
117133
Optional:
118134

119135
- `label` (Map of String)
136+
137+
138+
<a id="nestedblock--shopping_lists"></a>
139+
### Nested Schema for `shopping_lists`
140+
141+
Optional:
142+
143+
- `delete_days_after_last_modification` (Number) Number - Optional The default value for the deleteDaysAfterLastModification parameter of the CartDraft. Initially set to 90 for projects created after December 2019.

examples/resources/commercetools_project_settings/resource.tf

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
resource "commercetools_project_settings" "my-project" {
2-
key = "my-project-key"
32
name = "My project"
43
countries = ["NL", "DE", "US", "CA"]
54
currencies = ["EUR", "USD", "CAD"]
@@ -12,10 +11,23 @@ resource "commercetools_project_settings" "my-project" {
1211
enabled = true
1312
}
1413
carts {
15-
country_tax_rate_fallback_enabled = true
14+
country_tax_rate_fallback_enabled = false
15+
delete_days_after_last_modification = 10
16+
price_rounding_mode = "HalfUp"
17+
tax_rounding_mode = "HalfUp"
1618
}
19+
20+
shopping_lists {
21+
delete_days_after_last_modification = 100
22+
}
23+
1724
shipping_rate_input_type = "CartClassification"
1825

26+
enable_search_index_products = true
27+
enable_search_index_orders = true
28+
enable_search_index_customers = true
29+
enable_search_index_business_units = true
30+
1931
shipping_rate_cart_classification_value {
2032
key = "Small"
2133
label = {

internal/custommodifiers/booldefault.go

Lines changed: 0 additions & 42 deletions
This file was deleted.

internal/custommodifiers/emptylist.go

Lines changed: 0 additions & 44 deletions
This file was deleted.

0 commit comments

Comments
 (0)