Skip to content

Bonial-International-GmbH/terraform-provider-spinnaker

 
 

Repository files navigation

terraform-provider-spinnaker

Build Status Go Report Card GoDoc

Manage Spinnaker applications and pipelines with Terraform.

Demo

demo

Example

provider "spinnaker" {
  server = "http://spinnaker-gate.myorg.io"
}

resource "spinnaker_application" "my_app" {
  application = "terraformtest"
  email       = "ethan@armory.io"
}

resource "spinnaker_pipeline" "terraform_example" {
  application = spinnaker_application.my_app.application
  name        = "Example Pipeline"
  pipeline    = file("pipelines/example.json")
}

Installation

Build from Source

Requires Go to be installed on the system.

$ env GO111MODULE=on go get github.com/armory-io/terraform-provider-spinnaker
$ cd $GOPATH/src/github.com/armory-io/terraform-provider-spinnaker
$ env GO111MODULE=on go build

Installing 3rd Party Plugins

See Terraform documentation for installing 3rd party plugins.

Provider

Example Usage

provider "spinnaker" {
  server             = "http://spinnaker-gate.myorg.io"
  config             = "/path/to/config.yml"
  ignore_cert_errors = true
  default_headers    = "Api-Key=abc123"
}

Argument Reference

  • server - The Gate API Url
  • config - (Optional) - Path to Gate config file. See the Spin CLI for an example config.
  • ignore_cert_errors - (Optional) - Set this to true to ignore certificate errors from Gate. Defaults to false.
  • default_headers - (Optional) - Pass through a comma separated set of key value pairs to set default headers for the gate client when sending requests to your gate endpoint e.g. "header1=value1,header2=value2". Defaults to "".

Resources

spinnaker_application

Example Usage

resource "spinnaker_application" "my_app" {
  application = "terraformtest"
  email       = "ethan@armory.io"
}

Argument Reference

  • application - Application name
  • email - Owner email

spinnaker_pipeline

Example Usage

resource "spinnaker_pipeline" "terraform_example" {
  application = spinnaker_application.my_app.application
  name        = "Example Pipeline"
  pipeline    = file("pipelines/example.json")
}

Argument Reference

  • application - Application name
  • name - Pipeline name
  • pipeline - Pipeline JSON in string format, example file(pipelines/example.json)

spinnaker_pipeline_template

Example Usage

resource "spinnaker_pipeline_template" "terraform_example" {
  template = templatefile("template.yml", {
    yourVariable = var.your-variable
    })
}

Argument Reference

spinnaker_pipeline_template_config

Example Usage

resource "spinnaker_pipeline_template_config" "terraform_example" {
  pipeline_config = templatefile("config.yml",{
    yourVariable = var.your-variable
  })
}

Argument Reference

About

A Spinnaker provider for Terraform

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 96.0%
  • Makefile 4.0%