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

fix: Ensure that all currently supported GCP services allow querygcpTag #4

Open
wants to merge 3 commits into
base: alpha
Choose a base branch
from

Conversation

m-pizarro
Copy link
Contributor

@m-pizarro m-pizarro commented Apr 18, 2022

Review and notes:

  • Tags are created at the organization level.
  • A tag key can have more than one value.
  • An existing tag can be attached to a folder, project or KMS key ring (with only one value of the key)
  • From the API we can only list the Tags by organization. It's not possible to list the Tags attached to a resource.

Services that currently support tags:

  • Organizations
  • vmInstance (Instance tags fingerprint/items)

Issue tracker links

Add links to any relevant tasks/stories/bugs/pagerduty/etc

Example - dummy TODO project

TODO-123

Changes/solution

How does this change address the problem?

Testing

Describe how the testing was done, plus evidence, if not covered by automated tests

Notes and considerations

Add any additional notes and/or considerations

Dependencies

_Add dependencies on any other PRs, if applicable

@m-pizarro m-pizarro changed the title Fix/cg 1081 fix: Ensure that all currently supported GCP services allow querygcpTag Apr 19, 2022
@csbrandt
Copy link

@m-pizarro cool thanks for getting to this! Tags on gcp are a bit odd so this work was skipped initially, from what I can tell you can add tags at the org level. The tag bindings can be added to various supported services (initially we should scope to org,folder,project).

It should be possible to list tags attached to resources in question
https://cloud.google.com/resource-manager/docs/tags/tags-creating-and-managing#listing_effective_tags

@m-pizarro
Copy link
Contributor Author

m-pizarro commented Jun 3, 2022

@m-pizarro cool thanks for getting to this! Tags on gcp are a bit odd so this work was skipped initially, from what I can tell you can add tags at the org level. The tag bindings can be added to various supported services (initially we should scope to org,folder,project).

It should be possible to list tags attached to resources in question https://cloud.google.com/resource-manager/docs/tags/tags-creating-and-managing#listing_effective_tags

@csbrandt , thanks for taking the time to review this. Yes, I had a chance to review that documentation, as you mention the tags can be attached in addition on projects and folders, I was able to make that configuration. But the API unfortunately does not return these TAGs, I have tried to get them in the same way that is done for Organizations (which does return them) and I had no luck, I looked for another way but it is not possible or at least I didn't find it. Also in the Ticket comments I left some details about this.

Also, I tried to see if somehow we could get that information from the TAG side, i.e., if we could get the information to which resources they were attached, but it was not possible either.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants