crossplane-contrib / crossplane-contrib/provider-upjet-github

Referencing or importing some resources is supported only by numerical IDs instead of names

Open
#214 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
56
Forks
46
Avg merge
6d 7h
Merged PRs (30d)
2

Description

GitHub assigns numerical ids to resources at creation time. When importing or referencing such resources is challenging because we don't have them in Crossplane config nor can we expect our users to provide them as inputs in Composite Resource.

We had a brief discussion about this in a related PR: https://github.com/crossplane-contrib/provider-upjet-github/pull/177.

What is the recommended way to workaround this limitation?

Here is one scenario to illustrate the problem. In an enterprise teams aren't managed from git repos and Crossplane, they are synced from an IdP. In Crossplane model we want to create ownership between repos and teams, but any field that we tried so far referencing teams from `TeamRepository` managed resource requires GitHub team numerical ID. Even if we want to adopt a team with observe-only approach, we'd still need numerical id.

Is it technically possible to reference a team by its name in teamrepo? If not what is the recommended way around it? Is it a one off http-provider to fire an API request or custom function?

This is not the only place where numerical ids cause pain, rulesets another example.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reading related PR #177 and the TeamRepository resource behavior described here, then compare the rulesets example. A useful outcome would be a documented, actionable recommendation for referencing or adopting teams without numerical IDs, or a clearly scoped supported change, including whether name-based TeamRepository references are technically possible.

Written by the indexing model from the issue text.

Assessment

Tech stack
github, go
Domain
api, backend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.