heroku/terraform-provider-heroku

Confirm option for heroku_addon uses app id instead of app name.

Closed this issue · 2 comments

Running

Terraform v1.1.0
+ provider.heroku v5.0.1

Affected Resource(s):

  • heroku_addon

Expected Behavior

Addon is created with need to confirm app name.

Actual Behavior

Creating a database addon in an app inside a private space that requires confirmation as per Heroku Private Space docs gives the following error:

| Error: Post "https://api.heroku.com/apps/<REDACTED>/addons": This add-on is not automatically networked with this Private Space.
| in resource "heroku_addon" "database":
│   67: resource "heroku_addon" "database" {
│

Steps to Reproduce

A heroku_app in a heroku_space with a database heroku_addon should do it.

Important Factoids

Looking through the code, it appears that during the 4.5 => 5.0 upgrade swapping out of all the app names to app ids ended up swapping the confirm option for heroku_addon resource here. So it tries to confirm with app id instead of app name and subsequently fails.

mars commented

Thanks for opening this clear issue @ForgeRubenAguilar 😄

Fortunately that's an easy fix: PR #335 is now running acceptance tests, and we'll await a collaborator approval before merging and releasing.

mars commented

Fix published as v5.0.2.