Cli: Heroku not creating addons specified in heroku.yml

Created on 6 Dec 2019  路  7Comments  路  Source: heroku/cli

This project is for the Heroku CLI only. Use https://help.heroku.com for anything that is not specific to the CLI itself.

Do you want to request a feature or report a bug?

If bug, first try running heroku update and setting DEBUG=* to see extra debug information.

Report a bug.

What is the current behavior?

If the current behavior is a bug, please provide the steps to reproduce.

Heroku does not provision MLab Mongo database after deployment when using heroku.yml file.

What is the expected behavior?

Please mention your heroku and OS version. Please state if you are behind an HTTP proxy or company firewall as well.

heroku/7.35.0
Windows 10 and Ubuntu 16.04

With the following heroku.yml file, I expect after the build is completed, Heroku will provision a mongo database.

setup:
    addons:
    - plan: mongolab:sandbox
build:
    docker:
        web: heroku/Dockerfile

Most helpful comment

I also struggled with this, and eventually found that:

  • The setup section is in beta, which might be why it's shaky
  • Config vars have the same problem
  • Both config vars and addons are created if they're in heroku.yml when you create the app with the heroku create command, but they're not created by git push. Which is obviously a problem, we shouldn't have to recreate apps to use this feature.

If solving this problem is hard, can I suggest at least showing a warning when heroku.yml has a setup section that isn't going to be used, e.g. because the app isn't being created from scratch, or the CLI doesn't have the right plugin installed?

All 7 comments

Just wanted to chime in and say that I had exactly the same issue, and after several hours of debugging wasn't able to solve it. Had to manually provision things in the dashboard.

I also struggled with this, and eventually found that:

  • The setup section is in beta, which might be why it's shaky
  • Config vars have the same problem
  • Both config vars and addons are created if they're in heroku.yml when you create the app with the heroku create command, but they're not created by git push. Which is obviously a problem, we shouldn't have to recreate apps to use this feature.

If solving this problem is hard, can I suggest at least showing a warning when heroku.yml has a setup section that isn't going to be used, e.g. because the app isn't being created from scratch, or the CLI doesn't have the right plugin installed?

I have the same problem too. And the documentation section does not say anything about this problem at all. At least showing a warning log so I know that this is not a configuration problem.

had the same issue, had to manually install.
My setup was

setup:
  addons:
    - plan: heroku-postgresql:hobby-dev
      as: DATABASE
    - plan: heroku-redis:hobby-dev
      as: REDIS

Struggling with the same issue. I understand that the feature is still in beta, but the overall documentation about heroku.yml is rather sparse, and it's rather frustrating because I _really_ want to use it!

Could someone from @heroku-cli chime in on this?
PS: just emailed heroku-build-manifest-feedback at salesforce.com see if they can offer additional insights

I think there is some confusion about how this works. The setup section only is used for creating the app, i.e. when you run heroku create --manifest. It doesn't do anything when pushing code to the app with git push.

It's very similar to how the app.json works when creating Review Apps. It's only used for app creation, subsequent changes to the app.json don't get applied to an already existing Review App.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

a3785lex picture a3785lex  路  4Comments

pushcx picture pushcx  路  7Comments

thegmann picture thegmann  路  3Comments

beerlington picture beerlington  路  9Comments

imujjwal96 picture imujjwal96  路  6Comments