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.
Skill details
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, andEMPORIX_SCOPEChoose 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 JSONon avalue, 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_TENANTand eitherEMPORIX_CLIENT_IDplusEMPORIX_CLIENT_SECRET, or a pre-mintedEMPORIX_ACCESS_TOKENA 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/emporixprovider, pin the version, and configure it from environment variables.
Manage site
store-deand the EUR currency as Terraform resources on my sandbox tenant.
Why does
emporix_tenant_configurationfail withError: Invalid JSONwhenvalueis a plain string?
Usage notes
valuemust be JSON. Wrap plain strings withjsonencode.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-Languageheader. Omitting it returns 400, "The Content-Language cannot be empty".emporix_countryupdates 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
mixinsas a JSON string built withjsonencode, nested under theemporix_schemaid. That schema needstypes = [<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_manageand/unit-handling/{tenant}/unitsas written.
Last updated
Was this helpful?

