Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

Emporix Terraform

Use the emporix-terraform skill to manage Emporix tenant configuration as code with the official Terraform provider.

Use the emporix-terraform skill to manage Emporix tenant configuration with the official emporix/emporix Terraform provider. It covers sites, currencies, countries, tax, shipping, payment modes, webhooks, mixin schemas, custom entity types and instances, price models, and tenant-configuration keys.

This page explains when to use the skill and how to work with it. The provider manages configuration, not commerce data. For Client ID, Secret, and scopes, use the Emporix Auth skill.

Skill details

Property
Value

Skill name

emporix-terraform

Package path

skills/emporix-terraform/ (contains SKILL.md)

Install it once using Installing skills.

When to use it

Use this skill when you need to:

  • Write Terraform for Emporix tenant setup

  • Configure the provider with EMPORIX_CLIENT_ID, EMPORIX_CLIENT_SECRET, and EMPORIX_SCOPE

  • Choose the resource that manages a given setting, or use the raw Configuration Service escape hatch

  • Promote the same configuration across dev, staging, and production as code

  • Diagnose Error: Invalid JSON on a value, a state break after a provider upgrade, or a 403 from a provider call

How it works

The provider is a configuration provider. It models 14 resources, including custom entity types, custom entity instances, and price models. It does not manage products, price values, orders, customers, stock, media, or API keys.

Decide the surface before you write HCL. Indexing and unit handling are examples of config keys the provider does not model yet.

The provider is pre-1.0. Pin an exact version. A minor upgrade can require a state change. Run terraform plan and terraform apply on a sandbox tenant first.

Credentials are environment variables. An empty provider block plus exported EMPORIX_* variables keeps secrets out of the repository and out of state.

Prerequisites

Before you use this skill, make sure you have:

  • Terraform 1.0 or newer

  • A sandbox tenant – do not apply against production

  • EMPORIX_TENANT and either EMPORIX_CLIENT_ID plus EMPORIX_CLIENT_SECRET, or a pre-minted EMPORIX_ACCESS_TOKEN

  • A custom API key limited to the manage and read scopes of the resources you manage

How to use it

After install, work in your AI tool from the Terraform directory. Examples:

Add the emporix/emporix provider, pin the version, and configure it from environment variables.

Manage site store-de and the EUR currency as Terraform resources on my sandbox tenant.

Why does emporix_tenant_configuration fail with Error: Invalid JSON when value is a plain string?

Usage notes

  • value must be JSON. Wrap plain strings with jsonencode.

  • The API returns the decoded value. Terraform state keeps the encoded form. A mismatch on read-back is the encoding, not a failed write.

  • Raw config writes need a Content-Language header. Omitting it returns 400, "The Content-Language cannot be empty".

  • emporix_country updates the pre-populated country. It does not create or delete countries, and it does not manage regions.

  • The skill pins provider version 0.11.2. A bump from 0.9.1 to 0.11.2 planned no changes over existing state, but check every upgrade.

  • Custom entity instances: pass mixins as a JSON string built with jsonencode, nested under the emporix_schema id. That schema needs types = [<type id>].

  • The provider has no data sources. Adopt an existing object as a resource, or create it in this state.

  • Scope names and URL paths do not always match. Copy unithandling.unit_manage and /unit-handling/{tenant}/units as written.

Last updated

Was this helpful?