No description
  • Go 96.5%
  • HTML 2.1%
  • Shell 0.7%
  • Makefile 0.5%
  • Ruby 0.2%
Find a file
2020-07-03 01:43:16 +00:00
.github Upgrade acceptance tests to Go 1.14 (#271) 2020-06-18 07:37:45 -07:00
helper/test Add ability to define pipeline owner for heroku_pipeline resource 2020-04-20 11:41:05 +09:00
heroku Implement new data source: heroku_pipeline [#267] 2020-06-26 15:01:33 +09:00
scripts Fix Changelog Links Script for heroku provider 2017-06-26 09:51:07 -05:00
vendor bump terraform-plugin-sdk to v1.12.0 2020-05-16 07:41:57 +09:00
version make provider version available at runtime 2018-12-21 22:25:33 -05:00
website Merge pull request #268 from terraform-providers/issues/267/davidji99-there-should-be-a-data-s 2020-06-29 16:00:57 +09:00
.gitignore Fixes code snippet in the README.md 2018-10-06 15:47:48 +01:00
.go-version provider: Ensured Go 1.11 in TravisCI and README 2019-02-20 17:59:37 -05:00
.travis.yml update travis.yml to use go 1.13.x [#244] 2020-03-24 08:53:45 +09:00
CHANGELOG.md Cleanup after v2.5.0 release 2020-07-03 01:43:16 +00:00
GNUmakefile Fix for make test failing with recent Go 2020-04-15 16:00:17 -07:00
go.mod bump terraform-plugin-sdk to v1.12.0 2020-05-16 07:41:57 +09:00
go.sum bump terraform-plugin-sdk to v1.12.0 2020-05-16 07:41:57 +09:00
LICENSE initial commit 2017-06-05 20:54:10 +00:00
main.go Migrate over to new terraform sdk 2019-09-26 16:36:33 +09:00
README.md Upgrade acceptance tests to Go 1.14 (#271) 2020-06-18 07:37:45 -07:00
TESTING.md add HEROKU_USER_ID env var to ci [#94] 2020-04-20 13:16:38 +09:00

Terraform Provider Heroku

Acceptance tests

This provider is used to configure resources supported by the Heroku Platform API.

See the official documentation to use this provider in a Terraform configuration.

Requirements

  • Terraform 0.12.x
  • Go 1.14 (to build the provider plugin)

Usage

For Terraform 0.12+ compatibility, the configuration should specifiy version 2 or higher:

provider "heroku" {
  version = "~> 2.0"
}

👓📚 For more usage info, see Heroku Provider docs.

Development

If you wish to work on the provider, you'll first need Go installed on your machine (version 1.12+ is required). You'll also need to correctly setup a GOPATH, as well as adding $GOPATH/bin to your $PATH.

Clone the Provider

With Go language, the repository must be cloned to a specific path in $GOPATH/src that matches its module import path.

mkdir -p $GOPATH/src/github.com/terraform-providers
cd $GOPATH/src/github.com/terraform-providers
git clone git@github.com:terraform-providers/terraform-provider-heroku

Build the Provider

To compile the provider, run make build. This will build the provider and put the provider binary in the $GOPATH/bin directory.

$ make build
...
$ $GOPATH/bin/terraform-provider-heroku
...

Using the Provider

To use the dev provider with local Terraform, copy the freshly built plugin into Terraform's local plugins directory:

cp $GOPATH/bin/terraform-provider-heroku ~/.terraform.d/plugins/

Set the Heroku provider without a version constraint:

provider "heroku" {}

Then, initialize Terraform:

terraform init

Testing

Please see the TESTING guide for detailed instructions on running tests.

Updating or adding dependencies

This project uses Go Modules for dependency management.

Dependencies can be added or updated as follows:

$ GO111MODULE=on go get github.com/some/module@release-tag
$ GO111MODULE=on go mod tidy
$ GO111MODULE=on go mod vendor

This example will fetch a module at the release tag and record it in your project's go.mod and go.sum files. It's a good idea to tidy up afterward and then copy the dependencies into vendor/.

If a module does not have release tags, then module@master can be used instead.

Removing dependencies

Remove all usage from your codebase and run:

$ GO111MODULE=on go mod tidy
$ GO111MODULE=on go mod vendor