hashicorp / terraform-provider-google

Terraform Provider for Google Cloud Platform
https://registry.terraform.io/providers/hashicorp/google/latest/docs
Mozilla Public License 2.0
2.25k stars 1.7k forks source link

Create data source for google_gke_hub_membership_binding #18538

Open sahsagar-google opened 6 days ago

sahsagar-google commented 6 days ago

Community Note

Description

It'd be extremely helpful if we created terraform data sources for hub resources. This would allow application teams to reference resources' values without needing to have their projects own the resources and/or have access to the platform's projects' tf state.

the cannonical example in general in GCP is google_project -- this is commonly used in situations where a project resides in a project it doesnt manage but needs to reference it to get its project number. in the absence of this data source, the user would need to manually use gcloud to do this and any module that needs it and takes a project id (ie most gcp modules) would have to also take a project number.

within the hub team, a common use case would be for gke_hub_scope, something that would be key to separation of platform admin team scope provisioning and app team gke_hub_namespace self service.

another one might be for gke_hub_membership_bindings to subsequently install something into a team's clusters (though this is not likely an app operator's need)

New or Affected Resource(s)

Potential Terraform Configuration

References

No response

b/350515126

sahsagar-google commented 6 days ago

I'm working on this!