Open droot opened 2 years ago
Do not build a new function for this. This functionality should be captured in the set-project-id function.
Do not build a new function for this. This functionality should be captured in the set-project-id function.
Updated the description to enhance the existing function.
Issues for current set-project-id https://github.com/GoogleContainerTools/kpt/issues/2690
Configuring a GCP project (ID and number in some cases) is one of the most common customizations for GCP resources (KCC resources). This customization fits the category of horizontal transformations (applicable to multiple types of KRM resources).
set-namespace
,set-labels
,set-annotations
are some examples of horizontal transformations.Making the use-case more concrete, consider the snippet below that shows KRM resources for configuring a GCP service account to grant roles for workload identity and project reader.
Proposal is to enhance
set-project-id
function that takes a GCP project ID (and possible number) as input and customizes the GCP resources to use the provided GCP project ID. The function is expected to have knowledge of how GCP resources use the project ID in their spec.An example of using function declaratively:
An example of using function imperatively: