Comments (10)
Proposed solution will be add some exponential backoff potentially.
from terraform-provider-heroku.
I ran into a form of this the other week as well. In my case the app already existed in the statefile, but I was adding a heroku_domain
. Of course re-running apply can get one past the problem, but that's far from ideal and not expected.
The aws provider client has some built-in retry/backoff mechanism, we might look to see if that can be extracted. I've also use https://github.com/cenkalti/backoff before, but I would like to get some additional 👀 on it to see if that looks like a dependency we want to bring in.
Ideally, I'd like to see retry logic built into the client, that way we get this for free across all our API calls and don't have to retrofit retry logic everywhere. I'll open a discussion in https://github.com/heroku/heroku-go.
from terraform-provider-heroku.
Actually perhaps the right thing to do here is use this: https://godoc.org/github.com/hashicorp/terraform/helper/resource#StateRefreshFunc
from terraform-provider-heroku.
I think using StateRefreshFunc is the more appropriate solution for this case, rather than baking retries into the client.
from terraform-provider-heroku.
Agreed, the more I think about it the more that seems like the right thing to do.
from terraform-provider-heroku.
@talbright Thinking about this more, I think the refresh should be done on the app after creation. By waiting there for the app to be ready, we would also fix https://github.com/terraform-providers/terraform-provider-heroku/issues/37 and anything else which depends on the app being provisioned for resources to be added. It would be a smarter version of the work-around that we've been using of introducing a sleep after app creation (https://github.com/terraform-providers/terraform-provider-heroku/issues/37#issuecomment-356378747).
from terraform-provider-heroku.
That makes sense to me as well. There's an issue with a couple of tests, I'm waiting to hear back from @davidji99 on and get those cleared out. If this hasn't been worked on by the time I get that cleaned up, I will implement the fix suggested here on the app resource.
from terraform-provider-heroku.
Hitting this up next.
from terraform-provider-heroku.
@bernerdschaefer I don't see anything in the production API for checking app status. I could hit the webhook API and look for past events, but that seems dodgy. There's a status field for the domain endpoint (https://devcenter.heroku.com/articles/platform-api-reference#domain) but that wouldn't fix the original issue here:
heroku_domain.app: Post https://api.heroku.com/apps/meh/domains: App meh is being provisioned. Please try again later.
Now I can fix this in the heroku resource by greping for this error message. That would not however fix if for the broader scenerios we have discussed here.
from terraform-provider-heroku.
Addressed by #142
from terraform-provider-heroku.
Related Issues (20)
- SSL Endpoint has been shutdown by Heroku
- Consistent use of ReviewApp resource HOT 21
- Confirm option for heroku_addon uses app id instead of app name. HOT 2
- heroku_team_collaborator.app_id requires potentially costly lookups HOT 4
- Invalid credentials provided Issue HOT 2
- heroku_cert no longer works
- heroku_build resource seems to not take Config Vars into account HOT 6
- Release Action: failed to publish artifacts HOT 1
- heroku_space data source returns name for ID
- Terraform keeps saying there's a change to be applied to a `heroku_config` resource, even after applying. HOT 11
- Creating a formation with quantity=0 is not respected (but updating to 0 is respected) HOT 3
- `heroku_slug` connection reset error when uploading to AWS S3
- feature request: formation batch updates HOT 4
- Is it still possible to use the Heroku provider after Heroku now rejects Basic Authentication? HOT 3
- Addon could not be found. But addon exists in the Heroku addon library. HOT 4
- Manage Heroku enterprise-level resources (particularly enterprise users)
- How to Specify `entrypoint` for `heroku_app` ? HOT 5
- Wait for ACM (Automated Certificate Management)? HOT 1
- API error when managing users "Requested range order is not allowed" HOT 4
- Option to make `heroku_app_config_association` destroy no-op? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from terraform-provider-heroku.