All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, adheres to Semantic Versioning, and is generated by Changie.
- Fixed default shipping_method active field
resource_api_client
add support for setting and managing token validity via Terraform.- Added the attribute ShippingMethod.active to the resource shipping_method.
- chore(deps): bump the go group with 6 updates
- chore(deps): bump actions/add-to-project from 0.5.0 to 1.0.2 in the github-actions group
- chore(deps): bump the go group with 6 updates
- chore(deps): bump codecov/codecov-action from 4 to 5 in the github-actions group
- Added handling of product search and customer search indexes
- Added stores to cart discounts
- chore(deps): bump labd/changie-release-action from 0.4.0 to 0.5.0 in the github-actions group
- chore(deps): bump the go group with 4 updates
resource_api_extension
add support for triggers on `shopping-list``
- Fixed shipping_zone_rate freeAbove handling when empty
- chore(deps): bump the go group with 5 updates
- Added resources for associate role and business units and extended project setting options
- chore(deps): bump the go group across 1 directory with 9 updates
- chore(deps): bump the github-actions group across 1 directory with 7 updates
- chore(deps): bump golang.org/x/net from 0.22.0 to 0.23.0
- chore(deps): bump the go group with 3 updates
- chore(deps): bump actions/add-to-project from 0.5.0 to 1.0.1 in the github-actions group
- Added documentation hint on importing commercetools_shipping_zone_rate
- Properly handle resource not found errors for
subscription
,state
,state_transitions
,product_selection
,attribute_group
andassociate_role
.
- Added support for confluence cloud subscriptions
- Updated documentation
- Added more support for IETF BCP 47 language tags
- Added support for totalPrice target on cart_discount resource
- update to latest commercetools go sdk
- Code cleanup
- Added additional check for unset values on discount_code resource
- ensure an empty slice is set if subscription messages or changes are removed
- fixed check on project ExternalOAuth setting when processing state and plan differences
- Updated deprecated code
- Add new resource
commercetools_product_selection
- Add property
product_selection
tocommercetools_store
for binding product selections to stores
- prevented issue with bool valueunknown check
- Custom Field Unset Causing Provider Crash
- Added fix to update countryTaxRateFallbackEnabled separately
- NotFound error not handled correctly
- Change store countries to set type
- Added associate role resource
- Fixed bad handling of secrets on subscription import
- Fixed forced replacement issue in commercetools_category when name or key change
- Fixed custom field encoding with non-string field values
- Added correct handling of azure_authentication to prevent unnecessary updates
- Added custom field for cart discount
- New data source: commercetools_state
- commercertools_api_extension: added googlecloudfunction as option
- commercertools_cart_discount: added multiBuyLineItems and multiBuyCustomLineItems
- commercertools_store: added countries field
- commercertools_type: doc changes to source files
- commercertools_cart_discount: fixed money list issue
- New resource:
commercetools_attribute_group
- Fix discount_code resource when no predicate is given
- fix: remove duplicate project_key in example. (#350)
- chore: update to latest packages
- fix: set
URI
for destination of EventGrid (#364) - fix: improve README for local run (#370)
resource_subscription
Fix handling of missing subscriptions available in the state but not in commercetools. (#345)
resource_subscription
Fix removing requirement to specifyaccess_key
when theaccess_secret
is defined. The latter is only needed for EventGrid.
resource_project
Add extra checks to make sure we have amessage
block before reading it(#340)
resource_subscription
Remove requirement to specifyaccess_key
when theaccess_secret
is defined. The latter is only needed for EventGrid.
- Add new data source data
commercetools_type
to retrieve information about a type based on the key.
resource_subscription
fix issue in the state upgrader when upgrading from schema version 0 to 1.resource_state
fix handling of both the name and description attributes.
resource_subscription
fix theGoogleCloudPubSub
integration where the wrong topic value was used (#337).resource_project_settings
fix continous terraform updates for theshipping_rate_cart_classification_value
block (#335)
resource_state
rewrite both thestate
andstate_transitions
resource and move the code to the new plugin-framework. This should fix some related to mismatching version values by always refreshing these. (#333)
resource_project_settings
fix validation of values for thedelete_days_after_creation
field (should be between 1-90)resource_subscription
fix errors when theformat
block was missing (#331)
resource_project_settings
migrate the resource to the new terraform-plugin-framework.resource_project_settings
add propertydelete_days_after_creation
to themessages
block (#322)resource_subscription
Support using IAM authentication for SQS and SNS by making the access_key and access_secret attributes optional. (#316)resource_subscription
migrate the resource to the new terraform-plugin-framework.resource_subscription
fix handling of changes in theconnection_string
value when theAzureServiceBus
is used (#320)resource_api_extension
add support for triggers onbusiness-unit
,quote-request
,quote
,staged-quote
(#326)
resource_state_transitions
fix error when we tried to set the transitions value to a value already set in commercetools, causing an error. See #312resource_state_transitions
add support for importing existing state transitions
-
resource_state_transitions
New resource to manage transitions between states. This was previously part of theresource_state
but that made it imposible to have recursive transitions. This means thattransitions
attribute is now removed from theresource_state
resource.example:
// Only allow transition from sale to clearance
resource "commercetools_state_transitions" "transition-1" {
from = commercetools_state.product_for_sale.id
to = [
commercetools_state.product_clearance.id,
]
}
See #86 for more information
resource_shipping_zone_rate
Add support forprice_function
when the type isCartScore
(#202)
- Additional fixes to setting custom field values on supported resources. (#303)
resource_api_extension
Fix handling masked values forazure_authentication
(#306)resource_subscription
Fix handling masked values forevent_grid
(#306)
- Fix setting custom field values on supported resources when the fiedl type is a set (#299)
resource_product_type
fix parsing the enums from the state file (#294)
resource_product_discount
new resource to manage product discounts (#266)resource_subscription
: Fix a bug where remove thechanges
ormessages
from the resource was resulting in an invalid request. (#138)resource_shipping_zone_rate
Fix persisting the shipping rate tiers in the terraform state (#184)resource_api_extension
Fix handling of retrieving secrets from commercetools (#284)resource_subscription
Fix handling changes in bothchanges
andmessages
attributes (#138)- Fix setting custom fields on the various resources when the type is not a string (#289)
-
Backwards incompatible Use a list type for enum values instead of a map to keep the ordering intact. This change requires an update to the way the values are defined (#98, #278):
type { name = "enum" values { FLAG-1 = "Flag 1" FLAG-2 = "Flag 2" } }
to
type { name = "enum" value { key = "FLAG-1" label = "Flag 1" } value { key = "FLAG-2" label = "FLAG-2" } }
-
Update documentation and examples
-
Add support for custom fields on category, channel, customer_group, discount_code, shipping_method and store resources. (#265)
-
Improve logic to set the user-agent used in the requests. We now use the provider version. For example:
User-Agent: terraform-provider-commercetools/1.3.0 (bd9cae0)
-
Improve the error handling by better communicating the errors raised by commercetools.
-
Accept a trailing slash in the token url (#182)
-
Large rewrite of the
type
andproduct_type
resources to fix a number of issues (#165, #262, #263, #267)
- Fix api_extension resource to not error out when the new condition field is not defined. (#261)
- Fix shipping_zone locations ordering by switching to a set instead of a list of locations (#259)
- Add aliases for destination and platform on subscription and extension resources (#245, #247, #251)
- Add condition field to api extension resource
- Add support for terraform import on the api_extension resource
- Improve error handling, show errors returned by commercetools in terraform output.
- Fix out of bounds error in the commercetools_type resource (#241)
- Handle changes to access_secret in api_extension resource (#243)
- Minor release to fix hash error
- Use terraform plugin sdk v2. This changed required various changes and should have made the codebase more robust.
- Fix marshalling the commercetools to terraform state for various resources.
- Move documentation to the terraform registry, see https://registry.terraform.io/providers/labd/commercetools/latest/docs
- Use Go 1.18
- Add support for AWS EventBridge subscription
- Resource updates:
- project_settings: do case insensitive comparison of the languages, currencies and countries
- shipping_zone: make the name required
- api_extension: Fix handling of timeout_in_ms when empty
- category: add support for setting external_id
- category: fix empty key being set on creation
- Resource project: Add
shipping_rate_input_type
setting to enable tiered pricing for a project - Resource shipping_zone_rate: Add
shipping_rate_price_tier
setting to set up tiered pricing
- Fix custom object not being read / updated correctly
- Fix orderHint not being set but key on category being cleared. Note this will clear orderHint if it's not set.
- Fix category create not working with only name and slug filled in
- Resource Project: Add project level cart
delete_days_after_last_modification
setting
- New resource:
commercetools_category
- Resource API Extension: Removed unused
azure_functions
type - Add CheckDestroy funcs to all tests
- Add TFDocs documentation parallel to readthedocs documentation
- Resource project: Add
carts
field with countryTaxRateFallBackEnabled setting - Resource project: Fix updating of
messages
field to explicitly setfalse
when deleted or set to false in terraform instead of relying on commercetools default settings for project in these scenarios
- Resource api_extension: Fixed typo in
trigger
field name that caused updates to actions in triggers to fail
- New resource
commercetools_customer_group
(#141) - Resource type: Allow updating the label of an existing Enum value
- Resource type: Add support to update a set of enum in a custom type
- Fix ProductType and DiscountCode tests with real commercetools environment
- Resource store: Force creation of new resource when changing the keyL there is no update action for this available.
- Resource channel: Add support for updating the
key
field
- Resource type: Fix a bug when the
input_hint
of a field was modified.
- New resource:
commercetools_custom_object
- Resource tax_rate: Add a workaround to handle an issue with changing id's after a tax category update
- Resource store: Add
supply_channels
field - Resource tax_category_rate: Handle non-existing tax rates when refreshing state
- New tag naming scheme (prefix with v) to conform to terraform repository requirements
- Update terraform-plugin-sdk for compatibility with terraform 0.13
- Resource store: Fix edge case where distribution channels were not updated
- Resource store: Add
distribution_channels
field - Update commercetools-go-sdk dependency to v0.2.0. This version now properly handles oauth2 authentication failures (#117)
- Resource store: Add
languages
field
- Resource channel: Fix read null pointer exception. Name should be optional.
- Provider arguments (
client_id
,client_secret
,project_key
,scopes
,token_url
andapi_url
) are now required - Resource api_client: Updating now recreates the resource since it cannot be updated.
- Don't retry various calls if Commercetools returns an error (resulting in unnecessary retries/waiting times).
- Dependency update: use terraform-plugin-sdk 1.7.0
- Resource subscription: Add Azure Event Grid support
- Update all dependencies (use go 1.13, switch to terraform plugin sdk)
- Use Terraform 0.12.8 dependency
- Brew release Linux has incorrect artifact name
- Set GOPROXY for possible unreachable go packages
- Change Linux release artifact back to default archive format
- Resource state: Add
transitions
field (#74)
- Resource api_extension: Update Extension resource to add
timeout_in_ms
(#80) - Resource shipping_method: Add
predicate
field (#82)
- Resource project: Add support for setting the externalOAuth field (#73)
- Resource state: Add support for the StateRole Return item (#77)
- Trying to fix Brew release now that version number is in binary
- Use new Commercetools Go SDK definitions (main change is auto generated services, most CRUD actions are renamed)
- Fix Goreleaser not putting version number in released binary
- Use new Commercetools Go SDK definitions (main change is Reference is now ResourceIdentifier resource)
- Small fix for incorrect binary name in homebrew installation
- Add brew install option to goreleaser, see README for more info
- Resource api_client: Small fix in creating api client with new scopes
Breaking chanages
- Resource api_client: Changed scope type from string to set
- Resource shipping_zone: Fix creation and deletion, thanks to @sshibani !
- Use new Commercetools Go SDK to set the User-Agent header on Commercetools HTTP requests.
- Use Terraform 0.12.2 dependency for compatability with latest version
- Use Terraform 0.12 dependency to prepare for 0.12 release
- New resource:
commercetools_state
- Resource shipping_zone_rate: Add validation for currency codes
- New resource:
commercetools_store
This is an alpha Commercetools resource
- Use latest commercetools Go SDK
- New resource:
commercetools_shipping_method
- New resource:
commercetools_shipping_zone_rate
, Subject to changes, tiers/validation is not yet implemented
- Resource product_type: Fixed localized enum values being updated even if not changed
- Resource product_type: Implement description update
- Resource product_type: Implement localized enum label change
- Resource type: Fix error reading field type
Money
- Resource tax_category_rate: Fix import existing instance
- Resource tax_category_rate: Fix tax rate edge case for 0 amount
- New resource
commercetools_tax_category_rate
- Resource tax_category: removed
rate
in favour ofcommercetools_tax_category_rate
- Resource shipping_zone: Fix add/remove location logic.
- Resource tax_category: Fix tax rate 0.0 case not being handled
- New resource:
commercetools_shipping_zone
- Fix resource_type attribute label not mapping correctly
- Use auto-generated commercetools-go-sdk types
- New resource:
commercetools_channel
- New resource:
commercetools_tax_category
- Resource product_type: made
attribute
elements optional - Resource product_type: Validate/protect
required
element on Product type attribute - Resource product_type: Avoid
changeAttributeOrder
update action when new attribute gets added - Resource product_type: Added support for Nested types
- Resource type: Validate/protect
required
element on Type attribute - Resource type: Avoid
changeAttributeOrder
update action when new attribute gets added
- New resource:
commercetools_product_type
- New resource:
commercetools_type
- New resource:
commercetools_api_extension
- New resource:
commercetools_subscription
- New resource:
commercetools_project_settings
commercetools_api_extension
commercetools_subscription
commercetools_project_settings