How can i access my billing account data on GCE instance?

129 views Asked by At

I am able to retrieve data from my local machine using the terminal with the command: gcloud beta billing accounts list but I am not able to do the same on a GCE instance which outputs Listed 0 items.

I think I am missing some permissions or roles, but I do not know which.

I have checked that the Service Account in the GCE instace has the API activated since it says: "Allow full access to all Cloud APIs"

¿Am I missing something?

1

There are 1 answers

0
guillaume blaquiere On

According to that page, you must grant the correct role on the Billing account (I tested with Billing Account User role).

But you can't do that at project level, because the billing account is not a project resource but an organisation resource.

You can't grant the service account at the organization level

You can also grant it on specific billing accounts (to view only a subset). For that, you have to go to your billing account list (click on billing and then, in the drop down in to upper left corner "Manage billing account")

enter image description here

Then, on the billing account of your choice, select it (check boxes on the left-hand side) to view a new panel on the righ hand side and to add a principal on the billing account