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

gcloud Resource-Manager Tags Bindings List - Permission Denied for Disk Resource as Parent #5704

Closed
RahulLah19 opened this issue Sep 23, 2024 · 1 comment

Comments

@RahulLah19
Copy link

When trying to retrieve tags via the gcloud resource-manager tags bindings list command, the output is restricted to supported resource instances for the parent parameter. Using a disk as the parent returns the following error:

Error

ERROR: (gcloud.resource-manager.tags.bindings.list) PERMISSION_DENIED: The caller does not have permission. This command is authenticated as [email protected], which is the active account specified by the [core/account] property
- '@type': type.googleapis.com/google.rpc.ResourceInfo
  description: permission [compute.disks.listEffectiveTags] required (or the resource may not exist in this location)
  resourceName: //compute.googleapis.com/projects/example-project/zones/us-central1-a/disks/test-disk

When the same command is executed for an instance, it successfully returns the tag details:

gcloud resource-manager tags bindings list --location=us-central1-a --parent //compute.googleapis.com/projects/example-project/zones/us-central1-a/instances/instance-demo --effective --project example-project

Steps to Reproduce:

  1. Authenticate using a valid Google Cloud account.
  2. Run the above command with a disk resource as the parent.

Actual Behavior:
The error message indicates a permission issue related to compute.disks.listEffectiveTags, despite having the necessary permissions for disk operations.

Expected Behavior:
Tags should be listed for the disk resource.

I expect this behavior because the command works when retrieving tags for other resource types, such as instances, using the same format and parameters. There is no clear documentation indicating that disks should be treated differently. It seems logical to assume that disk resources should be supported similarly, and if not, the error message should be more descriptive to indicate that disk resources are not valid for tag bindings.

Supported resource DOC Link: https://cloud.google.com/compute/docs/tag-resources#gcloud

@sofisl
Copy link
Contributor

sofisl commented Sep 26, 2024

Unfortunately this library only touches autogenerated client libraries, not the CLI. Please refer to their support page here.

@sofisl sofisl closed this as completed Sep 26, 2024
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

No branches or pull requests

2 participants