Folder Args
Allows management of a Google Cloud Platform folder. For more information see the official documentation and API. A folder can contain projects, other folders, or a combination of both. You can use folders to group projects under an organization in a hierarchy. For example, your organization might contain multiple departments, each with its own set of Cloud Platform resources. Folders allows you to group these resources on a per-department basis. Folders are used to group resources that share common IAM policies. Folders created live inside an Organization. See the Organization documentation for more details. The service account used to run the provider when creating a gcp.organizations.Folder
resource must have roles/resourcemanager.folderCreator
. See the Access Control for Folders Using IAM doc for more information.
Example Usage
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.organizations.Folder;
import com.pulumi.gcp.organizations.FolderArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var department1 = new Folder("department1", FolderArgs.builder()
.displayName("Department 1")
.parent("organizations/1234567")
.build());
var team_abc = new Folder("team-abc", FolderArgs.builder()
.displayName("Team ABC")
.parent(department1.name())
.build());
}
}
Import
Folders can be imported using the folder's id, e.g. Both syntaxes are valid
$ pulumi import gcp:organizations/folder:Folder department1 1234567
$ pulumi import gcp:organizations/folder:Folder department1 folders/1234567
Properties
The folder’s display name. A folder’s display name must be unique amongst its siblings, e.g. no two folders with the same parent can share the same display name. The display name must start and end with a letter or digit, may contain letters, digits, spaces, hyphens and underscores and can be no longer than 30 characters.