1. Packages
  2. Harness Provider
  3. API Docs
  4. platform
  5. getProject
Harness v0.7.3 published on Friday, Apr 18, 2025 by Pulumi

harness.platform.getProject

Explore with Pulumi AI

Harness v0.7.3 published on Friday, Apr 18, 2025 by Pulumi

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as harness from "@pulumi/harness";

const exampleById = harness.platform.getProject({
    identifier: "identifier",
    orgId: "org_id",
});
const exampleByName = harness.platform.getProject({
    name: "name",
    orgId: "org_id",
});
Copy
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")
Copy
package main

import (
	"github.com/pulumi/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
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
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",
    });

});
Copy
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());

    }
}
Copy
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
Copy

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>
Copy
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]
Copy
func LookupProject(ctx *Context, args *LookupProjectArgs, opts ...InvokeOption) (*LookupProjectResult, error)
func LookupProjectOutput(ctx *Context, args *LookupProjectOutputArgs, opts ...InvokeOption) LookupProjectResultOutput
Copy

> 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)
}
Copy
public static CompletableFuture<GetProjectResult> getProject(GetProjectArgs args, InvokeOptions options)
public static Output<GetProjectResult> getProject(GetProjectArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: harness:platform/getProject:getProject
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

OrgId
This property is required.
Changes to this property will trigger replacement.
string
Unique identifier of the organization.
Identifier string
Unique identifier of the resource.
Name string
Name of the resource.
OrgId
This property is required.
Changes to this property will trigger replacement.
string
Unique identifier of the organization.
Identifier string
Unique identifier of the resource.
Name string
Name of the resource.
orgId
This property is required.
Changes to this property will trigger replacement.
String
Unique identifier of the organization.
identifier String
Unique identifier of the resource.
name String
Name of the resource.
orgId
This property is required.
Changes to this property will trigger replacement.
string
Unique identifier of the organization.
identifier string
Unique identifier of the resource.
name string
Name of the resource.
org_id
This property is required.
Changes to this property will trigger replacement.
str
Unique identifier of the organization.
identifier str
Unique identifier of the resource.
name str
Name of the resource.
orgId
This property is required.
Changes to this property will trigger replacement.
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.
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.
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.
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.
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.
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.
identifier String
Unique identifier of the resource.
name String
Name of the resource.

Package Details

Repository
harness pulumi/pulumi-harness
License
Apache-2.0
Notes
This Pulumi package is based on the harness Terraform Provider.
Harness v0.7.3 published on Friday, Apr 18, 2025 by Pulumi