Show / Hide Table of Contents

Class Folder

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

using Pulumi;
using Gcp = Pulumi.Gcp;

class MyStack : Stack
{
public MyStack()
{
    // Top-level folder under an organization.
    var department1 = new Gcp.Organizations.Folder("department1", new Gcp.Organizations.FolderArgs
    {
        DisplayName = "Department 1",
        Parent = "organizations/1234567",
    });
    // Folder nested under another folder.
    var team_abc = new Gcp.Organizations.Folder("team-abc", new Gcp.Organizations.FolderArgs
    {
        DisplayName = "Team ABC",
        Parent = department1.Name,
    });
}

}
Inheritance
System.Object
Resource
CustomResource
Folder
Inherited Members
CustomResource.Id
Resource.GetResourceType()
Resource.GetResourceName()
Resource.Urn
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Pulumi.Gcp.Organizations
Assembly: Pulumi.Gcp.dll
Syntax
public class Folder : CustomResource

Constructors

View Source

Folder(String, FolderArgs, CustomResourceOptions)

Create a Folder resource with the given unique name, arguments, and options.

Declaration
public Folder(string name, FolderArgs args, CustomResourceOptions options = null)
Parameters
Type Name Description
System.String name

The unique name of the resource

FolderArgs args

The arguments used to populate this resource's properties

CustomResourceOptions options

A bag of options that control this resource's behavior

Properties

View Source

CreateTime

Timestamp when the Folder was created. Assigned by the server. A timestamp in RFC3339 UTC "Zulu" format, accurate to nanoseconds. Example: "2014-10-02T15:01:23.045123456Z".

Declaration
public Output<string> CreateTime { get; }
Property Value
Type Description
Output<System.String>
View Source

DisplayName

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.

Declaration
public Output<string> DisplayName { get; }
Property Value
Type Description
Output<System.String>
View Source

LifecycleState

The lifecycle state of the folder such as ACTIVE or DELETE_REQUESTED.

Declaration
public Output<string> LifecycleState { get; }
Property Value
Type Description
Output<System.String>
View Source

Name

The resource name of the Folder. Its format is folders/{folder_id}.

Declaration
public Output<string> Name { get; }
Property Value
Type Description
Output<System.String>
View Source

Parent

The resource name of the parent Folder or Organization. Must be of the form folders/{folder_id} or organizations/{org_id}.

Declaration
public Output<string> Parent { get; }
Property Value
Type Description
Output<System.String>

Methods

View Source

Get(String, Input<String>, FolderState, CustomResourceOptions)

Get an existing Folder resource's state with the given name, ID, and optional extra properties used to qualify the lookup.

Declaration
public static Folder Get(string name, Input<string> id, FolderState state = null, CustomResourceOptions options = null)
Parameters
Type Name Description
System.String name

The unique name of the resulting resource.

Input<System.String> id

The unique provider ID of the resource to lookup.

FolderState state

Any extra arguments used during the lookup.

CustomResourceOptions options

A bag of options that control this resource's behavior

Returns
Type Description
Folder
  • View Source
Back to top Copyright 2016-2020, Pulumi Corporation.