Is there a way to create organizations programmatically in GCP using gcloud command or an API. I have several small orgs under which there are departments and then teams and finally products(projects). I wanted to have clean inheritance for security policies, standards, shared storage which could be defined at top level and applied across projects and also I wanted to have billing metrics at org level, so that it can be easily tracked where the spending is going..
Asked
Active
Viewed 236 times
1 Answers
1
Organization can be created only on console , although in the documentation for gcloud organizations
command description is:
create and manage Google Cloud Platform Organizations
but there is no command for create.
Looking at your example I don't think that maintaining of several organization is good idea, as in another doc I found that:
The Organization resource is the root node
Which, I understand, is meant to be only one.
However, I suggest to use concept of "folder" which is described here. This concept is designed to create organization structure, and there is both API and for creation of folders .

vitooh
- 4,132
- 1
- 5
- 16
-
thanks for the details. if I use folder structure, Can I determine which part of the org is billed more for different resources? Is it possible to apply security policies across this folder structure? – user1614862 Sep 08 '20 at 06:40
-
When it comes security polices are managed by the same `gcloud organizations` command and I think should be possible to be managed well enough. Please review the docs I have provided, you should find everything there. For the rest - I am not sure what do you mean by "billed more for different resources".... – vitooh Sep 08 '20 at 07:24