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

The repository_file data source throws an error when trying to access a non-existent file #1131

Closed
galargh opened this issue Apr 28, 2022 · 3 comments · Fixed by #1129
Closed
Labels
Type: Bug Something isn't working as documented

Comments

@galargh
Copy link
Contributor

galargh commented Apr 28, 2022

Affected Resource(s)

Please list the resources as a list, for example:

  • data.github_repository_file

Expected Behavior

The repository_file data source allows checking if a specific file exists in a repository. The same way that branchdata source, for example, does (see: https://github.com/integrations/terraform-provider-github/blob/main/github/data_source_github_branch.go#L52).

Actual Behavior

The repository_file data source throws an error when trying to get a file which does not exist (see: https://github.com/integrations/terraform-provider-github/blob/main/github/data_source_github_repository_file.go#L82).

References

@mwos-sl
Copy link

mwos-sl commented May 13, 2022

I need similar thing as a workaround for a bug (#1148), to basically have an ability to check if a file exists in a given repo.

@github-actions
Copy link

github-actions bot commented Feb 8, 2023

👋 Hey Friends, this issue has been automatically marked as stale because it has no recent activity. It will be closed if no further activity occurs. Please add the Status: Pinned label if you feel that this issue needs to remain open/active. Thank you for your contributions and help in keeping things tidy!

@github-actions github-actions bot added the Status: Stale Used by stalebot to clean house label Feb 8, 2023
@galargh
Copy link
Contributor Author

galargh commented Feb 9, 2023

AFAIK, it's still applicable.

@github-actions github-actions bot removed the Status: Stale Used by stalebot to clean house label Feb 10, 2023
@kfcampbell kfcampbell added Type: Bug Something isn't working as documented Priority: Normal labels Feb 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Something isn't working as documented
Projects
None yet
3 participants