Harness v0.7.0 published on Friday, Mar 28, 2025 by Pulumi
harness.platform.getRepo
Explore with Pulumi AI
Data source for retrieving a Harness repo.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as harness from "@pulumi/harness";
const exampleByIdentifier = harness.platform.getRepo({
    identifier: "identifier",
    orgId: "org_id",
    projectId: "proj_id",
});
import pulumi
import pulumi_harness as harness
example_by_identifier = harness.platform.get_repo(identifier="identifier",
    org_id="org_id",
    project_id="proj_id")
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.LookupRepo(ctx, &platform.LookupRepoArgs{
			Identifier: "identifier",
			OrgId:      pulumi.StringRef("org_id"),
			ProjectId:  pulumi.StringRef("proj_id"),
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Harness = Pulumi.Harness;
return await Deployment.RunAsync(() => 
{
    var exampleByIdentifier = Harness.Platform.GetRepo.Invoke(new()
    {
        Identifier = "identifier",
        OrgId = "org_id",
        ProjectId = "proj_id",
    });
});
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.GetRepoArgs;
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 exampleByIdentifier = PlatformFunctions.getRepo(GetRepoArgs.builder()
            .identifier("identifier")
            .orgId("org_id")
            .projectId("proj_id")
            .build());
    }
}
variables:
  exampleByIdentifier:
    fn::invoke:
      function: harness:platform:getRepo
      arguments:
        identifier: identifier
        orgId: org_id
        projectId: proj_id
Using getRepo
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 getRepo(args: GetRepoArgs, opts?: InvokeOptions): Promise<GetRepoResult>
function getRepoOutput(args: GetRepoOutputArgs, opts?: InvokeOptions): Output<GetRepoResult>def get_repo(default_branch: Optional[str] = None,
             description: Optional[str] = None,
             git_ignore: Optional[str] = None,
             identifier: Optional[str] = None,
             license: Optional[str] = None,
             org_id: Optional[str] = None,
             project_id: Optional[str] = None,
             readme: Optional[bool] = None,
             sources: Optional[Sequence[GetRepoSource]] = None,
             opts: Optional[InvokeOptions] = None) -> GetRepoResult
def get_repo_output(default_branch: Optional[pulumi.Input[str]] = None,
             description: Optional[pulumi.Input[str]] = None,
             git_ignore: Optional[pulumi.Input[str]] = None,
             identifier: Optional[pulumi.Input[str]] = None,
             license: Optional[pulumi.Input[str]] = None,
             org_id: Optional[pulumi.Input[str]] = None,
             project_id: Optional[pulumi.Input[str]] = None,
             readme: Optional[pulumi.Input[bool]] = None,
             sources: Optional[pulumi.Input[Sequence[pulumi.Input[GetRepoSourceArgs]]]] = None,
             opts: Optional[InvokeOptions] = None) -> Output[GetRepoResult]func LookupRepo(ctx *Context, args *LookupRepoArgs, opts ...InvokeOption) (*LookupRepoResult, error)
func LookupRepoOutput(ctx *Context, args *LookupRepoOutputArgs, opts ...InvokeOption) LookupRepoResultOutput> Note: This function is named LookupRepo in the Go SDK.
public static class GetRepo 
{
    public static Task<GetRepoResult> InvokeAsync(GetRepoArgs args, InvokeOptions? opts = null)
    public static Output<GetRepoResult> Invoke(GetRepoInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetRepoResult> getRepo(GetRepoArgs args, InvokeOptions options)
public static Output<GetRepoResult> getRepo(GetRepoArgs args, InvokeOptions options)
fn::invoke:
  function: harness:platform/getRepo:getRepo
  arguments:
    # arguments dictionaryThe following arguments are supported:
- Identifier string
 - Identifier of the repository.
 - Default
Branch string - Default branch of the repository (Applicate only for create).
 - Description string
 - Description of the repository.
 - Git
Ignore string - Repository should be created with specified predefined gitignore file.
 - License string
 - Repository should be created with specified predefined license file.
 - Org
Id string - Unique identifier of the organization.
 - Project
Id string - Unique identifier of the project.
 - Readme bool
 - Repository should be created with readme file.
 - Sources
List<Get
Repo Source>  - Configuration for importing an existing repository from SCM provider.
 
- Identifier string
 - Identifier of the repository.
 - Default
Branch string - Default branch of the repository (Applicate only for create).
 - Description string
 - Description of the repository.
 - Git
Ignore string - Repository should be created with specified predefined gitignore file.
 - License string
 - Repository should be created with specified predefined license file.
 - Org
Id string - Unique identifier of the organization.
 - Project
Id string - Unique identifier of the project.
 - Readme bool
 - Repository should be created with readme file.
 - Sources
[]Get
Repo Source  - Configuration for importing an existing repository from SCM provider.
 
- identifier String
 - Identifier of the repository.
 - default
Branch String - Default branch of the repository (Applicate only for create).
 - description String
 - Description of the repository.
 - git
Ignore String - Repository should be created with specified predefined gitignore file.
 - license String
 - Repository should be created with specified predefined license file.
 - org
Id String - Unique identifier of the organization.
 - project
Id String - Unique identifier of the project.
 - readme Boolean
 - Repository should be created with readme file.
 - sources
List<Get
Repo Source>  - Configuration for importing an existing repository from SCM provider.
 
- identifier string
 - Identifier of the repository.
 - default
Branch string - Default branch of the repository (Applicate only for create).
 - description string
 - Description of the repository.
 - git
Ignore string - Repository should be created with specified predefined gitignore file.
 - license string
 - Repository should be created with specified predefined license file.
 - org
Id string - Unique identifier of the organization.
 - project
Id string - Unique identifier of the project.
 - readme boolean
 - Repository should be created with readme file.
 - sources
Get
Repo Source[]  - Configuration for importing an existing repository from SCM provider.
 
- identifier str
 - Identifier of the repository.
 - default_
branch str - Default branch of the repository (Applicate only for create).
 - description str
 - Description of the repository.
 - git_
ignore str - Repository should be created with specified predefined gitignore file.
 - license str
 - Repository should be created with specified predefined license file.
 - org_
id str - Unique identifier of the organization.
 - project_
id str - Unique identifier of the project.
 - readme bool
 - Repository should be created with readme file.
 - sources
Sequence[Get
Repo Source]  - Configuration for importing an existing repository from SCM provider.
 
- identifier String
 - Identifier of the repository.
 - default
Branch String - Default branch of the repository (Applicate only for create).
 - description String
 - Description of the repository.
 - git
Ignore String - Repository should be created with specified predefined gitignore file.
 - license String
 - Repository should be created with specified predefined license file.
 - org
Id String - Unique identifier of the organization.
 - project
Id String - Unique identifier of the project.
 - readme Boolean
 - Repository should be created with readme file.
 - sources List<Property Map>
 - Configuration for importing an existing repository from SCM provider.
 
getRepo Result
The following output properties are available:
- Created int
 - Timestamp when the repository was created.
 - Created
By int - ID of the user who created the repository.
 - Git
Url string - Git URL of the repository.
 - Id string
 - Internal ID of the repository.
 - Identifier string
 - Identifier of the repository.
 - Name string
 - Name of the repository.
 - Path string
 - Path of the repository.
 - Updated int
 - Timestamp when the repository was last updated.
 - Default
Branch string - Default branch of the repository (Applicate only for create).
 - Description string
 - Description of the repository.
 - Git
Ignore string - Repository should be created with specified predefined gitignore file.
 - License string
 - Repository should be created with specified predefined license file.
 - Org
Id string - Unique identifier of the organization.
 - Project
Id string - Unique identifier of the project.
 - Readme bool
 - Repository should be created with readme file.
 - Sources
List<Get
Repo Source>  - Configuration for importing an existing repository from SCM provider.
 
- Created int
 - Timestamp when the repository was created.
 - Created
By int - ID of the user who created the repository.
 - Git
Url string - Git URL of the repository.
 - Id string
 - Internal ID of the repository.
 - Identifier string
 - Identifier of the repository.
 - Name string
 - Name of the repository.
 - Path string
 - Path of the repository.
 - Updated int
 - Timestamp when the repository was last updated.
 - Default
Branch string - Default branch of the repository (Applicate only for create).
 - Description string
 - Description of the repository.
 - Git
Ignore string - Repository should be created with specified predefined gitignore file.
 - License string
 - Repository should be created with specified predefined license file.
 - Org
Id string - Unique identifier of the organization.
 - Project
Id string - Unique identifier of the project.
 - Readme bool
 - Repository should be created with readme file.
 - Sources
[]Get
Repo Source  - Configuration for importing an existing repository from SCM provider.
 
- created Integer
 - Timestamp when the repository was created.
 - created
By Integer - ID of the user who created the repository.
 - git
Url String - Git URL of the repository.
 - id String
 - Internal ID of the repository.
 - identifier String
 - Identifier of the repository.
 - name String
 - Name of the repository.
 - path String
 - Path of the repository.
 - updated Integer
 - Timestamp when the repository was last updated.
 - default
Branch String - Default branch of the repository (Applicate only for create).
 - description String
 - Description of the repository.
 - git
Ignore String - Repository should be created with specified predefined gitignore file.
 - license String
 - Repository should be created with specified predefined license file.
 - org
Id String - Unique identifier of the organization.
 - project
Id String - Unique identifier of the project.
 - readme Boolean
 - Repository should be created with readme file.
 - sources
List<Get
Repo Source>  - Configuration for importing an existing repository from SCM provider.
 
- created number
 - Timestamp when the repository was created.
 - created
By number - ID of the user who created the repository.
 - git
Url string - Git URL of the repository.
 - id string
 - Internal ID of the repository.
 - identifier string
 - Identifier of the repository.
 - name string
 - Name of the repository.
 - path string
 - Path of the repository.
 - updated number
 - Timestamp when the repository was last updated.
 - default
Branch string - Default branch of the repository (Applicate only for create).
 - description string
 - Description of the repository.
 - git
Ignore string - Repository should be created with specified predefined gitignore file.
 - license string
 - Repository should be created with specified predefined license file.
 - org
Id string - Unique identifier of the organization.
 - project
Id string - Unique identifier of the project.
 - readme boolean
 - Repository should be created with readme file.
 - sources
Get
Repo Source[]  - Configuration for importing an existing repository from SCM provider.
 
- created int
 - Timestamp when the repository was created.
 - created_
by int - ID of the user who created the repository.
 - git_
url str - Git URL of the repository.
 - id str
 - Internal ID of the repository.
 - identifier str
 - Identifier of the repository.
 - name str
 - Name of the repository.
 - path str
 - Path of the repository.
 - updated int
 - Timestamp when the repository was last updated.
 - default_
branch str - Default branch of the repository (Applicate only for create).
 - description str
 - Description of the repository.
 - git_
ignore str - Repository should be created with specified predefined gitignore file.
 - license str
 - Repository should be created with specified predefined license file.
 - org_
id str - Unique identifier of the organization.
 - project_
id str - Unique identifier of the project.
 - readme bool
 - Repository should be created with readme file.
 - sources
Sequence[Get
Repo Source]  - Configuration for importing an existing repository from SCM provider.
 
- created Number
 - Timestamp when the repository was created.
 - created
By Number - ID of the user who created the repository.
 - git
Url String - Git URL of the repository.
 - id String
 - Internal ID of the repository.
 - identifier String
 - Identifier of the repository.
 - name String
 - Name of the repository.
 - path String
 - Path of the repository.
 - updated Number
 - Timestamp when the repository was last updated.
 - default
Branch String - Default branch of the repository (Applicate only for create).
 - description String
 - Description of the repository.
 - git
Ignore String - Repository should be created with specified predefined gitignore file.
 - license String
 - Repository should be created with specified predefined license file.
 - org
Id String - Unique identifier of the organization.
 - project
Id String - Unique identifier of the project.
 - readme Boolean
 - Repository should be created with readme file.
 - sources List<Property Map>
 - Configuration for importing an existing repository from SCM provider.
 
Supporting Types
GetRepoSource  
- Host string
 - The host URL for the import source.
 - Password string
 - The password for authentication when importing.
 - Repo string
 - The full identifier of the repository on the SCM provider's platform.
 - Type string
 - The type of SCM provider (github, gitlab, bitbucket, stash, gitea, gogs) when importing.
 - Username string
 - The username for authentication when importing.
 
- Host string
 - The host URL for the import source.
 - Password string
 - The password for authentication when importing.
 - Repo string
 - The full identifier of the repository on the SCM provider's platform.
 - Type string
 - The type of SCM provider (github, gitlab, bitbucket, stash, gitea, gogs) when importing.
 - Username string
 - The username for authentication when importing.
 
- host String
 - The host URL for the import source.
 - password String
 - The password for authentication when importing.
 - repo String
 - The full identifier of the repository on the SCM provider's platform.
 - type String
 - The type of SCM provider (github, gitlab, bitbucket, stash, gitea, gogs) when importing.
 - username String
 - The username for authentication when importing.
 
- host string
 - The host URL for the import source.
 - password string
 - The password for authentication when importing.
 - repo string
 - The full identifier of the repository on the SCM provider's platform.
 - type string
 - The type of SCM provider (github, gitlab, bitbucket, stash, gitea, gogs) when importing.
 - username string
 - The username for authentication when importing.
 
- host str
 - The host URL for the import source.
 - password str
 - The password for authentication when importing.
 - repo str
 - The full identifier of the repository on the SCM provider's platform.
 - type str
 - The type of SCM provider (github, gitlab, bitbucket, stash, gitea, gogs) when importing.
 - username str
 - The username for authentication when importing.
 
- host String
 - The host URL for the import source.
 - password String
 - The password for authentication when importing.
 - repo String
 - The full identifier of the repository on the SCM provider's platform.
 - type String
 - The type of SCM provider (github, gitlab, bitbucket, stash, gitea, gogs) when importing.
 - username String
 - The username for authentication when importing.
 
Package Details
- Repository
 - harness pulumi/pulumi-harness
 - License
 - Apache-2.0
 - Notes
 - This Pulumi package is based on the 
harnessTerraform Provider.