getActiveFolder

Get an active folder within GCP by display_name and parent.

Example Usage

using Pulumi;
using Gcp = Pulumi.Gcp;

class MyStack : Stack
{
    public MyStack()
    {
        var department1 = Output.Create(Gcp.Organizations.GetActiveFolder.InvokeAsync(new Gcp.Organizations.GetActiveFolderArgs
        {
            DisplayName = "Department 1",
            Parent = "organizations/1234567",
        }));
    }

}
package main

import (
	"github.com/pulumi/pulumi-gcp/sdk/v5/go/gcp/organizations"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := organizations.GetActiveFolder(ctx, &organizations.GetActiveFolderArgs{
			DisplayName: "Department 1",
			Parent:      "organizations/1234567",
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
import pulumi
import pulumi_gcp as gcp

department1 = gcp.organizations.get_active_folder(display_name="Department 1",
    parent="organizations/1234567")
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const department1 = pulumi.output(gcp.organizations.getActiveFolder({
    displayName: "Department 1",
    parent: "organizations/1234567",
}, { async: true }));

Using getActiveFolder

function getActiveFolder(args: GetActiveFolderArgs, opts?: InvokeOptions): Promise<GetActiveFolderResult>
def get_active_folder(display_name: Optional[str] = None,
                      parent: Optional[str] = None,
                      opts: Optional[InvokeOptions] = None) -> GetActiveFolderResult
func GetActiveFolder(ctx *Context, args *GetActiveFolderArgs, opts ...InvokeOption) (*GetActiveFolderResult, error)

Note: This function is named GetActiveFolder in the Go SDK.

public static class GetActiveFolder {
    public static Task<GetActiveFolderResult> InvokeAsync(GetActiveFolderArgs args, InvokeOptions? opts = null)
}

The following arguments are supported:

DisplayName string
The folder’s display name.
Parent string
The resource name of the parent Folder or Organization.
DisplayName string
The folder’s display name.
Parent string
The resource name of the parent Folder or Organization.
displayName string
The folder’s display name.
parent string
The resource name of the parent Folder or Organization.
display_name str
The folder’s display name.
parent str
The resource name of the parent Folder or Organization.

getActiveFolder Result

The following output properties are available:

DisplayName string
Id string
The provider-assigned unique ID for this managed resource.
Name string
The resource name of the Folder. This uniquely identifies the folder.
Parent string
DisplayName string
Id string
The provider-assigned unique ID for this managed resource.
Name string
The resource name of the Folder. This uniquely identifies the folder.
Parent string
displayName string
id string
The provider-assigned unique ID for this managed resource.
name string
The resource name of the Folder. This uniquely identifies the folder.
parent string
display_name str
id str
The provider-assigned unique ID for this managed resource.
name str
The resource name of the Folder. This uniquely identifies the folder.
parent str

Package Details

Repository
https://github.com/pulumi/pulumi-gcp
License
Apache-2.0
Notes
This Pulumi package is based on the google-beta Terraform Provider.