github_repository_collaborator error on read when repository 404 #343
Labels
Good first issue
Good for newcomers
Status: Up for grabs
Issues that are ready to be worked on by anyone
Type: Bug
Something isn't working as documented
When a repository is deleted manually, a read for a collaborator resource on that repository errors instead of just removing from state on a 404:
Error: GET https://api.github.com/repos/terraform-providers/terraform-provider-atlas/invitations?per_page=100: 404 Not Found []
If the repo is 404, this should exit gracefully and just set ID to empty string, not propagate the error:
https://github.com/terraform-providers/terraform-provider-github/blob/70683693d1a602276f73ce687b1faec9e3607416/github/resource_github_repository_collaborator.go#L100
here is how it is done on the repo resource itself:
https://github.com/terraform-providers/terraform-provider-github/blob/70683693d1a602276f73ce687b1faec9e3607416/github/resource_github_repository.go#L276-L280
The text was updated successfully, but these errors were encountered: