I'm trying to launch a compute instance into GCP using the command line:
gcloud compute instances create instance-1 --zone=uscentral1-a
And it tells me that billing is not open for the project:
API [compute.googleapis.com] not enabled on project [847006780503].
Would you like to enable and retry (this will take a few minutes)?
(y/N)? Y
Enabling service [compute.googleapis.com] on project [847006780503]...
ERROR: (gcloud.compute.instances.create) FAILED_PRECONDITION: Billing account for project '847006780503' is not open. Billing must be enabled for activation of service(s) 'compute.googleapis.com,compute.googleapis.com,compute.googleapis.com' to proceed.
- '#type': type.googleapis.com/google.rpc.PreconditionFailure
violations:
- subject: ?error_code=390002&project=847006780503&services=compute.googleapis.com&services=compute.googleapis.com&services=compute.googleapis.com
type: googleapis.com/billing-enabled
- '#type': type.googleapis.com/google.rpc.ErrorInfo
domain: serviceusage.googleapis.com/billing-enabled
metadata:
project: '847006780503'
services: compute.googleapis.com,compute.googleapis.com,compute.googleapis.com
reason: UREQ_PROJECT_BILLING_NOT_OPEN
I am able to launch compute instances in the console, but not on the CLI.
How do I enable billing for my project so that I can launch instances with the CLI?
To confirm that billing is enabled on your project please follow the next steps:
Sign in to the Google Cloud Console.
In the project drop down ( My Project) at the top of the Google Cloud Console page, select your project.
Open the console Navigation menu , and then select Billing.
If billing is not enabled on the project, a pop-up window will display, with text similar to:
"This project is not linked to a billing account"
If this is your case, you can enable billing on your project following this documentation: Enable billing for an existing project
To re-enable billing on a project, do the following.
Sign in to the Manage billing accounts page in the Google Cloud Console.
Select the My projects tab to view a list of projects and the associated Cloud Billing account for each project.
From the list of projects, locate the project for which you want to re-enable billing, and then click the menu next to it.
Select Change billing, then choose the desired destination Cloud Billing account.
Related
I have IAM roles like Editor/Cloud Run Admin in my gcp projects (multiple Projects) I am facing this issue,
When I am trying to deploy the container image from Cloud Run's "Edit & Deploy New Revision" screen.
It's not listing the Images in the Project and gives error refer this screenshot for the error message .
Its not only for me other users also facing same issue, but with the same editor and admin roles I am able to list all images in the other project. I have also checked with other developers
If the "Artifact Registry API" is enabled in GCP. then we can list the images from the project.
To enable this API, Search for 'Artifact Registry API' and click enable.
Only if you have this 'Service Usage Admin' IAM role, you can enable API.
Thanks to my Support Team in Project
I'm looking to set up cloud based scalable build with Team city on EC2 as per below article.
https://www.jetbrains.com/help/teamcity/setting-up-teamcity-for-amazon-ec2.html
I have System Administrator privileges for root projects but I'm unable to see the Cloud tab under the Agents page.
Cloud tab under Agents missing
I was able to figure this out. The Cloud Tab under agents is only visible once you have configured the Cloud profiles for your projects.
I want to migrate my Google action project from one Google account to another.
However, I am not part of any organization hence the migration option on Google cloud for my project doesn't work.
Can anyone help me understand how we can migrate the Google action with no organization from one google account to another google account without any organization created on Google cloud console?
To migrate your GCP project, follow these steps:
Navigate to google cloud console
Select the source account where you want to migrate project from
In the navigation menu select "IAM"
At the top, click "ADD"
Add the destination account using Permissions/Add Member/Is Owner
Accept the Invitation from destination account
If you want to remove ownership of the source account, on the destination account, go back to the IAM section and delete your account from the list.
Refer granting access for information.
I want to use GCP Stackdriver for my AWS accounts.
When I go to my workspace settings and click the "Add AWS Account" it gives the following instructions:
Log in to your Amazon IAM console and click Roles
Click "Create New Role"
Select the role type "Another AWS account"
Check the box "Require external ID"
Enter the following:
Account ID: 123456789012
External ID: ab12345678
Require MFA: unchecked
Click "Next: Permissions".
Select "ReadOnlyAccess" from the policy template list and click "Next: Review"
Enter a "Role Name" such as Stackdriver and click "Create Role"
Select the "Role Name" you just entered from the role list to see the summary page
Copy the "Role ARN" value and paste it in the AWS Role ARN field below
I tried that on my AWS account but it's obvious that the IDs aren't real. How can I get the IDs to create my AWS link account?
I'm the GCP project's owner and have permissions to create projects too.
Thanks
By looking the steps mentioned you are trying this document; The ID's are exactly the ones that Stackdriver monitoring is telling you to use to create the role on AWS.
There is some issue with the new UI for Stackdriver Monitoring. To workaround this issue please follow this steps:
On stackdriver Monitoring console you will see a banner at the top
"Stackdriver Monitoring in the Google Cloud Console is Generally Available. This is now the default experience and will be the only experience available by the end of January 2020"
Then click to use classic button to change to the old interface, there you will be able to say why you are changing to the old interface.
Once you get the old interface, go to Workspace Settings (located in your project name on the top/left side of the screen) --> Monitored accounts --> Add AWS account. There you will be able to get the correct Account ID and External ID for your OWN Stackdriver Workspace.
Then continue the steps as the guide say by creating the role on AWS and sharing the ARN to Stackdriver.
I am the owner of a project and want to give Permissions to another user to view Logs of Google Cloud Build, but I can not figure out which Role / Permission this user needs.
Roles I've unsuccessfully tried are:
Cloud Build Editor,
Cloud Build Viewer,
Stackdriver Debugger Agent,
Stackdriver Debugger User,
Cloud Trace Admin,
Logging Admin,
Private Logs Viewer,
Logs Viewer,
Monitoring Admin
Google Cloud enterprise support confirmed to me that the only role that currently grants this is the project-level Viewer permission (or Editor/Owner).
One workaround is to set the --gcs-log-dir flag when submitting a build to a bucket you control (rather than the default Google-managed gs://[PROJECT_NUMBER].cloudbuild-logs.googleusercontent.com/ bucket).
They're tracking making a more granular permission in this feature request: https://issuetracker.google.com/issues/134928412, which you can subscribe to updates on.
If you add the project viewer role then this will resolve the issue. But, it seems like this is an issue (or maybe a feature request - to add the necessary permission to the Logs Viewer so that logs outside of the Stackdriver logging page can be viewed in other UIs as well), looking at the documentation it says "roles/viewer (Project Viewer) gives members the same permissions as roles/logging.viewer at the project level. " which means that by just assigning the Logs Viewer then it should have given the user the necessary permission to view the logs at the Cloud Build UI.