Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Running apply multiple times with Heroku addon results in error for addons without plan names #198

Closed
nathancarnes opened this issue Aug 19, 2014 · 4 comments

Comments

@nathancarnes
Copy link

In v0.1.1, if I provision a Heroku addon with the name only (and no plan) and run apply, everything is hunky dory, but the second time I run apply, I receive an error:

heroku_addon.memcachier: Modifying...
  plan: "memcachier:dev" => "memcachier"
heroku_addon.memcachier: Error: That add-on plan is already installed on safe-dawn-5110.
heroku_domain.client: Destruction complete
dnsimple_record.foobar: Destruction complete
Error applying plan:

1 error(s) occurred:

* That add-on plan is already installed on safe-dawn-5110.

Config:

provider "heroku" {
  email = "ddraper@scdp.com"
  api_key = "yep"
}

resource "heroku_app" "foo" {
}

resource "heroku_addon" "memcachier" {
  app = "${heroku_app.foo.name}"
  plan = "memcachier"
}

Specifying the plan works as expected: memcachier:dev. This may be an issue on Heroku's end (since they're allowing users to provision addons without an explicit plan name), but if that's the case it might be worth adding to the docs as a gotcha.

@pearkes
Copy link
Contributor

pearkes commented Aug 19, 2014

Hm, yea, I guess it doesn't send back an error if the plan name is "wrong"?

@nathancarnes
Copy link
Author

I think it's sending back the correct name of the default plan (memcachier:dev), which is then mis-matched with the state file, so on the next apply it shows as not being provisioned.

FWIW, I think most/all Heroku addons have the potential for this problem.

@mitchellh
Copy link
Contributor

Fixed

@nathancarnes
Copy link
Author

👍 awesome, thanks for your work on this!

vanstee pushed a commit to vanstee/terraform that referenced this issue Sep 28, 2017
@ghost ghost locked and limited conversation to collaborators May 5, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants