terraform-provider-codeclimate

command module
v0.1.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 2, 2020 License: MIT Imports: 3 Imported by: 0

README

Terraform CodeClimate Provider

Requirements

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

Building The Provider

Build for linux (default) or darwin with make.

make build

Using the provider

Currently the provider supports just retreaving the repository as data source.

provider "codeclimate" {
  api_key = "${var.api_key}"        # Will fallback to CODECLIMATE_TOKEN environment variable if not explicitly specified.
}

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

Get organization information

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

data "codeclimate_organization" "babbel" {
  name = "babbel"
}

Create codeclimate repository

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

data "codeclimate_organization" "babbel" {
  name = "babbel"
}

resource "codeclimate_repository" "codeclimate_terraform_test" {
  repository_url  = "https://github.com/babbel/codeclimate_terraform_test"
  organization_id = data.codeclimate_organization.babbel.id
}

Importing repository

terraform import codeclimate_repository.codeclimate_terraform_test babbel/codeclimate_terraform_test

Developing the Provider

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

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

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL