terraform-provider-gitlab
terraform-provider-gitlab copied to clipboard
[Feature Request] Container Registry data sources
For a given Project, it would be super helpful to have a Data source for a Repository and it's (Container) Registry - this for example can help with retreiving branches, latest commit hash, and latest gitlab Registry tag. This can then be used in deployments (e.g. in conjunction with the Kubernetes provider).
I know this was opened a couple years ago, but I'm interested in hearing some more details.
For branches -- The gitlab_project
resource already gives you the default branch name. Do you need the ability to list all branches? Or just to get the most recent commit SHA for a known branch name?
For registry -- Is getting just the most recent tag enough, or do you need to list multiple tags? Also, do we need some kind of search string input for filtering?
You mention a data source for the repository as well, but from what you describe it doesn't sound like there's a need for it. Correct me if I'm wrong. 😄
Marking this issue as stale due to 120 days of inactivity. If this issue receives no comments in the next 30 days it will be closed. Maintainers can also remove the stale
label.
Please comment with more information if you would like this issue to remain open.
@armsnyder I believe this issue/feature is still relevant. Great questions, I'll try to add my fifty cents. (it was two cents but grew with inflation)
Do you need the ability to list all branches? Or just to get the most recent commit SHA for a known branch name?
We should not use git's branches or hashes because they are not certain to have a corresponding container (eg the pipeline failed or was entirely skipped). We should fetch from the Container Registry API. More specifically, the location
value.
For registry -- Is getting just the most recent tag enough, or do you need to list multiple tags? Also, do we need some kind of search string input for filtering?
IMHO just the latest container under given a specific tag is enough.