Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add the cluster ID to the outputs #885

Closed
ferrarimarco opened this issue May 4, 2021 · 1 comment · Fixed by #886
Closed

Add the cluster ID to the outputs #885

ferrarimarco opened this issue May 4, 2021 · 1 comment · Fixed by #886
Labels
enhancement New feature or request P2 high priority issues triaged Scoped and ready for work

Comments

@ferrarimarco
Copy link
Contributor

Hi team!

While working with your module, I wasn't able to find the id of the cluster in the outputs of the kubernetes-engine module (tested with version 14.2.0).

Having the ID is useful for all the resources that need an explicit cluster ID, such as gke_hub_membership.

A possible workaround is to use the google_container_cluster data source (feeding it with the name and location outputs of the module to implicitly create a dependency). Example:

data "google_container_cluster" "source-cluster" {
  name     = module.kubernetes-engine-source.name
  location = module.kubernetes-engine-source.location
}

Having that ID in the module outputs would save a couple of trips to the API server, and simplify the Terraform descriptors. Thoughts?

Thanks!

@morgante
Copy link
Contributor

morgante commented May 4, 2021

Yes, I agree we should add this. Adding to the backlog, though a PR would also be welcome.

@morgante morgante added enhancement New feature or request P2 high priority issues triaged Scoped and ready for work labels May 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request P2 high priority issues triaged Scoped and ready for work
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants