googleapis / googleapis/google-cloud-node
[resource-manager] Add `location` attribute to `tagBindingsClient` functions
- Dominant language
- TypeScript
- Stars
- 3.2k
- Forks
- 712
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 99
Description
#### Environment details
- which product (packages/*): @google-cloud/resource-manager
- google-cloud-node version: 5.0.1
Some tag bindings require the location to be specified, ex: compute instances
#### Steps to reproduce
The `location` option is missing from all `tagBindingsClient` functions so we cannot use tag bindings for regional or zonal resources
[Related issue](https://github.com/hashicorp/terraform-provider-google/issues/11448) in terraform.
**This not working :**
```js
const [bindings] = await this.tagBindingsClient.listTagBindings({
parent: `//compute.googleapis.com/projects/${projectId}/zones/${zone}/instances/${instanceId}`,
});
```
**Proposed solution is to add location like this :**
```js
const [bindings] = await this.tagBindingsClient.listTagBindings({
parent: `//compute.googleapis.com/projects/${projectId}/zones/${zone}/instances/${instanceId}`,
location: zone/region
});
```
The api endpoint needs to change for regional or zonal bindings like this :
**northamerica-northeast1-a**-cloudresourcemanager.googleapis.com
Contributor guide
Assessment
This issue has not been assessed yet.