website: Add docs for Heroku Pipeline resources

This commit is contained in:
Justin Campbell 2017-04-28 16:12:26 -04:00
parent e2b361f603
commit ccb1b7ebec
3 changed files with 137 additions and 0 deletions

View File

@ -0,0 +1,62 @@
---
layout: "heroku"
page_title: "Heroku: heroku_pipeline_"
sidebar_current: "docs-heroku-resource-pipeline-x"
description: |-
Provides a Heroku Pipeline resource.
---
# heroku\_pipeline
Provides a [Heroku Pipeline](https://devcenter.heroku.com/articles/pipelines)
resource.
A pipeline is a group of Heroku apps that share the same codebase. Once a
pipeline is created, and apps are added to different stages using
[`heroku_pipeline_coupling`](./pipeline_coupling.html), you can promote app
slugs to the next stage.
## Example Usage
```hcl
# Create Heroku apps for staging and production
resource "heroku_app" "staging" {
name = "test-app-staging"
}
resource "heroku_app" "production" {
name = "test-app-production"
}
# Create a Heroku pipeline
resource "heroku_pipeline" "test-app" {
name = "test-app"
}
# Couple apps to different pipeline stages
resource "heroku_pipeline_coupling" "staging" {
app = "${heroku_app.staging.name}"
pipeline = "${heroku_pipeline.test-app.id}"
stage = "staging"
}
resource "heroku_pipeline_coupling" "production" {
app = "${heroku_app.production.name}"
pipeline = "${heroku_pipeline.test-app.id}"
stage = "production"
}
```
## Argument Reference
The following arguments are supported:
* `name` - (Required) The name of the pipeline.
## Attributes Reference
The following attributes are exported:
* `id` - The UUID of the pipeline.
* `name` - The name of the pipeline.

View File

@ -0,0 +1,67 @@
---
layout: "heroku"
page_title: "Heroku: heroku_pipeline_coupling"
sidebar_current: "docs-heroku-resource-pipeline-coupling"
description: |-
Provides a Heroku Pipeline Coupling resource.
---
# heroku\_pipeline\_coupling
Provides a [Heroku Pipeline Coupling](https://devcenter.heroku.com/articles/pipelines)
resource.
A pipeline is a group of Heroku apps that share the same codebase. Once a
pipeline is created using [`heroku_pipeline`](./pipeline), and apps are added
to different stages using `heroku_pipeline_coupling`, you can promote app slugs
to the downstream stages.
## Example Usage
```hcl
# Create Heroku apps for staging and production
resource "heroku_app" "staging" {
name = "test-app-staging"
}
resource "heroku_app" "production" {
name = "test-app-production"
}
# Create a Heroku pipeline
resource "heroku_pipeline" "test-app" {
name = "test-app"
}
# Couple apps to different pipeline stages
resource "heroku_pipeline_coupling" "staging" {
app = "${heroku_app.staging.name}"
pipeline = "${heroku_pipeline.test-app.id}"
stage = "staging"
}
resource "heroku_pipeline_coupling" "production" {
app = "${heroku_app.production.name}"
pipeline = "${heroku_pipeline.test-app.id}"
stage = "production"
}
```
## Argument Reference
The following arguments are supported:
* `app` - (Required) The name of the app for this coupling.
* `pipeline` - (Required) The ID of the pipeline to add this app to.
* `stage` - (Required) The stage to couple this app to. Must be one of
`review`, `development`, `staging`, or `production`.
## Attributes Reference
The following attributes are exported:
* `id` - The UUID of this pipeline coupling.
* `app` - The name of the application.
* `pipeline` - The UUID of the pipeline.
* `stage` - The stage for this coupling.

View File

@ -37,6 +37,14 @@
<a href="/docs/providers/heroku/r/drain.html">heroku_drain</a>
</li>
<li<%= sidebar_current("docs-heroku-resource-pipeline-x") %>>
<a href="/docs/providers/heroku/r/pipeline.html">heroku_pipeline</a>
</li>
<li<%= sidebar_current("docs-heroku-resource-pipeline-coupling") %>>
<a href="/docs/providers/heroku/r/pipeline_coupling.html">heroku_pipeline_coupling</a>
</li>
<li<%= sidebar_current("docs-heroku-resource-space") %>>
<a href="/docs/providers/heroku/r/space.html">heroku_space</a>
</li>