-
Notifications
You must be signed in to change notification settings - Fork 77
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
heroku_addon follower option for dbs #236
Comments
Unfortunately the Heroku Data APIs to perform these operations is not GA (generally available). Our policy with this provider is to only use GA, officially documented and maintained Heroku APIs. |
I second this request. I understand Heroku doesn't want to use non-GA APIs from the provider then... I'd ask for the required APIs to be made GA first :). In the meantime... should I expect any undesired side-effects if I create a follower using Heroku's CLI, then import it to terraform's state as a managed resource? |
Actually... I was able to create a follower from Terraform in my tests. USE THIS AT YOUR OWN RISK UNTIL SOMEONE FROM HEROKU CONFIRMS resource "heroku_addon" "follower-database" {
app_id = heroku_app.my_app.id
plan = "heroku-postgresql:standard-2"
config = {
follow: "postgresql-xxxxxx-12345" # Here goes the name of the DB addon you want to follow
}
} |
That's a clever find @oboxodo 😄 🙌 Those Meaning that changing that I'd recommend leaving that |
@mars haha. Yes. Thanks for your fast reply! I learned that after creating the follower. The following One important thing to consider is that the provider "heroku" {
timeouts {
addon_create_timeout = 35 # Defaults to 20 minutes but some tasks like creating a follower DB can create longer.
}
} I'LL REPEAT MYSELF HERE: USE THIS AT YOUR OWN RISK. |
Just as an FYI, I attempted to model PG follower as a resource here but it got quite complex, so I gave up. One thing I remembered was how to handle when a follower is promoted to primary, which would be an out-of-band change. |
Terraform Version
Terraform v0.12.7
Heroku Provider Version
Affected Resource(s)
Please list the resources as a list, for example:
Right now our configuration is ignorant that we would want to create our databases as followers when running an apply step.
I've searched documentation and looking at the relevant go file it doesn't seem to be possible at the moment.
This of course could be a very important feature. Ideally it could be something that also allows it to be used with a second app like the CLI docs describe.
The text was updated successfully, but these errors were encountered: