google cloud project: create using a custom interface - google-cloud-platform

Is it possible to create a google cloud project without using the console?
I am building a platform where I would like the user to login (say with Google credentials) and once authenticated, the platform should have the ability to create a project in the users account (by virtue of the authentication) via the platform's interface.
If it is possible, can someone provide general directions or approach how this could work. Thanks.

Technically it's possible, as GCP console is calling APIs to their servers to perform server creation, destroy and other actions
I would think of a few steps to achieve it if you want to do it by your own:
1. Choose the API type, e.g. GCloud, Java, Go or any others
2. Scoping what kind of functions you want to expose to users
3. Build the new UI
In fact, you can achieve this by assigning proper IAM role, unless you want to build your own whilte-labeling wrapper

Related

Creating projects on Google Cloud Platform for API Access via OAuth

Assume that there is an application, SPA, that uses Google OAuth2.0 to access the Google Drive API.
Reading the docs, the application flow seems familiar enough on the client-side specially with Google's JavaScript library for authentication. However, I have stumbled upon a roadblock during application registration phase.
When creating the credentials for our client application, I am redirected to fill out the form at the OAuth Consent Screen first. There, among other things it demands us to declare whether the application is in Testing or In Production phase, so it can decide whether the app will be available to everyone or to Test Users only.
Assume I create a project for our application and set it on testing at first and then change it to production once I am ready to publish (with a new set of credentials as well).
My question is this. What if development continues on the application for new features while one instance of the app is in production? During development and testing I would need to restrict the application to my Test Users alone. Since the OAuth consent screen is project specific, not credential specific, will I require multiple projects on the console for every environment in which the application is running?
As in,
Project MyAppTesting will permanently remain in testing mode and will denote our development/testing branch.
Project MyAppProduction is always in production and denotes my production branch.
Similarly for the mobile client:
A MyMobileAppDev project having credentials configured with the debug keystore hash
A MyMobileAppProd project having credentials configured with the production keystore hash.
(both sets of credentials share the same package name).
Is this the idiomatic way? I failed to find any documentation on the matter. Please advise.
What #JohnHanley stated is the best way and the best practice when deploying application/s in GCP.
You can create multiple projects and create different Oauth for each of the projects. Check out this link on service accounts.
In addition to that, there are also some pros and cons when it comes to billing.
Pros:
Users consider having multiple billing accounts with respective projects assigned for each account to be able to see their billing details separately. In this way you can monitor the billing for each of the respective projects for each account.
Cons:
Attaching all the projects to one billing account, however, the billing reports will show all of the sum of the cost for all the projects, but you can still use the filter menu to be able to see the charges for each project.

Is there a way we can add new projects to existing GCP monitoring workspace via a API?

I have multiple GCP projects, And I want to setup a multi-projects monitoring workspace for my environment. I would like to add all un-monitored projects to the workspace that I have already created, but via an API so that this job is automated.
Via console I know that it's possible using this link's setup (https://cloud.google.com/monitoring/workspaces/create#add-monitored-project) But how can I achieve this via an API?
Please can someone provide any inputs here.
You can manage Dashboard via API, and list services in the workspace, but API does not support adding projects to a workspace.
You can find list of all API methods here.
If you think that functionality should be supported, you can file a Feature Request.

Google Cloud Platform create a no organisational project using API

i am trying to create a project using API in google cloud platform with no organisation , but i can't and when i try to create an organisation they asked me to buy a domain, is there any way to pass this problem?
Notice that as stated on the projects.create API method documentation you necessarily need to have the resourcemanager.projects.create (permission contained within some predefined roles like the roles/resourcemanager.projectCreator) on the specified parent of the project (which can be either an organization or a folder within the organization) and there is no way to bypass this.

Unable to create the first GCP project via API

I'm trying to create a Dialogflow Agent via API, It require a GCP project that also have to be created via API.
Actually both works well when the end user has already been once in the GCP console and accept the new terms and services.
The problem is that I would like to create the agent without the end user to have to perform any action on Google Cloud Platform.
Before it was possible, but it seems Google added a new terms of services for APIs on the GCP console that pop up the first time the user log in.
My question is, do you think there's any possibility to accepte those terms of services via Oauth or any other possibility?
Seems like Dialogflow still does it well.. so it should be possible :p
TY.
As stated by #John Hanley the user must login to accept the TOS so that the user-entity is bound to the Terms. Here you may find all the information regarding Google APIs Terms of Service.

How to create Dialogflow agents automatically via REST API

I'm trying to build a Bot-as-a-Service platform and I will be using Dialogflow for NLP. One key thing that is giving me headaches is the possibility to create a new Dialogflow agent whenever a user signs up to my service (and therefore configure their FAQs, etc...). From my research I know that each agent is associated with one project, so I must create a project first, but here's the big thing: To create a project I need to authenticate accordingly to Google Cloud Authentication and therefore supply my credentials in case of OAuth2 (I don't want my user's to log in with my user account) and it's not possible to programmatically create API keys for new projects link here