Home

Awesome

CircleCI

terraform-provider-spinnaker

Manage Spinnaker applications and pipelines with Terraform.

Note - this project is experimental and not supported by Armory for production use.

We are not actively developing terraform-provider-spinnaker. If anyone is interested in taking over maintenance of this project, please reach out to engineering@armory.io. If you'd like to learn more about what features Armory supports, checkout our Platform Compatibility Matrix.

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

Resources

spinnaker_application

Example Usage

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

Argument Reference

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

spinnaker_pipeline_template

Example Usage

data "template_file" "dcd_template" {
    template = "${file("template.yml")}"
}

resource "spinnaker_pipeline_template" "terraform_example" {
    template = "${data.template_file.dcd_template.rendered}"
}

Argument Reference

spinnaker_pipeline_template_config

Example Usage

data "template_file" "dcd_template_config" {
    template = "${file("config.yml")}"
}

resource "spinnaker_pipeline_template_config" "terraform_example" {
    pipeline_config = "${data.template_file.dcd_template_config.rendered}"
}

Argument Reference