SOLUTION: google cloud sdk issue: 'callers must accept terms of service'
Asked Answered
S

3

16

Known issue:

Installing google-cloud-sdk (linux package or from tarball) has a quirk where you cannot create projects from the command line before accepting the terms of service.

Steps to reproduce:

  1. Download sdk, untar, move folder to home directory and add google sdk root directory to PATH using install.sh
  2. Initialize and login with: $ google init
  3. Create a project from the CL: $ gcloud projects create --set-as-default

This will spit out an error like:

ERROR: (gcloud.projects.create) Operation [cp.5641973328385684887] failed: 9: Callers must accept Terms of Service

I hazard a guess that accepting the terms of service have not been built into the command line initialization yet. Omitting such a fundamental step to an installation process should be illegal, with consequences ranging from death by a thousand key-stokes, to 'build an operating system in headfuck'... but that's just me...

Swage answered 22/7, 2019 at 11:49 Comment(0)
S
23

We find the solution in the most unholiest of places: the google cloud control interface (cloud console).

  • Go to your cloud console
  • Create a project by selecting 'select a project' (top-left next to "Google Cloud Platform" and then 'create project' (top-right in the popup window).

This will prompt the terms of service agreement and you may carry on after agreeing to the terms of service.

I hope this helps whoever else stumbles upon this most infuriating of errors.

Live long and prosper

Bitshift

Swage answered 22/7, 2019 at 11:49 Comment(4)
I wish I could give you 10 upvotes. You really saved my bacon on this one. Thank you!Seddon
@NickSchwaderer You are most welcome sir :) so glad I could be of use!Swage
yeah google.. why aren't you including this in the docs :eyeroll:Salic
Alternatively, go here: console.developers.google.com/terms/universal Make sure you are signed in with your desired account.Algolagnia
M
2

Let's not be so dramatic with "death by a thousand key-strokes". This is a security measure that should be implemented. Security is not always convenient but can save your checking/credit account a lot of grief.

Imagine this theoretical scenario. You provide me with a service account that has the roles to create a project. I create a new project. This project is created under your Google Billing Account. I know what I am doing with Google IAM so I remove you from the new project and make myself the Project Owner. Now you have no access to the new project but your credit card is paying the bills for my project. I think you would then be screaming "death by a million key-strokes".

There are two types of projects:

  • Independent projects not part of an organization.
  • Projects that are part of an organization.

If you are part of a Google Cloud Organization, you can easily create projects up to your quota limit (default is 5). No prompting, accepting TOS, etc. Using the CLI to create a new project is effortless.

If you are not part of an Google Cloud Organization then you are basically creating a new account, you need to set up account billing, accept terms of service, etc. This means that you should not use the CLI to create a new project as the CLI does not prompt you for the items that a new project requires. Why, the CLI should be using a service account. The service account is not the IAM member that owns the account. This forces you to log into the Google Cloud Console using your User Credentials to create the new project.

Mcbrayer answered 22/7, 2019 at 19:24 Comment(3)
I see. That all seems perfectly reasonable. In that case it should be noted at the CLI, prompting the user to login and complete the project creation in a secure fashion. Leaving the user high-and-dry to figure this out by luck is equally deserving of punishment.Swage
The google console is truly a place to get lost in. It took me 15 minutes to get my code working with the APIs – but only after wasting 4 entire days trying to get authentication working. The google API & AMI docs are often wrong, outdated, or just don't work. I did make it work eventually – but only by following some advice marked as "deprecated" on Stack Overflow that does not appear in the google docs at all! I fully understand the need for authentication, however, making it orders of magnitude more difficult to use than the service itself doesn't seem like a good approach.Ginni
Even when creating an organization-linked project, if you're on a new Google account (through which you have never accessed Cloud Console before), you'll still have to open the Cloud Console once and accept the terms (for that particular Google account).Debag
J
1

For anyone getting this message when trying to create a dialogflow agent:

Go to https://console.cloud.google.com, login and accept the displayed terms and conditions.

Afterwards it worked for me...

Jori answered 15/6, 2021 at 8:17 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.