Skip to content
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

apps: Only warn on read if there is no active deployment. #843

Merged
merged 1 commit into from
Jun 23, 2022

Conversation

andrewsomething
Copy link
Member

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 for terraform 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

@andrewsomething andrewsomething requested a review from a team June 21, 2022 18:26
@andrewsomething andrewsomething temporarily deployed to Acceptance Tests June 21, 2022 18:27 Inactive
Copy link
Contributor

@scotchneat scotchneat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@scotchneat scotchneat merged commit c0291e0 into main Jun 23, 2022
@scotchneat scotchneat deleted the asb/issues/842 branch June 23, 2022 17:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unable to retry terraform apply for an app with service and job after it fails to deploy once.
2 participants