Skip to content

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

Merged
scotchneat merged 1 commit intomainfrom
asb/issues/842
Jun 23, 2022
Merged

apps: Only warn on read if there is no active deployment.#843
scotchneat merged 1 commit intomainfrom
asb/issues/842

Conversation

@andrewsomething
Copy link
Copy Markdown
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
Copy Markdown
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