Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/armory-io/terraform-provider-spinnaker
A Spinnaker provider for Terraform
https://github.com/armory-io/terraform-provider-spinnaker
Last synced: about 1 month ago
JSON representation
A Spinnaker provider for Terraform
- Host: GitHub
- URL: https://github.com/armory-io/terraform-provider-spinnaker
- Owner: armory-io
- License: mit
- Created: 2018-11-23T17:05:07.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2024-03-14T13:29:11.000Z (9 months ago)
- Last Synced: 2024-08-02T00:26:30.933Z (4 months ago)
- Language: Go
- Size: 90.8 KB
- Stars: 143
- Watchers: 15
- Forks: 62
- Open Issues: 15
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-terraform - terraform-provider-spinnaker - Manage [Spinnaker](https://www.spinnaker.io/) applications and pipelines with Terraform. (Providers / Miscellaneous)
- awesome-tf - terraform-provider-spinnaker - Provider for [Spinnaker](https://www.spinnaker.io/). (Providers / Vendor supported providers)
README
[![CircleCI](https://circleci.com/gh/armory-io/terraform-provider-spinnaker/tree/master.svg?style=svg)](https://circleci.com/gh/armory-io/terraform-provider-spinnaker/tree/master)
# terraform-provider-spinnaker
Manage [Spinnaker](https://spinnaker.io) 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 `[email protected]`. If you'd like to learn more about what features Armory supports, checkout our [Platform Compatibility Matrix](https://docs.armory.io/docs/armory-enterprise-matrix/).
## Demo
![demo](https://d2ddoduugvun08.cloudfront.net/items/1A0A1C2C1M243j0b2u16/Screen%20Recording%202018-11-23%20at%2012.18%20PM.gif)
## Example
```
provider "spinnaker" {
server = "http://spinnaker-gate.myorg.io"
}resource "spinnaker_application" "my_app" {
application = "terraformtest"
email = "[email protected]"
}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](https://www.terraform.io/docs/configuration/providers.html#third-party-plugins) 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](https://github.com/spinnaker/spin/blob/master/config/example.yaml) 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 = "[email protected]"
}
```
#### 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
```
data "template_file" "dcd_template" {
template = "${file("template.yml")}"
}resource "spinnaker_pipeline_template" "terraform_example" {
template = "${data.template_file.dcd_template.rendered}"
}
```#### Argument Reference
* `template` - A yaml formated [DCD Spec pipeline template](https://github.com/spinnaker/dcd-spec/blob/master/PIPELINE_TEMPLATES.md#templates)
### `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
* `pipeline_config` - A yaml formated [DCD Spec pipeline configuration](https://github.com/spinnaker/dcd-spec/blob/master/PIPELINE_TEMPLATES.md#configurations)