terraform-provider-codefresh

command module
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2022 License: MPL-2.0 Imports: 5 Imported by: 0

README

Terraform provider for Codefresh

This provider was initialized by LightStep and will be maintained as the official Terraform provider for Codefresh.

The provider is still under development, and can be used as a terraform third-party plugin only.

Requirements

  • Terraform 0.12+ ;
  • Go 1.12+ (to build the provider plugin).

Download Provider

Download and extract terraform-provider-codefresh from releases

Building the Provider

go build -o terraform-provider-codefresh

Using the Provider

Compile or take from the Releases terraform-provider-codefresh binary and place it locally according the Terraform plugins documentation.

for terraform 0.12:
  • ~/.terraform.d/plugins/linux_amd64
  • ./terraform.d/plugins/linux_amd64. The relative path in your Terraform project.
for terraform 0.13 follow required providers:
# OS  is linux|windows|darwin, ARCH is amd64|arm|x86
PLUGIN_DIR=~/.terraform.d/plugins/codefresh.io/app/codefresh/0.1.0/<OS_ARCH>
mkdir -p ${PLUGIN_DIR}
cp terraform-provider-codefresh  ${PLUGIN_DIR}/

add required_providers block

terraform {

  required_providers {
    codefresh = {
      version = "0.1.0"
      source = "codefresh.io/app/codefresh"
    }
  }
}

Documentation

Examples

To configure Codefresh provider:

provider "codefresh" {
  api_url = "<MY API URL>" # Default value - https://g.codefresh.io/api
  token = "<MY API TOKEN>" # If token isn't set the provider expects the $CODEFRESH_API_KEY env variable
}

Get an API key from Codefresh and set the following scopes:

  • Environments-V2
  • Pipeline
  • Project
  • Repos
  • Step-Type
  • Step-Types
  • View
export CODEFRESH_API_KEY='xyz'

Testing the Provider

export TF_ACC="test" 
export CODEFRESH_API_KEY=[YOUR API TOKEN]
go test -v ./...

License

Copyright 2022 Codefresh.

The Codefresh Provider is available under MPL2.0 license.

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