Skip to content
CodeClimate provider for Terraform.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
codeclimate
codeclimateclient
.travis.yml
LICENSE
README.md
go.mod
go.sum
main.go

README.md

Terraform CodeClimate Provider

Requirements

  • Terraform 0.11.13+
  • Go 1.11.x+ (to build the provider plugin)

Building The Provider

Clone repository to: $GOPATH/src/github.com/babbel/terraform-provider-codeclimate

$ mkdir -p $GOPATH/src/github.com/babbel; cd $GOPATH/src/github.com/babbel
$ git clone git@github.com:babbel/terraform-provider-codeclimate

Enter the provider directory and build the provider

$ cd $GOPATH/src/github.com/babbel/terraform-provider-codeclimate
$ make build

Using the provider

Currently the provider supports just Repository retrieval, based on the repository name. It is used then as a data source.

provider "codeclimate" {
  api_key = "${var.api_key}"
}

data "codeclimate_repository" "test" {
  repository_slug = "babbel/test"
}

Developing the Provider

If you wish to work on the provider, you'll first need Go installed on your machine (version 1.11.x+ is required). This provider works using Go Modules.

To compile the provider, run go build -o terraform-provider-codeclimate. This will build the provider and put the provider binary in the current directory.

$ make bin
...
$ terraform-provider-codeclimate
...

In order to test the provider, you can simply run make test.

$ go test ./...

Github Releases

In order to push a release to Github the feature branch has to be merged into master and then a tag needs to be created with the version name of the provider e.g. v0.0.1 and pushed.

git checkout master
git pull origin master
git tag v<semver>
git push origin master --tags
You can’t perform that action at this time.