Giter VIP home page Giter VIP logo

terraform-provider-commercetools's Introduction

commercetools Terraform Provider

Build Status codecov Go Report Card Documentation Status

Status

This is the Terraform provider for commercetools. It allows you to configure your commercetools project with infrastructure-as-code principles. The project is in development and it might not support the complete commercetools API yet, but it can be considered 'production' ready for the resource it does support.

Commercial support

Need support implementing this terraform module in your organization? We are able to offer support. Please contact us at [email protected]

Installation

This is a third-party provider and that means that terraform cannot download it automatically.

Binaries

Packages of the releases are available at https://github.com/labd/terraform-provider-commercetools/releases See the terraform documentation for more information about installing third-party providers.

Homebrew

Add the terraform tap:

$ brew tap labd/homebrew-terraform-provider-commercetools

Then install the provider:

$ brew install terraform-provider-commercetools

And follow the terminal output instructions to symlink the binary.

Getting started

Read our documentation and check out the examples.

Contributing

Building the provider

Clone repository to: $GOPATH/src/github.com/labd/terraform-provider-commercetools

$ mkdir -p $GOPATH/src/github.com/labd; cd $GOPATH/src/github.com/labd
$ git clone [email protected]:labd/terraform-provider-commercetools

Enter the provider directory and build the provider

$ cd $GOPATH/src/github.com/labd/terraform-provider-commercetools
$ make build

To then locally test:

$ cp terraform-provider-commercetools ~/.terraform.d/plugins/darwin_amd64/terraform-provider-commercetools

Update commercetools-go-sdk

The commercetools-go-sdk always uses the latest (master) version. To update to the latest version:

make update-sdk

Debugging / Troubleshooting

There are two environment settings for troubleshooting:

  • TF_LOG=1 enables debug output for Terraform.
  • CTP_DEBUG=1 enables debug output for the Commercetools GO SDK this provider uses.

Note this generates a lot of output!

Releasing

This project uses Goreleaser, see .goreleaser.yml. To release:

git tag <release> -m "Release <release>" # please use semantic version, so always X.Y.Z
git push --follow-tags
GITHUB_TOKEN=<your github token> goreleaser release --rm-dist

Testing

Running the unit tests

$ make test

Running an Acceptance Test

In order to run the full suite of Acceptance tests, run make testacc.

NOTE: Acceptance tests create real resources.

Prior to running the tests provider configuration details such as access keys must be made available as environment variables.

Since we need to be able to create commercetools resources, we need the commercetools API credentials. So in order for the acceptance tests to run correctly please provide all of the following:

export CTP_CLIENT_ID=...
export CTP_CLIENT_SECRET=...
export CTP_PROJECT_KEY=...

For convenience, place a testenv.sh in your local folder (which is included in .gitignore) where you can store these environment variables.

Tests can then be started by running

$ source local/testenv.sh
$ make testacc

Authors

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

terraform-provider-commercetools's People

Contributors

davidweterings avatar mvantellingen avatar tleguijt avatar cneijenhuis avatar woutor avatar pimvernooij avatar katmatt avatar michielbijland avatar emmenko avatar pjstevns avatar arnestaphorsius avatar sshibani avatar mikedebock avatar ranisputnik avatar zackpollard avatar chrisabird avatar vparikh-express avatar okkevandereijk avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.