Closed sbadakhc closed 4 years ago
Hi @sbadakhc - can you please elaborate a little on the folder structure you are trying to create so I can better understand the problem? Can you share the value you are using for folder_id
?
HI @rjerrems - Sure. I have a use case that entails creating an organisation with multiple folders which map to business operations like sales, marketing, technology etc. These departments have their own infrastructure and resources but likely to be accessible to each other via a shared vpc. I'm pretty much just following the docs here https://cloud.google.com/resource-manager/docs/creating-managing-folders. I would like the ability to boot strap a org with multiple folders or have a way of adding folders once I have one department setup. Thanks for your assistance. I would be happy to provide more details. Also is there a slack channel available to discuss these issues in real-time?
Hi @sbadakhc - we don't have a live channel available unfortunately. Can you share the code snippet you are running which is producing this error?
Ah think I got my wires crossed. Does it make sense to have a folder factory module to accomplish this?
My thinking is that assuming a green field site and some hand cranking to ensure the following prerequisites are met I should be able to run the various modules in succession to provision my environment.
Prerequisites
These are the manual steps I have thus far taken. I then want to run the various modules to begin populating my org.
Does this make sense?
Thanks, Sal.
Yeah that makes sense. If you are looking for a module to help manage folders, this might prove useful for you:
https://github.com/terraform-google-modules/terraform-google-folders
Although it is worth noting that creating folders is usually quite straight forward, if you are not doing anything else on top of that (IAM etc). As an example, this creates on parent folder and three child folders:
Hope this helps
@rjerrems thanks. I'll take a look as advised. With regards to the process outlined above, is it inline with what you attempting here?
What is the rational for making org_id and folder_id mutually exclusive. I think it makes sense to have both and also perhaps have the option to provision multiple folders?