We're deploying our software on behalf (OAuth2) of users on Google Cloud. We've managed to automate most of it, but there's one bit that's missing.
The missing bit is between step 1 and step 2: in order to make use of the Service Management API to enable the needed APIs
, we need the Service Management API itself to be enabled on the project (how ironic). I'm hoping there must be a way to create a project with some APIs enabled from the start, maybe with cloudresourcemanager, or maybe with https://godoc.org/google.golang.org/api/deploymentmanager/v2 , but I haven't found it so far.
So, to restate: does anyone know if it's possible (in Go) to create a Google Cloud project with some specific Google Cloud APIs enabled right on/after creation?
The Google Cloud Resource Manager API is very limited in what it will allow you to do.
while it does have a projects.update method it does not support enabling APIs. Your going to have to manually edit the project.
Use the Service Usage API: https://cloud.google.com/service-usage/docs/reference/rest/
(updated)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.