RepositoryFile unable to use branchSelector due to wrong value returned
Closed this issue · 0 comments
When attempting to use RepositoryFile
resource with a branchSelector
instead of branch
, the value returned by the referenced object is the terraform ID of the branch resource, which unfortunately is not simply the branch name, but a repository_name:branch
combination.
E.g.: my-repo:main
instead of main
.
This in turn causes an endless and confusing error in the RepositoryFile
resource:
unexpected status code: 404 Not Found
Because the resource expects to receive only the branch name, using the branch
field instead of branchSelector
works.
I believe this can be fixed rather easily by using the Extractor
option in the config.Reference
object to let it know which field should be returned upon discovering the branch resource in branchSelector
.