diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md index 09b8453a5..47eccdfa9 100644 --- a/.github/ISSUE_TEMPLATE.md +++ b/.github/ISSUE_TEMPLATE.md @@ -21,7 +21,7 @@ Please list the resources as a list, for example: If this issue appears to affect multiple resources, it may be an issue with Terraform's core, so please mention this. ### Terraform Configuration Files -```hcl +```hcl-terraform # Copy-paste your Terraform configurations here - for large Terraform configs, # please use a service like Dropbox and share a link to the ZIP file. For # security, you can also encrypt the files using our GPG public key. diff --git a/README.md b/README.md index cabc32df8..249800eb7 100644 --- a/README.md +++ b/README.md @@ -13,14 +13,14 @@ Requirements ------------ - [Terraform](https://www.terraform.io/downloads.html) 0.12.x -- [Go](https://golang.org/doc/install) 1.14 (to build the provider plugin) +- [Go](https://golang.org/doc/install) 1.15 (to build the provider plugin) Usage ----- For Terraform 0.12+ compatibility, the configuration should specifiy version 2 or higher: -```hcl +```hcl-terraform provider "heroku" { version = "~> 2.0" } @@ -64,7 +64,7 @@ cp $GOPATH/bin/terraform-provider-heroku ~/.terraform.d/plugins/ Set the Heroku provider without a version constraint: -```hcl +```hcl-terraform provider "heroku" {} ``` diff --git a/website/docs/d/addon.html.markdown b/docs/data-sources/addon.md similarity index 98% rename from website/docs/d/addon.html.markdown rename to docs/data-sources/addon.md index b679c9f8e..5c6240437 100644 --- a/website/docs/d/addon.html.markdown +++ b/docs/data-sources/addon.md @@ -12,7 +12,7 @@ Use this data source to get information about a Heroku Addon. ## Example Usage -```hcl +```hcl-terraform data "heroku_addon" "from_another_app" { name = "addon-from-another-app" } diff --git a/website/docs/d/app.html.markdown b/docs/data-sources/app.md similarity index 95% rename from website/docs/d/app.html.markdown rename to docs/data-sources/app.md index 9105c0e7e..d91082a64 100644 --- a/website/docs/d/app.html.markdown +++ b/docs/data-sources/app.md @@ -12,7 +12,7 @@ Use this data source to get information about a Heroku App. ## Example Usage -```hcl +```hcl-terraform # Lookup an existing Heroku app data "heroku_app" "default" { name = "my-cool-app" @@ -53,7 +53,7 @@ The following attributes are exported: * `heroku_hostname` - The hostname for the Heroku application, suitable for pointing DNS records. -* `config_vars` - A map of all of the configuration variables for the app. +* `config_vars` - A map of all configuration variables for the app. * `acm` - True if Heroku ACM is enabled for this app, false otherwise. diff --git a/website/docs/d/pipeline.html.markdown b/docs/data-sources/pipeline.md similarity index 83% rename from website/docs/d/pipeline.html.markdown rename to docs/data-sources/pipeline.md index 9d16f4906..8c59fae0f 100644 --- a/website/docs/d/pipeline.html.markdown +++ b/docs/data-sources/pipeline.md @@ -10,12 +10,13 @@ description: |- Use this data source to get information about a Heroku Pipeline. -~> **NOTE:** This data source can only be used to fetch information regarding a pipeline that has apps associated to it. +~> **NOTE:** +This data source can only be used to fetch information regarding a pipeline that has apps already associated to it. This is a limitation in the Heroku Platform API where it is not possible to query a pipeline without apps by its name. ## Example Usage -```hcl +```hcl-terraform data "heroku_pipeline" "foobar" { name = "pipeline-test-123" } diff --git a/website/docs/d/space.html.markdown b/docs/data-sources/space.md similarity index 99% rename from website/docs/d/space.html.markdown rename to docs/data-sources/space.md index 9b3b3e3d5..c3aad6840 100644 --- a/website/docs/d/space.html.markdown +++ b/docs/data-sources/space.md @@ -12,7 +12,7 @@ Use this data source to get information about a [Heroku Private Space](https://w ## Example Usage -```hcl +```hcl-terraform # Look up a Heroku Private Space data "heroku_space" "default" { name = "my-secret-space" diff --git a/website/docs/d/space_peering_info.html.markdown b/docs/data-sources/space_peering_info.md similarity index 86% rename from website/docs/d/space_peering_info.html.markdown rename to docs/data-sources/space_peering_info.md index 8f8743cbe..57c435bf1 100644 --- a/website/docs/d/space_peering_info.html.markdown +++ b/docs/data-sources/space_peering_info.md @@ -12,7 +12,7 @@ Use this data source to get peering information about a [Heroku Private Space](h ## Example Usage -```hcl +```hcl-terraform # Look up a Heroku Private Space's peering info. data "heroku_space_peering_info" "default" { name = "my-secret-space" @@ -20,9 +20,9 @@ data "heroku_space_peering_info" "default" { # Initiate a VPC peering connection request. resource "aws_vpc_peering_connection" "foo" { - peer_owner_id = "${data.heroku_space_peering_info.default.aws_account_id}" - peer_vpc_id = "${data.heroku_space_peering_info.default.vpc_id}" - vpc_id = "${aws_vpc.foo.id}" + peer_owner_id = data.heroku_space_peering_info.default.aws_account_id + peer_vpc_id = data.heroku_space_peering_info.default.vpc_id + vpc_id = aws_vpc.foo.id } ``` @@ -37,8 +37,13 @@ The following arguments are supported: The following attributes are exported: * `aws_account_id` - The AWS account ID that the Heroku Private Space runs in. + * `aws_region` - The AWS region that the Heroku Private Space runs in. + * `vpc_id` - The VPC ID of the Heroku Private Space. + * `vpc_cidr` - The CIDR block of the VPC ID. + * `dyno_cidr_blocks` - The CIDR blocks that the Dynos run on. + * `unavailable_cidr_blocks` - A list of unavailable CIDR blocks. diff --git a/website/docs/d/team.html.markdown b/docs/data-sources/team.md similarity index 98% rename from website/docs/d/team.html.markdown rename to docs/data-sources/team.md index 69c9298d2..579d8d4f1 100644 --- a/website/docs/d/team.html.markdown +++ b/docs/data-sources/team.md @@ -12,7 +12,7 @@ Use this data source to get information about a Heroku Team or Heroku Enterprise ## Example Usage -```hcl +```hcl-terraform data "heroku_team" "my_heroku_team" { name = "name_of_my_heroku_team" } @@ -40,8 +40,13 @@ The following arguments are supported: The following attributes are exported: * `id` - The ID of the team + * `default` - Whether to use this team when none is specified + * `credit_card_collections` - Whether charges incurred by the team are paid by credit card + * `membership_limit` - Upper limit of members allowed in a team + * `provisioned_licenses` - Whether the team is provisioned licenses by Salesforce + * `type` - type of team Will likely be either "enterprise" or "team" diff --git a/website/docs/index.html.markdown b/docs/index.md similarity index 98% rename from website/docs/index.html.markdown rename to docs/index.md index eca1a30dd..aa3a9196c 100644 --- a/website/docs/index.html.markdown +++ b/docs/index.md @@ -30,7 +30,7 @@ Development happens in the [GitHub repo](https://github.com/heroku/terraform-pro ## Example Usage -```hcl +```hcl-terraform # Configure the Heroku provider provider "heroku" { email = "ops@company.com" @@ -58,7 +58,7 @@ precedence, and explained below: Credentials can be provided statically by adding `email` and `api_key` arguments to the Heroku provider block: -```hcl +```hcl-terraform provider "heroku" { email = "ops@company.com" api_key = var.heroku_api_key @@ -71,7 +71,7 @@ When the Heroku provider block does not contain an `email` or `api_key` argument, the missing credentials will be sourced from the environment via the `HEROKU_EMAIL` and `HEROKU_API_KEY` environment variables respectively: -```hcl +```hcl-terraform provider "heroku" {} ``` @@ -87,7 +87,7 @@ Refreshing Terraform state in-memory prior to plan... Credentials can instead be sourced from the [`.netrc`](https://ec.haxx.se/usingcurl-netrc.html) file in your home directory: -```hcl +```hcl-terraform provider "heroku" {} ``` diff --git a/website/docs/r/account_feature.html.markdown b/docs/resources/account_feature.md similarity index 87% rename from website/docs/r/account_feature.html.markdown rename to docs/resources/account_feature.md index 4499fc72c..edbf27591 100644 --- a/website/docs/r/account_feature.html.markdown +++ b/docs/resources/account_feature.md @@ -15,18 +15,14 @@ and remove resource from state. ## Available Features -For a list of available features, use the [Heroku CLI](https://devcenter.heroku.com/articles/heroku-cli) to fetch them for the current user: - -``` -heroku labs -``` +For a list of available features, use the [`heroku labs`](https://devcenter.heroku.com/articles/heroku-cli) +command to fetch them for the current authenticated user. The output will contain **User Features** that may be managed with this resource. ## Example Usage -```hcl -# Create a new Heroku app +```hcl-terraform resource "heroku_account_feature" "example_metrics" { name = "metrics-request-volume" enabled = true @@ -38,6 +34,7 @@ resource "heroku_account_feature" "example_metrics" { The following arguments are supported: * `name` - (Required) Name of the account feature + * `enabled` - (Required) Enable or disable the account feature ## Attributes Reference @@ -45,7 +42,9 @@ The following arguments are supported: The following attributes are exported: * `id` - Comprised of acount email & feature name + * `description` - Description of account feature + * `state` - State of account feature ## Import @@ -54,6 +53,7 @@ Existing account features can be imported using a combination of the account ema and the feature name. For example: + ``` $ terraform import heroku_account_feature.example_metrics name@example.com:metrics-request-volume ``` diff --git a/website/docs/r/addon.html.markdown b/docs/resources/addon.md similarity index 93% rename from website/docs/r/addon.html.markdown rename to docs/resources/addon.md index 2ad90dbab..e8955e7cd 100644 --- a/website/docs/r/addon.html.markdown +++ b/docs/resources/addon.md @@ -13,7 +13,7 @@ services to a Heroku app. ## Example Usage -```hcl +```hcl-terraform # Create a new Heroku app resource "heroku_app" "default" { name = "test-app" @@ -21,13 +21,13 @@ resource "heroku_app" "default" { # Create a database, and configure the app to use it resource "heroku_addon" "database" { - app = "${heroku_app.default.name}" + app = heroku_app.default.name plan = "heroku-postgresql:hobby-basic" } # Add a web-hook addon for the app resource "heroku_addon" "webhook" { - app = "${heroku_app.default.name}" + app = heroku_app.default.name plan = "deployhooks:http" config = { @@ -41,8 +41,11 @@ resource "heroku_addon" "webhook" { The following arguments are supported: * `app` - (Required) The Heroku app to add to. + * `plan` - (Required) The addon to add. + * `config` - (Optional) Optional plan configuration. + * `name` - (Optional) Globally unique name of the add-on. ## Attributes Reference @@ -50,9 +53,13 @@ The following arguments are supported: The following attributes are exported: * `id` - The ID of the add-on + * `name` - The add-on name + * `plan` - The plan name + * `provider_id` - The ID of the plan provider + * `config_vars` - The Configuration variables of the add-on diff --git a/website/docs/r/addon_attachment.html.markdown b/docs/resources/addon_attachment.md similarity index 98% rename from website/docs/r/addon_attachment.html.markdown rename to docs/resources/addon_attachment.md index a08c1400d..22d12752d 100644 --- a/website/docs/r/addon_attachment.html.markdown +++ b/docs/resources/addon_attachment.md @@ -12,7 +12,7 @@ Attaches a Heroku Addon Resource to an additional Heroku App. ## Example Usage -```hcl +```hcl-terraform resource "heroku_addon_attachment" "database" { app_id = heroku_app.default.id addon_id = heroku_addon.database.id @@ -32,8 +32,11 @@ resource "heroku_addon_attachment" "database_credentials" { The following arguments are supported: * `app_id` - (Required) The ID of the Heroku App to attach to. + * `addon_id` - (Required) The ID of the existing Heroku Addon to attach. + * `name` - (Optional) A friendly name for the Heroku Addon Attachment. + * `namespace` - (Optional) The namespace value for the Heroku Addon Attachment. This can be used to configure the behaviour of the attachment. See [Heroku Platform API Reference](https://devcenter.heroku.com/articles/platform-api-reference#add-on-attachment-create) ## Attributes Reference diff --git a/website/docs/r/app.html.markdown b/docs/resources/app.md similarity index 96% rename from website/docs/r/app.html.markdown rename to docs/resources/app.md index 66333e3b8..a5f5ce46e 100644 --- a/website/docs/r/app.html.markdown +++ b/docs/resources/app.md @@ -12,7 +12,7 @@ Provides a Heroku App resource. This can be used to create and manage applicatio ## Example Usage -```hcl +```hcl-terraform resource "heroku_app" "default" { name = "my-cool-app" region = "us" @@ -31,7 +31,7 @@ resource "heroku_app" "default" { A Heroku "team" was originally called an "organization", and that is still the identifier used in this resource. -```hcl +```hcl-terraform resource "heroku_app" "default" { name = "my-cool-app" region = "us" @@ -48,34 +48,44 @@ The following arguments are supported: * `name` - (Required) The name of the application. In Heroku, this is also the unique ID, so it must be unique and have a minimum of 3 characters. + * `region` - (Required) The region that the app should be deployed in. -* `stack` - (Optional) The application stack is what platform to run the application - in. + +* `stack` - (Optional) The application stack is what platform to run the application in. + * `buildpacks` - (Optional) Buildpack names or URLs for the application. - Buildpacks configured externally won't be altered if this is not present. + Buildpacks configured externally won't be altered if this is not present. + * `config_vars`[1](#deleting-vars) - (Optional) Configuration variables for the application. The config variables in this map are not the final set of configuration variables, but rather variables you want present. That is, other configuration variables set externally won't be removed by Terraform if they aren't present in this list. + * `sensitive_config_vars`[1](#deleting-vars) - (Optional) This argument is the same as `config_vars`. The main difference between the two is when `sensitive_config_vars` outputs are displayed on-screen following a terraform apply or terraform refresh, they are redacted, with displayed in place of their value. It is recommended to put private keys, passwords, etc in this argument. + * `space` - (Optional) The name of a private space to create the app in. + * `internal_routing` - (Optional) If true, the application will be routable only internally in a private space. This option is only available for apps that also specify `space`. + * `organization` - (Optional) A block that can be specified once to define Heroku Team settings for this app. The fields for this block are documented below. + * `acm` - (Optional) The flag representing Automated Certificate Management for the app. The `organization` block supports: * `name` (string) - The name of the Heroku Team. + * `locked` (boolean) - Are other team members forbidden from joining this app. + * `personal` (boolean) - Force creation of the app in the user account even if a default team is set. ### Deleting vars @@ -94,23 +104,31 @@ config vars to `heroku_app_config_association` resource. The following attributes are exported: * `id` - The ID of the app. This is also the name of the app. + * `name` - The name of the application. -* `stack` - The application stack is what platform to run the application - in. + +* `stack` - The application stack is what platform to run the application in. + * `space` - The private space the app should run in. -* `internal_routing` - Whether internal routing is enabled the private space - app. + +* `internal_routing` - Whether internal routing is enabled the private space app. + * `region` - The region that the app should be deployed in. + * `git_url` - The Git URL for the application. This is used for deploying new versions of the app. + * `web_url` - The web (HTTP) URL that the application can be accessed at by default. + * `heroku_hostname` - A hostname for the Heroku application, suitable for pointing DNS records. + * `all_config_vars` - A map of all of the configuration variables that exist for the app, containing both those set by Terraform and those set externally. (These are treated as "sensitive" so that their values are redacted in console output.) + * `uuid` - The unique UUID of the Heroku app. **NOTE:** Use this for `null_resource` triggers. ## Import diff --git a/website/docs/r/app_config_association.html.markdown b/docs/resources/app_config_association.md similarity index 94% rename from website/docs/r/app_config_association.html.markdown rename to docs/resources/app_config_association.md index e1c6a9949..b5a75258e 100644 --- a/website/docs/r/app_config_association.html.markdown +++ b/docs/resources/app_config_association.md @@ -28,7 +28,7 @@ during a `terraform apply`. Furthermore, this overlap will cause an infinite dir different values on both resources at the same time. It is recommended to use one or the other resource, not both, to manage your app(s) config vars. ## Example HCL -```hcl +```hcl-terraform resource "heroku_config" "common" { vars = { LOG_LEVEL = "info" @@ -50,16 +50,16 @@ resource "heroku_app" "foobar2" { } resource "heroku_app_config_association" "foobar" { - app_id = "${heroku_app.foobar.id}" + app_id = heroku_app.foobar.id - vars = "${heroku_config.common.vars}" - sensitive_vars = "${heroku_config.common.sensitive_vars}" + vars = heroku_config.common.vars + sensitive_vars = heroku_config.common.sensitive_vars } resource "heroku_app_config_association" "foobar2" { - app_id = "${heroku_app.foobar2.id}" + app_id = heroku_app.foobar2.id - vars = "${heroku_config.common.vars}" + vars = heroku_config.common.vars sensitive_vars = { DATABASE_URL = "some_db_url_that_has_auth_info" } @@ -69,7 +69,9 @@ resource "heroku_app_config_association" "foobar2" { ## Argument Reference * `app_id` - (Required) A Heroku app's `UUID`. Can also be the name of the Heroku app but `UUID` is preferred as it is idempotent. + * `vars` - Map of config vars that can be output in plaintext. + * `sensitive_vars` - This is the same as `vars`. The main difference between the two attributes is `sensitive_vars` outputs are redacted on-screen and replaced by a placeholder, following a terraform plan or apply. It is recommended to put private keys, passwords, etc in this argument. diff --git a/website/docs/r/app_feature.html.markdown b/docs/resources/app_feature.md similarity index 80% rename from website/docs/r/app_feature.html.markdown rename to docs/resources/app_feature.md index 4bf241d6f..234763879 100644 --- a/website/docs/r/app_feature.html.markdown +++ b/docs/resources/app_feature.md @@ -12,17 +12,15 @@ This resource is used to create and manage [App Features](https://devcenter.hero ## Available Features -For a list of available features, use the [Heroku CLI](https://devcenter.heroku.com/articles/heroku-cli) to fetch them for one of your existing apps: +For a list of available features, use the [Heroku CLI](https://devcenter.heroku.com/articles/heroku-cli) +to fetch them for one of your existing apps: `heroku labs --app foobar`. -``` -heroku labs --app foobar -``` - -The output will contain **User Features** and **App Features**. This resource manages App Features. If you need to manage User Features, use the [`heroku_account_feature` resource](account_feature.html). +The output will contain **User Features** and **App Features**. This resource manages App Features. +If you need to manage User Features, use the [`heroku_account_feature` resource](account_feature.html). ## Example Usage -```hcl +```hcl-terraform resource "heroku_app_feature" "log_runtime_metrics" { app = "test-app" name = "log-runtime-metrics" @@ -34,7 +32,9 @@ resource "heroku_app_feature" "log_runtime_metrics" { The following arguments are supported: * `app` - (Required) The Heroku app to link to. + * `name` - (Required) The name of the App Feature to manage. + * `enabled` - (Optional) Whether to enable or disable the App Feature. The default value is true. ## Import diff --git a/website/docs/r/app_release.html.markdown b/docs/resources/app_release.md similarity index 87% rename from website/docs/r/app_release.html.markdown rename to docs/resources/app_release.md index d3dc76bbc..f0b7748e5 100644 --- a/website/docs/r/app_release.html.markdown +++ b/docs/resources/app_release.md @@ -13,10 +13,12 @@ resource. An app release represents a combination of code, config vars and add-ons for an app on Heroku. -~> **NOTE:** This resource requires the slug be uploaded to Heroku using [`heroku_slug`](slug.html) or with external tooling prior to running terraform. +~> **NOTE:** +This resource requires the slug be uploaded to Heroku using [`heroku_slug`](slug.html) +or with external tooling prior to running terraform. ## Example Usage -```hcl +```hcl-terraform resource "heroku_app" "foobar" { name = "foobar" region = "us" @@ -35,7 +37,9 @@ resource "heroku_app_release" "foobar-release" { The following arguments are supported: * `app` - (Required) The name of the application + * `slug_id` - unique identifier of slug + * `description` - description of changes in this release ## Attributes Reference diff --git a/website/docs/r/app_webhook.html.markdown b/docs/resources/app_webhook.md similarity index 95% rename from website/docs/r/app_webhook.html.markdown rename to docs/resources/app_webhook.md index c04d33d64..3c5465d01 100644 --- a/website/docs/r/app_webhook.html.markdown +++ b/docs/resources/app_webhook.md @@ -12,15 +12,16 @@ Provides a [Heroku App Webhook](https://devcenter.heroku.com/categories/app-webh ## Example Usage -```hcl +```hcl-terraform # Create a new Heroku app resource "heroku_app" "foobar" { name = "foobar" + region = "us" } # Add a web-hook for the app resource "heroku_app_webhook" "foobar_release" { - app_id = "${heroku_app.foobar.id}" + app_id = heroku_app.foobar.id level = "notify" url = "https://example.com/heroku_webhook" include = ["api:release"] diff --git a/website/docs/r/build.html.markdown b/docs/resources/build.md similarity index 70% rename from website/docs/r/build.html.markdown rename to docs/resources/build.md index fc0ad2bff..3c78a1fd6 100644 --- a/website/docs/r/build.html.markdown +++ b/docs/resources/build.md @@ -3,7 +3,8 @@ layout: "heroku" page_title: "Heroku: heroku_build" sidebar_current: "docs-heroku-resource-build" description: |- - "Deploy to Heroku" for Terraform. Provides the ability to build & release code from a local or remote source, making it possible to launch apps directly from a Terraform config + "Deploy to Heroku" for Terraform. Provides the ability to build & release code from a local or remote source, + making it possible to launch apps directly from a Terraform config --- # heroku\_build @@ -11,9 +12,11 @@ description: |- Provides a [Heroku Build](https://devcenter.heroku.com/articles/platform-api-reference#build) resource, to deploy source code to a Heroku app. -Either a [URL](#source-urls) or [local path](#local-source), pointing to a [tarball](https://en.wikipedia.org/wiki/Tar_(computing)) of the source code, may be deployed. If a local path is used, it may instead point to a directory of source code, which will be tarballed automatically and then deployed. +Either a [URL](#source-urls) or [local path](#local-source), pointing to a [tarball](https://en.wikipedia.org/wiki/Tar_(computing)) +of the source code, may be deployed. If a local path is used, it may instead point to a directory of source code, which will be tarballed automatically and then deployed. -This resource waits until the [build](https://devcenter.heroku.com/articles/build-and-release-using-the-api) & [release](https://devcenter.heroku.com/articles/release-phase) completes. +This resource waits until the [build](https://devcenter.heroku.com/articles/build-and-release-using-the-api) +& [release](https://devcenter.heroku.com/articles/release-phase) completes. If the build fails, the error will contain a URL to view the build log. `curl "https://the-long-log-url-in-the-error"`. @@ -21,49 +24,59 @@ To start the app from a successful build, use a [Formation resource](formation.h ## Source code layout -The code contained in the source directory or tarball must follow the layout required by the [buildpack](https://devcenter.heroku.com/articles/buildpacks) or the `Dockerfile` for [container builds](https://devcenter.heroku.com/articles/build-docker-images-heroku-yml). +The code contained in the source directory or tarball must follow the layout required by the [buildpack](https://devcenter.heroku.com/articles/buildpacks) +or the `Dockerfile` for [container builds](https://devcenter.heroku.com/articles/build-docker-images-heroku-yml). ### Building with Buildpacks This is the default build process. -For apps that do not have a buildpack set, the [official Heroku buildpacks](https://devcenter.heroku.com/articles/buildpacks#officially-supported-buildpacks) will be searched until a match is detected and used to compile the app. +For apps that do not have a buildpack set, the [official Heroku buildpacks](https://devcenter.heroku.com/articles/buildpacks#officially-supported-buildpacks) +will be searched until a match is detected and used to compile the app. -A [`Procfile`](https://devcenter.heroku.com/articles/procfile) may be required to successfully launch the app. Some buildpacks provide a default web process, such as [`npm start` for Node.js](https://devcenter.heroku.com/articles/nodejs-support#default-web-process-type). Other buildpacks may require a `Procfile`, like for a [pure Ruby app](https://devcenter.heroku.com/articles/ruby-support#ruby-applications-process-types). +A [`Procfile`](https://devcenter.heroku.com/articles/procfile) may be required to successfully launch the app. +Some buildpacks provide a default web process, such as [`npm start` for Node.js](https://devcenter.heroku.com/articles/nodejs-support#default-web-process-type). +Other buildpacks may require a `Procfile`, like for a [pure Ruby app](https://devcenter.heroku.com/articles/ruby-support#ruby-applications-process-types). ### Building with Docker To use container builds, set the parent `heroku_app` resource's `stack = "container"` -A [`heroku.yml` manifest](https://devcenter.heroku.com/articles/build-docker-images-heroku-yml#heroku-yml-overview) file is required to declare which `Dockerfile` to build for each process. Be careful not to create conflicting configuration between `heroku.yml` and Terraform, such as addons or config vars. +A [`heroku.yml` manifest](https://devcenter.heroku.com/articles/build-docker-images-heroku-yml#heroku-yml-overview) +file is required to declare which `Dockerfile` to build for each process. Be careful not to create conflicting configuration +between `heroku.yml` and Terraform, such as addons or config vars. ## Source URLs -A `source.url` may point to any `https://` URL that responds to a `GET` with a tarball source code. When running `terraform apply`, the source code will only be fetched once for a successful build. Change the URL to force a new resource. +A `source.url` may point to any `https://` URL that responds to a `GET` with a tarball source code. When running `terraform apply`, +the source code will only be fetched once for a successful build. Change the URL to force a new resource. Useful for building public, open-source source code, such as projects that publish releases on GitHub. ### GitHub URLs -GitHub provides [release](https://help.github.com/articles/creating-releases/) tarballs through URLs. Create a release and then use the tag as a `source.url`, such as: +GitHub provides [release](https://help.github.com/articles/creating-releases/) tarballs through URLs. Create a release +and then use the tag as a `source.url`, such as: ``` https://github.com/username/example/archive/v1.0.0.tar.gz ``` -Using a branch or master `source.url` is possible, but be aware that tracking down exactly what commit was deployed for a given `terraform apply` may be difficult. On the other hand, using stable release tags ensures repeatability of the Terraform configuration. +Using a branch or master `source.url` is possible, but be aware that tracking down exactly what commit was deployed +for a given `terraform apply` may be difficult. On the other hand, using stable release tags ensures repeatability +of the Terraform configuration. ### Example Usage with Source URL -```hcl +```hcl-terraform resource "heroku_app" "foobar" { name = "foobar" region = "us" } resource "heroku_build" "foobar" { - app = "${heroku_app.foobar.id}" + app = heroku_app.foobar.id buildpacks = ["https://github.com/mars/create-react-app-buildpack"] - source = { + source { # This app uses a community buildpack, set it in `buildpacks` above. url = "https://github.com/mars/cra-example-app/archive/v2.1.1.tar.gz" version = "v2.1.1" @@ -71,7 +84,7 @@ resource "heroku_build" "foobar" { } resource "heroku_formation" "foobar" { - app = "${heroku_app.foobar.id}" + app = heroku_app.foobar.id type = "web" quantity = 1 size = "Standard-1x" @@ -93,16 +106,16 @@ When running `terraform apply`, if the contents (SHA256) of the source path chan ### Example Usage with Local Source Directory -```hcl +```hcl-terraform resource "heroku_app" "foobar" { name = "foobar" region = "us" } resource "heroku_build" "foobar" { - app = "${heroku_app.foobar.id}" + app = heroku_app.foobar.id - source = { + source { # A local directory, changing its contents will # force a new build during `terraform apply` path = "src/example-app" @@ -110,7 +123,7 @@ resource "heroku_build" "foobar" { } resource "heroku_formation" "foobar" { - app = "${heroku_app.foobar.id}" + app = heroku_app.foobar.id type = "web" quantity = 1 size = "Standard-1x" @@ -125,10 +138,13 @@ The following arguments are supported: * `app` - (Required) The ID of the Heroku app * `buildpacks` - List of buildpack GitHub URLs * `source` - (Required) A block that specifies the source code to build & release: - * `checksum` - Hash of the source archive for verifying its integrity, auto-generated when `source.path` is set, `SHA256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855` + * `checksum` - Hash of the source archive for verifying its integrity, auto-generated when `source.path` is set, + `SHA256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855` * `path` - (Required unless `source.url` is set) Local path to the source directory or tarball archive for the app * `url` - (Required unless `source.path` is set) `https` location of the source archive for the app - * `version` - Use to track what version of your source originated this build. If you are creating builds from git-versioned source code, for example, the commit hash, or release tag would be a good value to use for the version parameter. + * `version` - Use to track what version of your source originated this build. If you are creating builds + from git-versioned source code, for example, the commit hash, or release tag would be a good value to use for the + version parameter. ## Attributes Reference diff --git a/website/docs/r/cert.html.markdown b/docs/resources/cert.md similarity index 88% rename from website/docs/r/cert.html.markdown rename to docs/resources/cert.md index 45df39346..e855c62fe 100644 --- a/website/docs/r/cert.html.markdown +++ b/docs/resources/cert.md @@ -12,23 +12,24 @@ Provides a Heroku SSL certificate resource. It allows to set a given certificate ## Example Usage -```hcl +```hcl-terraform # Create a new Heroku app resource "heroku_app" "default" { name = "test-app" + region = "us" } # Add-on SSL to application resource "heroku_addon" "ssl" { - app = "${heroku_app.default.name}" + app = heroku_app.default.name plan = "ssl" } # Establish certificate for a given application resource "heroku_cert" "ssl_certificate" { - app = "${heroku_app.default.name}" - certificate_chain = "${file("server.crt")}" - private_key = "${file("server.key")}" + app = heroku_app.default.name + certificate_chain = file("server.crt") + private_key = file("server.key") depends_on = ["heroku_addon.ssl"] } ``` diff --git a/website/docs/r/collaborator.html.markdown b/docs/resources/collaborator.md similarity index 77% rename from website/docs/r/collaborator.html.markdown rename to docs/resources/collaborator.md index f970ab197..71acb373c 100644 --- a/website/docs/r/collaborator.html.markdown +++ b/docs/resources/collaborator.md @@ -8,16 +8,23 @@ description: |- # heroku\_collaborator -A [Heroku Collaborator](https://devcenter.heroku.com/articles/platform-api-reference#collaborator) receives access to a specific app that is not owned by a team. +A [Heroku Collaborator](https://devcenter.heroku.com/articles/platform-api-reference#collaborator) +receives access to a specific app that is not owned by a team. -~> **NOTE:** This resource only works for apps that are not part of a team +~> **IMPORTANT!:** +This resource only works for apps that are not part of a team. ## Example Usage -```hcl +```hcl-terraform +resource "heroku_app" "foobar" { + name = "foobar" + region = "us" +} + # Create a new collaborator for the foobar application resource "heroku_collaborator" "foobar-collaborator" { - app = "${heroku_app.foobar.name}" + app = heroku_app.foobar.name email = "collaborator@foobar.com" } ``` diff --git a/website/docs/r/config.html.markdown b/docs/resources/config.md similarity index 95% rename from website/docs/r/config.html.markdown rename to docs/resources/config.md index c8f16855b..be70fd985 100644 --- a/website/docs/r/config.html.markdown +++ b/docs/resources/config.md @@ -12,10 +12,11 @@ to be used throughout your Heroku terraform configurations. Combined with `herok these two resources enable users to decouple setting config var(s) from the `heroku_app` resource. ~> **NOTE:** Unlike most Terraform resources, this resource **DOES NOT** by itself create, update or delete anything in Heroku. -A [`heroku_app_config_association`](app_config_association.html), `heroku_app.config_vars`, or `heroku_app.sensitive_config_vars` is required to actually set these values on Heroku apps. +A [`heroku_app_config_association`](app_config_association.html), `heroku_app.config_vars`, or `heroku_app.sensitive_config_vars` +is required to actually set these values on Heroku apps. ## Example HCL -```hcl +```hcl-terraform resource "heroku_config" "endpoints" { vars = { x = "https://..." diff --git a/website/docs/r/domain.html.markdown b/docs/resources/domain.md similarity index 92% rename from website/docs/r/domain.html.markdown rename to docs/resources/domain.md index 640b41644..df3be1951 100644 --- a/website/docs/r/domain.html.markdown +++ b/docs/resources/domain.md @@ -13,15 +13,16 @@ create and manage custom domains on Heroku. ## Example Usage -```hcl +```hcl-terraform # Create a new Heroku app resource "heroku_app" "default" { name = "test-app" + region = "us" } # Associate a custom domain resource "heroku_domain" "default" { - app = "${heroku_app.default.name}" + app = heroku_app.default.name hostname = "terraform.example.com" } ``` @@ -37,7 +38,7 @@ The following arguments are supported: The following attributes are exported: -* `id` - The ID of the of the domain record. +* `id` - The ID of the domain record. * `hostname` - The hostname traffic will be served as. * `cname` - The CNAME traffic should route to. diff --git a/website/docs/r/drain.html.markdown b/docs/resources/drain.md similarity index 90% rename from website/docs/r/drain.html.markdown rename to docs/resources/drain.md index 0ea99595e..5e3421b01 100644 --- a/website/docs/r/drain.html.markdown +++ b/docs/resources/drain.md @@ -13,9 +13,14 @@ create and manage Log Drains on Heroku. ## Example Usage -```hcl +```hcl-terraform +resource "heroku_app" "foobar" { + name = "foobar" + region = "us" +} + resource "heroku_drain" "default" { - app = "test-app" + app = heroku_app.foobar.id url = "syslog://terraform.example.com:1234" } ``` diff --git a/website/docs/r/formation.html.markdown b/docs/resources/formation.md similarity index 89% rename from website/docs/r/formation.html.markdown rename to docs/resources/formation.md index eb0b62545..1ee1d0d0d 100644 --- a/website/docs/r/formation.html.markdown +++ b/docs/resources/formation.md @@ -13,16 +13,16 @@ resource. A formation represents the formation of processes that should be set for an application. -~> **NOTE:** -- The application must have a dyno in order to update its formation. -- If the heroku formation resource is removed and deleted, this will be a no-op action in Heroku. +Please note the following: +* The application must have a dyno in order to update its formation. +* If the heroku formation resource is removed and deleted, this will be a no-op action in Heroku. The Heroku Platform does not have a `DELETE` endpoint for `formation`. -- This resource works well with the `heroku_app_release` resource, which allows you to deploy a slug/release to an application +* This resource works well with the `heroku_app_release` resource, which allows you to deploy a slug/release to an application before the formation can be updated. ## Example Usage -```hcl +```hcl-terraform # Creates a new application called foobar resource "heroku_app" "foobar" { name = "foobar" @@ -50,8 +50,11 @@ resource "heroku_formation" "foobar-web" { ## Argument Reference * `app` - (Required) The name of the application + * `type` - (Required) type of process such as "web" + * `quantity` - (Required) number of processes to maintain + * `size` - (Required) dyno size (Example: “standard-1X”). Capitalization does not matter. ## Attributes Reference diff --git a/website/docs/r/pipeline.html.markdown b/docs/resources/pipeline.md similarity index 86% rename from website/docs/r/pipeline.html.markdown rename to docs/resources/pipeline.md index 23b0ee49c..c4d22b752 100644 --- a/website/docs/r/pipeline.html.markdown +++ b/docs/resources/pipeline.md @@ -19,14 +19,16 @@ slugs to the next stage. ## Example Usage -```hcl +```hcl-terraform # Create Heroku apps for staging and production resource "heroku_app" "staging" { name = "test-app-staging" + region = "us" } resource "heroku_app" "production" { name = "test-app-production" + region = "us" } # Create a Heroku pipeline @@ -41,14 +43,14 @@ resource "heroku_pipeline" "test-app" { # Couple apps to different pipeline stages resource "heroku_pipeline_coupling" "staging" { - app = "${heroku_app.staging.name}" - pipeline = "${heroku_pipeline.test-app.id}" + 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}" + app = heroku_app.production.name + pipeline = heroku_pipeline.test-app.id stage = "production" } ``` @@ -67,7 +69,7 @@ The following arguments are supported: Regarding the `owner` attribute block, please note the following: * The Heroku Platform API allows a pipeline to be created without an owner. However, the UI indicates pipelines require an owner. So to improve usability, if the `owner` attribute block is not set in your configuration(s), the pipeline owner -will default to the user that generated the `HEROKU_API_KEY` used to authenticate to the Platform API via this provider. +will default to the user used to authenticate to the Platform API via this provider. ## Attributes Reference diff --git a/website/docs/r/pipeline_config_var.html.markdown b/docs/resources/pipeline_config_var.md similarity index 93% rename from website/docs/r/pipeline_config_var.html.markdown rename to docs/resources/pipeline_config_var.md index 6ba531ffb..3980e98df 100644 --- a/website/docs/r/pipeline_config_var.html.markdown +++ b/docs/resources/pipeline_config_var.md @@ -10,8 +10,8 @@ description: |- Provides a resource to manage a pipeline's config vars. -~> **NOTE:** The pipeline config var API only relates to the config vars that can be set at the pipeline level. -These two supported stages are: +The pipeline config var API can only retrieve config vars that can be set at the pipeline level. +Additionally, these two supported pipeline stages are: - [Heroku CI](https://devcenter.heroku.com/articles/heroku-ci#setting-environment-variables-the-env-key) config vars (test stage) - [Review Apps](https://devcenter.heroku.com/articles/github-integration-review-apps#configuration) config vars (review stage) @@ -19,7 +19,7 @@ The development, staging & production stages do not have stage-level config vars ## Example Usage -```hcl +```hcl-terraform # Create a Heroku pipeline resource "heroku_pipeline" "test-pipeline" { name = "test-app" diff --git a/website/docs/r/pipeline_coupling.html.markdown b/docs/resources/pipeline_coupling.md similarity index 90% rename from website/docs/r/pipeline_coupling.html.markdown rename to docs/resources/pipeline_coupling.md index 66be214c8..4591b1836 100644 --- a/website/docs/r/pipeline_coupling.html.markdown +++ b/docs/resources/pipeline_coupling.md @@ -18,14 +18,16 @@ to the downstream stages. ## Example Usage -```hcl +```hcl-terraform # Create Heroku apps for staging and production resource "heroku_app" "staging" { name = "test-app-staging" + region = "us" } resource "heroku_app" "production" { name = "test-app-production" + region = "us" } # Create a Heroku pipeline @@ -35,14 +37,14 @@ resource "heroku_pipeline" "test-app" { # Couple apps to different pipeline stages resource "heroku_pipeline_coupling" "staging" { - app = "${heroku_app.staging.id}" - pipeline = "${heroku_pipeline.test-app.id}" + app = heroku_app.staging.id + pipeline = heroku_pipeline.test-app.id stage = "staging" } resource "heroku_pipeline_coupling" "production" { - app = "${heroku_app.production.id}" - pipeline = "${heroku_pipeline.test-app.id}" + app = heroku_app.production.id + pipeline = heroku_pipeline.test-app.id stage = "production" } ``` diff --git a/website/docs/r/slug.html.markdown b/docs/resources/slug.md similarity index 72% rename from website/docs/r/slug.html.markdown rename to docs/resources/slug.md index be49ba1a6..b458c3e1a 100644 --- a/website/docs/r/slug.html.markdown +++ b/docs/resources/slug.md @@ -3,7 +3,8 @@ layout: "heroku" page_title: "Heroku: heroku_slug" sidebar_current: "docs-heroku-resource-slug" description: |- - Provides the ability to create & upload a slug (archive of executable code) to an app, making it possible to launch apps directly from a Terraform config + Provides the ability to create & upload a slug (archive of executable code) to an app, + making it possible to launch apps directly from a Terraform config --- # heroku\_slug @@ -11,20 +12,33 @@ description: |- Provides a [Heroku Slug](https://devcenter.heroku.com/articles/platform-api-reference#slug) resource. -This resource supports uploading a pre-generated archive file of executable code, making it possible to launch apps directly from a Terraform config. This resource does not itself generate the slug archive. [A guide to creating slug archives](https://devcenter.heroku.com/articles/platform-api-deploying-slugs) is available in the Heroku Dev Center. +This resource supports uploading a pre-generated archive file of executable code, making it possible to launch apps +directly from a Terraform config. This resource does not itself generate the slug archive. +[A guide to creating slug archives](https://devcenter.heroku.com/articles/platform-api-deploying-slugs) is available +in the Heroku Dev Center. ## Minimal Example Create a ready-to-release slug: -* `file_url` or `file_path` must reference a file containing a slug archive of executable code and must follow the prescribed layout from [Create slug archive](https://devcenter.heroku.com/articles/platform-api-deploying-slugs#create-slug-archive) in the Heroku Dev Center (nested within an `./app` directory) -* The archive may be created by an external build system, downloaded from another Heroku app, or otherwise provided outside of the context of this Terraform resource -* If the content (SHA256) of `file_path` changes, then a new resource will be forced on the next plan/apply; if the file does not exist, the difference is ignored. -* The `file_url` is only fetched during resource creation. To trigger another fetch the `file_url` should be changed, then a new resource will be forced on the next plan/apply. +* `file_url` or `file_path` must reference a file containing a slug archive of executable code + and must follow the prescribed layout from [Create slug archive](https://devcenter.heroku.com/articles/platform-api-deploying-slugs#create-slug-archive) + in the Heroku Dev Center (nested within an `./app` directory) +* The archive may be created by an external build system, downloaded from another Heroku app, + or otherwise provided outside of the context of this Terraform resource +* If the content (SHA256) of `file_path` changes, then a new resource will be forced on the next plan/apply; + if the file does not exist, the difference is ignored. +* The `file_url` is only fetched during resource creation. To trigger another fetch the `file_url` should be changed, + then a new resource will be forced on the next plan/apply. + +```hcl-terraform +resource "heroku_app" "foobar" { + name = "foobar" + region = "us" +} -```hcl resource "heroku_slug" "foobar" { - app = "${heroku_app.foobar.id}" + app = heroku_app.foobar.id file_url = "https://github.com/heroku/terraform-provider-heroku/raw/master/heroku/test-fixtures/slug.tgz" process_types = { @@ -37,7 +51,7 @@ resource "heroku_slug" "foobar" { Complete config to launch a Heroku app: -```hcl +```hcl-terraform resource "heroku_app" "foobar" { name = "foobar" region = "us" @@ -45,7 +59,7 @@ resource "heroku_app" "foobar" { # Create a slug for the app with a local slug archive file resource "heroku_slug" "foobar" { - app = "${heroku_app.foobar.id}" + app = heroku_app.foobar.id buildpack_provided_description = "Ruby" // The slug archive file must already exist file_path = "slug.tgz" @@ -57,13 +71,13 @@ resource "heroku_slug" "foobar" { # Deploy a release to the app with the slug resource "heroku_app_release" "foobar" { - app = "${heroku_app.foobar.id}" - slug_id = "${heroku_slug.foobar.id}" + app = heroku_app.foobar.id + slug_id = heroku_slug.foobar.id } # Launch the app's web process by scaling-up resource "heroku_formation" "foobar" { - app = "${heroku_app.foobar.id}" + app = heroku_app.foobar.id type = "web" quantity = 1 size = "Standard-1x" @@ -76,8 +90,10 @@ resource "heroku_formation" "foobar" { The following arguments are supported: * `app` - (Required) The ID of the Heroku app -* `buildpack_provided_description` - Description of language or app framework, `"Ruby/Rack"`; displayed as the app's language in the Heroku Dashboard -* `checksum` - Hash of the slug for verifying its integrity, auto-generated from contents of `file_path` or `file_url`, `SHA256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855` +* `buildpack_provided_description` - Description of language or app framework, `"Ruby/Rack"`; + displayed as the app's language in the Heroku Dashboard +* `checksum` - Hash of the slug for verifying its integrity, auto-generated from contents of `file_path` or `file_url`, + `SHA256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855` * `commit` - Identification of the code with your version control system (eg: SHA of the git HEAD), `"60883d9e8947a57e04dc9124f25df004866a2051"` * `commit_description` - Description of the provided commit * `file_path` - (Required unless `file_url` is set) Local path to a slug archive, `"slugs/current.tgz"` diff --git a/website/docs/r/space.html.markdown b/docs/resources/space.md similarity index 87% rename from website/docs/r/space.html.markdown rename to docs/resources/space.md index 26182c73e..be982b6c4 100644 --- a/website/docs/r/space.html.markdown +++ b/docs/resources/space.md @@ -15,7 +15,7 @@ Provides a Heroku Private Space resource for running apps in isolated, highly av A Heroku "team" was originally called an "organization", and that is still the identifier used in this resource. -```hcl +```hcl-terraform // Create a new Heroku space resource "heroku_space" "default" { name = "test-space" @@ -26,7 +26,8 @@ resource "heroku_space" "default" { // Create a new Heroku app in test-space resource "heroku_app" "default" { name = "test-app" - space = "${heroku_space.default.name}" + region = "us" + space = heroku_space.default.name organization = { name = "my-company" } @@ -39,8 +40,10 @@ The following arguments are supported: * `name` - (Required) The name of the Private Space. * `organization` - (Required) The name of the Heroku Team which will own the Private Space. -* `cidr` - (Optional) The RFC-1918 CIDR the Private Space will use. It must be a /16 in 10.0.0.0/8, 172.16.0.0/12 or 192.168.0.0/16 -* `data_cidr` - (Optional) The RFC-1918 CIDR that the Private Space will use for the Heroku-managed peering connection that’s automatically created when using Heroku Data add-ons. It must be between a /16 and a /20 +* `cidr` - (Optional) The RFC-1918 CIDR the Private Space will use. + It must be a /16 in 10.0.0.0/8, 172.16.0.0/12 or 192.168.0.0/16 +* `data_cidr` - (Optional) The RFC-1918 CIDR that the Private Space will use for the Heroku-managed peering connection + that’s automatically created when using Heroku Data add-ons. It must be between a /16 and a /20 * `region` - (Optional) provision in a specific [Private Spaces region](https://devcenter.heroku.com/articles/regions#viewing-available-regions). * `shield` - (Optional) provision as a [Shield Private Space](https://devcenter.heroku.com/articles/private-spaces#shield-private-spaces). diff --git a/website/docs/r/space_app_access.markdown b/docs/resources/space_app_access.md similarity index 68% rename from website/docs/r/space_app_access.markdown rename to docs/resources/space_app_access.md index 8468939b5..247a9d984 100644 --- a/website/docs/r/space_app_access.markdown +++ b/docs/resources/space_app_access.md @@ -8,11 +8,13 @@ description: |- # heroku\_space\_app\_access -Provides a resource for managing permissions for the entire Private Space. Members with the admin role will always have full permissions in the Private Space, so using this resource on an admin will have no effect. The provided email must already be a member of the Heroku Team. Currently the only supported permission is `create_apps`. +Provides a resource for managing permissions for the entire Private Space. Members with the admin role will +always have full permissions in the Private Space, so using this resource on an admin will have no effect. +The provided email must already be a member of the Heroku Team. Currently, the only supported permission is `create_apps`. ## Example Usage -```hcl +```hcl-terraform // Create a new Heroku Private Space resource "heroku_space" "default" { name = "test-space" @@ -22,14 +24,14 @@ resource "heroku_space" "default" { // Give an existing team member create_apps permissions to the Private Space resource "heroku_space_app_access" "member1" { - space = "${heroku_space.default.name}" + space = heroku_space.default.name email = "member1@example.com" permissions = ["create_apps"] } // Remove all permissions from an existing team member resource "heroku_space_app_access" "member2" { - space = "${heroku_space.default.name}" + space = heroku_space.default.name email = "member2@example.com" permissions = [] } @@ -41,7 +43,9 @@ The following arguments are supported: * `space` - (Required) The name of the Private Space. * `email` - (Required) The email of the existing Heroku Team member. -* `permissions` - (Required) The permissions to grant the team member for the Private Space. Currently `create_apps` is the only supported permission. If not provided the member will have no permissions to the space. Members with admin role will always have `create_apps` permissions, which cannot be removed. +* `permissions` - (Required) The permissions to grant the team member for the Private Space. + Currently `create_apps` is the only supported permission. If not provided the member will have no permissions to the space. + Members with admin role will always have `create_apps` permissions, which cannot be removed. ## Importing diff --git a/website/docs/r/space_inbound_ruleset.html.markdown b/docs/resources/space_inbound_ruleset.md similarity index 98% rename from website/docs/r/space_inbound_ruleset.html.markdown rename to docs/resources/space_inbound_ruleset.md index 7f580fa43..ccba9d68c 100644 --- a/website/docs/r/space_inbound_ruleset.html.markdown +++ b/docs/resources/space_inbound_ruleset.md @@ -12,7 +12,7 @@ Provides a resource for managing [inbound rulesets](https://devcenter.heroku.com ## Example Usage -```hcl +```hcl-terraform # Create a new Heroku space resource "heroku_space" "default" { name = "test-space" diff --git a/website/docs/r/space_peering_connection_accepter.html.markdown b/docs/resources/space_peering_connection_accepter.md similarity index 76% rename from website/docs/r/space_peering_connection_accepter.html.markdown rename to docs/resources/space_peering_connection_accepter.md index 40da666f2..3f22e39b4 100644 --- a/website/docs/r/space_peering_connection_accepter.html.markdown +++ b/docs/resources/space_peering_connection_accepter.md @@ -12,7 +12,7 @@ Provides a resource for accepting VPC peering requests to Heroku Private Spaces. ## Example Usage -```hcl +```hcl-terraform # Fetch the peering information for the Heroku Private Space. data "heroku_space_peering_info" "peer_space" { name = "my-fancy-space" @@ -20,15 +20,15 @@ data "heroku_space_peering_info" "peer_space" { # Initiate the request. resource "aws_vpc_peering_connection" "request" { - peer_owner_id = "${data.heroku_space_peering_info.peer_space.aws_account_id}" - peer_vpc_id = "${data.heroku_space_peering_info.peer_space.vpc_id}" - vpc_id = "${aws_vpc.main.id}" + peer_owner_id = data.heroku_space_peering_info.peer_space.aws_account_id + peer_vpc_id = data.heroku_space_peering_info.peer_space.vpc_id + vpc_id = aws_vpc.main.id } # Accept the request. resource "heroku_space_peering_connection_accepter" "accept" { - space = "${heroku_space.peer_space.id}" - vpc_peering_connection_id = "${aws_vpc_peering_connection.request.id}" + space = heroku_space.peer_space.id + vpc_peering_connection_id = aws_vpc_peering_connection.request.id } ``` diff --git a/website/docs/r/space_vpn_connection.html.markdown b/docs/resources/space_vpn_connection.md similarity index 96% rename from website/docs/r/space_vpn_connection.html.markdown rename to docs/resources/space_vpn_connection.md index cea629e91..5d536eb2e 100644 --- a/website/docs/r/space_vpn_connection.html.markdown +++ b/docs/resources/space_vpn_connection.md @@ -12,7 +12,7 @@ Provides a resource for creating a VPN connection between a network and a Heroku ## Example Usage -```hcl +```hcl-terraform // Create a new Heroku space resource "heroku_space" "default" { name = "test-space" @@ -23,7 +23,7 @@ resource "heroku_space" "default" { // Connect the Heroku space to another network with a VPN resource "heroku_space_vpn_connection" "office" { name = "office" - space = "${heroku_space.default.id}" + space = heroku_space.default.id public_ip = "203.0.113.1" routable_cidrs = ["192.168.1.0/24"] } diff --git a/website/docs/r/team_collaborator.html.markdown b/docs/resources/team_collaborator.md similarity index 70% rename from website/docs/r/team_collaborator.html.markdown rename to docs/resources/team_collaborator.md index deb79883a..9914360ba 100644 --- a/website/docs/r/team_collaborator.html.markdown +++ b/docs/resources/team_collaborator.md @@ -8,20 +8,32 @@ description: |- # heroku\_team\_collaborator -A [Heroku Team Collaborator](https://devcenter.heroku.com/articles/platform-api-reference#team-app-collaborator) receives access to a specific Team-owned app. +A [Heroku Team Collaborator](https://devcenter.heroku.com/articles/platform-api-reference#team-app-collaborator) +receives access to a specific Team-owned app. -To create a Heroku Team, use the [New Team](https://dashboard.heroku.com/teams/new) feature of Heroku Dashboard. For Heroku Enterprise accounts, new Teams may be created within the account by users with the right permissions. +To create a Heroku Team, use the [New Team](https://dashboard.heroku.com/teams/new) feature of Heroku Dashboard. +For Heroku Enterprise accounts, new Teams may be created within the account by users with the right permissions. -A Heroku "team" was originally called an "organization", and that is still the identifier used elsewhere in this provider. For [`heroku_app`](app.html) & [`heroku_space`](space.html) resources, set the Heroku Team name as the "organization". +A Heroku "team" was originally called an "organization", and that is still the identifier used elsewhere in this provider. +For [`heroku_app`](app.html) & [`heroku_space`](space.html) resources, set the Heroku Team name as the "organization". -~> **NOTE:** This resource only works for Team-owned apps +~> **IMPORTANT:** +This resource only works for Team-owned apps. ## Example Usage -```hcl +```hcl-terraform +resource "heroku_app" "foobar" { + name = "some name" + region = "us" + organization { + name = "some organization" + } +} + # Create a new team collaborator for the foobar application that has view, operate, manage permissions resource "heroku_team_collaborator" "foobar-collaborator" { - app = "${heroku_app.foobar.name}" + app = heroku_app.foobar.name email = "collaborator@foobar.com" permissions = ["view", "operate", "manage"] } diff --git a/website/docs/r/team_member.html.markdown b/docs/resources/team_member.md similarity index 98% rename from website/docs/r/team_member.html.markdown rename to docs/resources/team_member.md index a320e4e5d..d445e8a34 100644 --- a/website/docs/r/team_member.html.markdown +++ b/docs/resources/team_member.md @@ -16,7 +16,7 @@ A Heroku "team" was originally called an "organization", and that is still the i ## Example Usage -```hcl +```hcl-terraform # Adds a Heroku user to a Heroku team as a viewer. resource "heroku_team_member" "foobar-member" { team = "my-team" diff --git a/website/heroku.erb b/website/heroku.erb deleted file mode 100644 index 8aa10e13b..000000000 --- a/website/heroku.erb +++ /dev/null @@ -1,145 +0,0 @@ -<% wrap_layout :inner do %> - <% content_for :sidebar do %> - - <% end %> - - <%= yield %> - <% end %>