harness.platform.getProject

Data source for retrieving a Harness project.

Example Usage

using System.Collections.Generic;
using Pulumi;
using Harness = Pulumi.Harness;

return await Deployment.RunAsync(() => 
{
    var exampleById = Harness.Platform.GetProject.Invoke(new()
    {
        Identifier = "identifier",
        OrgId = "org_id",
    });

    var exampleByName = Harness.Platform.GetProject.Invoke(new()
    {
        Name = "name",
        OrgId = "org_id",
    });

});
package main

import (
	"github.com/lbrlabs/pulumi-harness/sdk/go/harness/platform"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err = platform.LookupProject(ctx, &platform.LookupProjectArgs{
			Identifier: pulumi.StringRef("identifier"),
			OrgId:      "org_id",
		}, nil)
		if err != nil {
			return err
		}
		_, err = platform.LookupProject(ctx, &platform.LookupProjectArgs{
			Name:  pulumi.StringRef("name"),
			OrgId: "org_id",
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.harness.platform.PlatformFunctions;
import com.pulumi.harness.platform.inputs.GetProjectArgs;
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) {
        final var exampleById = PlatformFunctions.getProject(GetProjectArgs.builder()
            .identifier("identifier")
            .orgId("org_id")
            .build());

        final var exampleByName = PlatformFunctions.getProject(GetProjectArgs.builder()
            .name("name")
            .orgId("org_id")
            .build());

    }
}
import pulumi
import pulumi_harness as harness

example_by_id = harness.platform.get_project(identifier="identifier",
    org_id="org_id")
example_by_name = harness.platform.get_project(name="name",
    org_id="org_id")
import * as pulumi from "@pulumi/pulumi";
import * as harness from "@pulumi/harness";

const exampleById = pulumi.output(harness.platform.getProject({
    identifier: "identifier",
    orgId: "org_id",
}));
const exampleByName = pulumi.output(harness.platform.getProject({
    name: "name",
    orgId: "org_id",
}));
variables:
  exampleById:
    fn::invoke:
      Function: harness:platform:getProject
      Arguments:
        identifier: identifier
        orgId: org_id
  exampleByName:
    fn::invoke:
      Function: harness:platform:getProject
      Arguments:
        name: name
        orgId: org_id

Using getProject

Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

function getProject(args: GetProjectArgs, opts?: InvokeOptions): Promise<GetProjectResult>
function getProjectOutput(args: GetProjectOutputArgs, opts?: InvokeOptions): Output<GetProjectResult>
def get_project(identifier: Optional[str] = None,
                name: Optional[str] = None,
                org_id: Optional[str] = None,
                opts: Optional[InvokeOptions] = None) -> GetProjectResult
def get_project_output(identifier: Optional[pulumi.Input[str]] = None,
                name: Optional[pulumi.Input[str]] = None,
                org_id: Optional[pulumi.Input[str]] = None,
                opts: Optional[InvokeOptions] = None) -> Output[GetProjectResult]
func LookupProject(ctx *Context, args *LookupProjectArgs, opts ...InvokeOption) (*LookupProjectResult, error)
func LookupProjectOutput(ctx *Context, args *LookupProjectOutputArgs, opts ...InvokeOption) LookupProjectResultOutput

> Note: This function is named LookupProject in the Go SDK.

public static class GetProject 
{
    public static Task<GetProjectResult> InvokeAsync(GetProjectArgs args, InvokeOptions? opts = null)
    public static Output<GetProjectResult> Invoke(GetProjectInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetProjectResult> getProject(GetProjectArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
  function: harness:platform/getProject:getProject
  arguments:
    # arguments dictionary

The following arguments are supported:

OrgId string

Unique identifier of the Organization.

Identifier string

Unique identifier of the resource.

Name string

Name of the resource.

OrgId string

Unique identifier of the Organization.

Identifier string

Unique identifier of the resource.

Name string

Name of the resource.

orgId String

Unique identifier of the Organization.

identifier String

Unique identifier of the resource.

name String

Name of the resource.

orgId string

Unique identifier of the Organization.

identifier string

Unique identifier of the resource.

name string

Name of the resource.

org_id str

Unique identifier of the Organization.

identifier str

Unique identifier of the resource.

name str

Name of the resource.

orgId String

Unique identifier of the Organization.

identifier String

Unique identifier of the resource.

name String

Name of the resource.

getProject Result

The following output properties are available:

Color string

Color of the project.

Description string

Description of the resource.

Id string

The provider-assigned unique ID for this managed resource.

Modules List<string>

Modules in the project.

OrgId string

Unique identifier of the Organization.

Tags List<string>

Tags to associate with the resource. Tags should be in the form name:value.

Identifier string

Unique identifier of the resource.

Name string

Name of the resource.

Color string

Color of the project.

Description string

Description of the resource.

Id string

The provider-assigned unique ID for this managed resource.

Modules []string

Modules in the project.

OrgId string

Unique identifier of the Organization.

Tags []string

Tags to associate with the resource. Tags should be in the form name:value.

Identifier string

Unique identifier of the resource.

Name string

Name of the resource.

color String

Color of the project.

description String

Description of the resource.

id String

The provider-assigned unique ID for this managed resource.

modules List<String>

Modules in the project.

orgId String

Unique identifier of the Organization.

tags List<String>

Tags to associate with the resource. Tags should be in the form name:value.

identifier String

Unique identifier of the resource.

name String

Name of the resource.

color string

Color of the project.

description string

Description of the resource.

id string

The provider-assigned unique ID for this managed resource.

modules string[]

Modules in the project.

orgId string

Unique identifier of the Organization.

tags string[]

Tags to associate with the resource. Tags should be in the form name:value.

identifier string

Unique identifier of the resource.

name string

Name of the resource.

color str

Color of the project.

description str

Description of the resource.

id str

The provider-assigned unique ID for this managed resource.

modules Sequence[str]

Modules in the project.

org_id str

Unique identifier of the Organization.

tags Sequence[str]

Tags to associate with the resource. Tags should be in the form name:value.

identifier str

Unique identifier of the resource.

name str

Name of the resource.

color String

Color of the project.

description String

Description of the resource.

id String

The provider-assigned unique ID for this managed resource.

modules List<String>

Modules in the project.

orgId String

Unique identifier of the Organization.

tags List<String>

Tags to associate with the resource. Tags should be in the form name:value.

identifier String

Unique identifier of the resource.

name String

Name of the resource.

Package Details

Repository
harness lbrlabs/pulumi-harness
License
Apache-2.0
Notes

This Pulumi package is based on the harness Terraform Provider.