0

I'm trying to build a simple app container but am getting a 403 saying the project isn't associated with a billing account. I've confirmed the project linked to an active billing account, and even re-attempted using the gcloud beta command:

gcloud beta billing projects link my-project-foo-bar --billing-account=0A0000-F00000-500000

billingAccountName: billingAccounts/0A0000-F00000-500000
billingEnabled: true
name: projects/my-project-foo-bar/billingInfo
projectId: my-project-foo-bar
gcloud builds submit --tag gcr.io/my-project-foo-bar/test-vd

ERROR: (gcloud.builds.submit) HTTPError 403: The project to be billed is associated with an absent billing account.

Edit with Debug

DEBUG: Running [gcloud.builds.submit] with arguments: [--tag: "gcr.io/my-project-foo-bar/test-vd", --verbosity: "debug"]
DEBUG: (gcloud.builds.submit) HTTPError 403: The project to be billed is associated with an absent billing account.
Traceback (most recent call last):
  File "/Users/michaelmoore/google-cloud-sdk/lib/googlecloudsdk/calliope/cli.py", line 981, in Execute
    resources = calliope_command.Run(cli=self, args=args)
  File "/Users/michaelmoore/google-cloud-sdk/lib/googlecloudsdk/calliope/backend.py", line 807, in Run
    resources = command_instance.Run(args)
  File "/Users/michaelmoore/google-cloud-sdk/lib/surface/builds/submit.py", line 352, in Run
    gcs_client.CreateBucketIfNotExists(gcs_source_staging_dir.bucket)
  File "/Users/michaelmoore/google-cloud-sdk/lib/googlecloudsdk/api_lib/storage/storage_api.py", line 342, in CreateBucketIfNotExists
    location=location,
  File "/Users/michaelmoore/google-cloud-sdk/lib/googlecloudsdk/third_party/apis/storage/v1/storage_v1_client.py", line 314, in Insert
    config, request, global_params=global_params)
  File "/Users/michaelmoore/google-cloud-sdk/lib/third_party/apitools/base/py/base_api.py", line 731, in _RunMethod
    return self.ProcessHttpResponse(method_config, http_response, request)
  File "/Users/michaelmoore/google-cloud-sdk/lib/third_party/apitools/base/py/base_api.py", line 737, in ProcessHttpResponse
    self.__ProcessHttpResponse(method_config, http_response, request))
  File "/Users/michaelmoore/google-cloud-sdk/lib/third_party/apitools/base/py/base_api.py", line 604, in __ProcessHttpResponse
    http_response, method_config=method_config, request=request)
HttpForbiddenError: HttpError accessing <https://www.googleapis.com/storage/v1/b?project=api-test&alt=json>: response: <{'status': '403', 'content-length': '357', 'vary': 'Origin, X-Origin', 'server': 'UploadServer', 'x-guploader-uploadid': 'AEnB2Uqi4TwPvMI-tf1aL37obYGUVsoEjKE-kbRfUVE46-VxmflbIHNkt_lJOnFr30GSMHfS6ojxcJf_c7SCfNpdSRlcVMsh2Q', 'date': 'Mon, 27 Jan 2020 15:35:13 GMT', 'alt-svc': 'quic=":443"; ma=2592000; v="46,43",h3-Q050=":443"; ma=2592000,h3-Q049=":443"; ma=2592000,h3-Q048=":443"; ma=2592000,h3-Q046=":443"; ma=2592000,h3-Q043=":443"; ma=2592000', 'content-type': 'application/json; charset=UTF-8'}>, content <{
 "error": {
  "errors": [
   {
    "domain": "global",
    "reason": "accountDisabled",
    "message": "The project to be billed is associated with an absent billing account.",
    "locationType": "header",
    "location": "Authorization"
   }
  ],
  "code": 403,
  "message": "The project to be billed is associated with an absent billing account."
 }
}

Any thoughts?

  • Can you please try and run the command with --verbosity=debug and post the output. – Emil Gi Jan 27 at 9:52
  • Thanks @EmilGi - have updated with the output – Michael Jan 27 at 15:37
  • It might be that Cloud Storage Api is not enabled. Check if you have enabled it. If this is the case keep in mind that it might take some time for changes to propagate fully after you enable it. – Emil Gi Jan 27 at 15:58
0

You can check out "Google Cloud Platform" they have some helpful resource about Building Google Container, You can find them in Youtube. They have an youtube channel.

| improve this answer | |
0

Just to be on the safe side, please check this documentation to be sure your billing account is correctly set, then as Emil suggested, verify the API is enabled and your account has the proper IAM permissions to perform the operation, then try again. The 403 and the error message is usually 2 things:

  • The account has not a real billing account attached and you need to perform that task.
  • The API is not enabled and/or the required permissions to perform the operation are not set.

In any case, if that doesn't seem to work, just write your output in the thread and either Emil, Myself or any other contributor may help you out of that error.

Have a great day!

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.