page_title | subcategory | description |
---|---|---|
commercetools provider |
The commercetools provider provides resources to interact with the commercetools API |
Need support implementing this terraform module in your organization? We are able to offer support. Please contact us at opensource@labdigital.nl!
Terraform automatically downloads providers from the terraform registry. Add the following to your terraform project
terraform {
required_providers {
commercetools = {
source = "labd/commercetools"
}
}
}
Packages of the releases are available at the GitHub Repo. See the terraform documentation for more information about installing third-party providers.
The provider attempts to read the required values from environment variables:
CTP_CLIENT_ID
CTP_CLIENT_SECRET
CTP_PROJECT_KEY
CTP_SCOPES
CTP_API_URL
CTP_AUTH_URL
Alternatively, you can set it up directly in the terraform file:
provider "commercetools" {
client_id = "<your client id>"
client_secret = "<your client secret>"
project_key = "<your project key>"
scopes = "<space seperated list of scopes>"
api_url = "<api url>"
token_url = "<token url>"
}
api_url
(String) The API URL of the commercetools platform. https://docs.commercetools.com/api/general-concepts#hostsclient_id
(String, Sensitive) The OAuth Client ID for a commercetools platform project. https://docs.commercetools.com/api/authorizationclient_secret
(String, Sensitive) The OAuth Client Secret for a commercetools platform project. https://docs.commercetools.com/api/authorizationproject_key
(String, Sensitive) The project key of commercetools platform project. https://docs.commercetools.com/getting-startedscopes
(String) A list as string of OAuth scopes assigned to a project key, to access resources in a commercetools platform project. https://docs.commercetools.com/api/authorizationtoken_url
(String) The authentication URL of the commercetools platform. https://docs.commercetools.com/api/authorization
The included Dockerfile
bundles the official hashicorp/terraform:light
docker image with
our terraform-provider-commercetools
.
To build the docker image file locally, use:
docker build . -t terraform-with-provider-commercetools:latest
Then you can run a terraform command on files in the current directory with:
docker run -v "${pwd}:/config" terraform-with-provider-commercetools:latest <CMD>
This project is developed by Lab Digital. We welcome additional contributors. Please see our GitHub repository for more information.