0

I can follow the tutorial to create project by gcloud deployment-manager command and template files.

My question is how to use deployment manager API to do the same thing. I found the insert method API in the document, but when I use this API to create project, I meet the error: Error 404: Failed to find project test-site-301, notFound"

How do I specify the project ID before the project has been created? Or I should use other API for project creation?

Thanks


Update. 2018.01.15

I think I found the answer. When creating a new project by deployment manager API, the project parameter should be the project which manages the deployment (i.e. host project) NOT the project which will be created.

Browny Lin
  • 2,427
  • 3
  • 28
  • 32

1 Answers1

0

For project creation you should use Resource Manager API with projects.create method.

Review documentation here where different ways of creating project are described.

komarkovich
  • 2,223
  • 10
  • 20
  • Hi komarkovich, my purpose is to use deployment manager (DM) to create the project, bcz in that way I can leverage `infrastructure as code` concept. In the deployment manager github example, I can use DM template to create a **shared vpc project** by one line command. If I use resource manager API, that will be serveral API calls I think. – Browny Lin Jan 15 '19 at 09:00