apps: Only warn on read if there is no active deployment. #843
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
resourceDigitalOceanAppRead
currently errors out if there is no active deployment. This can cause issues in a few circumstances as an app can exist in a state where there are no active deployments. Changing this to be a warning allows for importing existing apps that do not have active deployments. It also allows forterraform apply
to succeed if something outside of Terraform has caused an existing app to have no active deployments. Since deployments can be triggered by pushes to the app's repo, Terraform doesn't really handle the state of deployments, only the "app" resource.This does not change the existing behavior for creates of new apps. We still poll until the app deployment succeeds and error if it fails. It's possible we might want to reconsider this in the future, but that has other considerations. This does help recovering from a failed create. Running
terraform untaint digitalocean_app.{name}
will now allow applies to complete successfully.Fixes: #842