Heroku seems to be ignoring addons section in app.json

72 Views Asked by At

I have a project with app.json, and I am trying to add additional addons to be deployed with review apps, however, the addons are not being created when I destroy and recreate the review app.

Here is my app.json:

{
  "name": "Redacted product",
  "description": "The backend for the Redacted Platform",
  "keywords": [],
  "website": "http://Redacted.com/",
  "repository": "https://github.com/Redacted/redacted",
  "success_url": "/api/schema/swagger-ui/",
  "env": {
    "REDACTED": {
      "value": "redacted"
    },
  },
  "formation": {
    "web": {
      "quantity": 1,
      "size": "basic"
    }
  },
  "addons": [
    "papertrail",
    "heroku-redis",
    {
      "plan": "heroku-postgresql",
      "options": {
        "version": "14"
      }
    }
  ],
  "buildpacks": [
    {
      "url": "heroku/python"
    },
    {
      "url": "https://github.com/buyersight/heroku-google-application-credentials-buildpack"
    }
  ],
  "environments": {
    "review": {
      "addons": [
        "autoidle:hobby"
      ]
    }
  }
}

With this app.json, postgres and autoidle are added, and the environment variables work, however, heroku-redis and papertrail are not added.

I have tried:

  • Removing postgres from addons, strangely it still gets added when I destroy and recreate the review app.
  • Having papertrail as an object instead of a string, eg {"plan": "papertrail"}
  • Destroying and recreating the review app

Does anyone have any suggestions?

1

There are 1 best solutions below

0
On

The answer is that the addons had to be added in environments -> review -> addons and not the top level addons.