Skip to content

Latest commit

 

History

History
88 lines (70 loc) · 3.07 KB

File metadata and controls

88 lines (70 loc) · 3.07 KB
page_title subcategory description
commercetools provider
The commercetools provider provides resources to interact with the commercetools API

commercetools provider

Commercial support

Need support implementing this terraform module in your organization? We are able to offer support. Please contact us at opensource@labdigital.nl!

Installation

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.

Using the provider

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>"
}

Schema

Optional

Using with docker

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>

Authors

This project is developed by Lab Digital. We welcome additional contributors. Please see our GitHub repository for more information.