Harness v0.7.0 published on Friday, Mar 28, 2025 by Pulumi
harness.platform.getGitopsRepository
Explore with Pulumi AI
Data source for fetching a Harness GitOps Repository.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as harness from "@pulumi/harness";
const example = harness.platform.getGitopsRepository({
    identifier: "identifier",
    accountId: "account_id",
    projectId: "project_id",
    orgId: "org_id",
    agentId: "agent_id",
});
import pulumi
import pulumi_harness as harness
example = harness.platform.get_gitops_repository(identifier="identifier",
    account_id="account_id",
    project_id="project_id",
    org_id="org_id",
    agent_id="agent_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.GetGitopsRepository(ctx, &platform.GetGitopsRepositoryArgs{
			Identifier: "identifier",
			AccountId:  pulumi.StringRef("account_id"),
			ProjectId:  pulumi.StringRef("project_id"),
			OrgId:      pulumi.StringRef("org_id"),
			AgentId:    "agent_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 example = Harness.Platform.GetGitopsRepository.Invoke(new()
    {
        Identifier = "identifier",
        AccountId = "account_id",
        ProjectId = "project_id",
        OrgId = "org_id",
        AgentId = "agent_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.GetGitopsRepositoryArgs;
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 example = PlatformFunctions.getGitopsRepository(GetGitopsRepositoryArgs.builder()
            .identifier("identifier")
            .accountId("account_id")
            .projectId("project_id")
            .orgId("org_id")
            .agentId("agent_id")
            .build());
    }
}
variables:
  example:
    fn::invoke:
      function: harness:platform:getGitopsRepository
      arguments:
        identifier: identifier
        accountId: account_id
        projectId: project_id
        orgId: org_id
        agentId: agent_id
Using getGitopsRepository
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 getGitopsRepository(args: GetGitopsRepositoryArgs, opts?: InvokeOptions): Promise<GetGitopsRepositoryResult>
function getGitopsRepositoryOutput(args: GetGitopsRepositoryOutputArgs, opts?: InvokeOptions): Output<GetGitopsRepositoryResult>def get_gitops_repository(account_id: Optional[str] = None,
                          agent_id: Optional[str] = None,
                          identifier: Optional[str] = None,
                          org_id: Optional[str] = None,
                          project_id: Optional[str] = None,
                          opts: Optional[InvokeOptions] = None) -> GetGitopsRepositoryResult
def get_gitops_repository_output(account_id: Optional[pulumi.Input[str]] = None,
                          agent_id: Optional[pulumi.Input[str]] = None,
                          identifier: Optional[pulumi.Input[str]] = None,
                          org_id: Optional[pulumi.Input[str]] = None,
                          project_id: Optional[pulumi.Input[str]] = None,
                          opts: Optional[InvokeOptions] = None) -> Output[GetGitopsRepositoryResult]func GetGitopsRepository(ctx *Context, args *GetGitopsRepositoryArgs, opts ...InvokeOption) (*GetGitopsRepositoryResult, error)
func GetGitopsRepositoryOutput(ctx *Context, args *GetGitopsRepositoryOutputArgs, opts ...InvokeOption) GetGitopsRepositoryResultOutput> Note: This function is named GetGitopsRepository in the Go SDK.
public static class GetGitopsRepository 
{
    public static Task<GetGitopsRepositoryResult> InvokeAsync(GetGitopsRepositoryArgs args, InvokeOptions? opts = null)
    public static Output<GetGitopsRepositoryResult> Invoke(GetGitopsRepositoryInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetGitopsRepositoryResult> getGitopsRepository(GetGitopsRepositoryArgs args, InvokeOptions options)
public static Output<GetGitopsRepositoryResult> getGitopsRepository(GetGitopsRepositoryArgs args, InvokeOptions options)
fn::invoke:
  function: harness:platform/getGitopsRepository:getGitopsRepository
  arguments:
    # arguments dictionaryThe following arguments are supported:
- Agent
Id string - Agent identifier of the GitOps repository.
 - Identifier string
 - Identifier of the GitOps repository.
 - Account
Id string - Account identifier of the GitOps repository.
 - Org
Id string - Organization identifier of the GitOps repository.
 - Project
Id string - Project identifier of the GitOps repository.
 
- Agent
Id string - Agent identifier of the GitOps repository.
 - Identifier string
 - Identifier of the GitOps repository.
 - Account
Id string - Account identifier of the GitOps repository.
 - Org
Id string - Organization identifier of the GitOps repository.
 - Project
Id string - Project identifier of the GitOps repository.
 
- agent
Id String - Agent identifier of the GitOps repository.
 - identifier String
 - Identifier of the GitOps repository.
 - account
Id String - Account identifier of the GitOps repository.
 - org
Id String - Organization identifier of the GitOps repository.
 - project
Id String - Project identifier of the GitOps repository.
 
- agent
Id string - Agent identifier of the GitOps repository.
 - identifier string
 - Identifier of the GitOps repository.
 - account
Id string - Account identifier of the GitOps repository.
 - org
Id string - Organization identifier of the GitOps repository.
 - project
Id string - Project identifier of the GitOps repository.
 
- agent_
id str - Agent identifier of the GitOps repository.
 - identifier str
 - Identifier of the GitOps repository.
 - account_
id str - Account identifier of the GitOps repository.
 - org_
id str - Organization identifier of the GitOps repository.
 - project_
id str - Project identifier of the GitOps repository.
 
- agent
Id String - Agent identifier of the GitOps repository.
 - identifier String
 - Identifier of the GitOps repository.
 - account
Id String - Account identifier of the GitOps repository.
 - org
Id String - Organization identifier of the GitOps repository.
 - project
Id String - Project identifier of the GitOps repository.
 
getGitopsRepository Result
The following output properties are available:
- Account
Id string - Account identifier of the GitOps repository.
 - Agent
Id string - Agent identifier of the GitOps repository.
 - Enable
Oci bool - Indicates if helm-oci support must be enabled for this repo.
 - Id string
 - The provider-assigned unique ID for this managed resource.
 - Identifier string
 - Identifier of the GitOps repository.
 - Repos
List<Get
Gitops Repository Repo>  - Repo details holding application configurations.
 - Org
Id string - Organization identifier of the GitOps repository.
 - Project
Id string - Project identifier of the GitOps repository.
 
- Account
Id string - Account identifier of the GitOps repository.
 - Agent
Id string - Agent identifier of the GitOps repository.
 - Enable
Oci bool - Indicates if helm-oci support must be enabled for this repo.
 - Id string
 - The provider-assigned unique ID for this managed resource.
 - Identifier string
 - Identifier of the GitOps repository.
 - Repos
[]Get
Gitops Repository Repo  - Repo details holding application configurations.
 - Org
Id string - Organization identifier of the GitOps repository.
 - Project
Id string - Project identifier of the GitOps repository.
 
- account
Id String - Account identifier of the GitOps repository.
 - agent
Id String - Agent identifier of the GitOps repository.
 - enable
Oci Boolean - Indicates if helm-oci support must be enabled for this repo.
 - id String
 - The provider-assigned unique ID for this managed resource.
 - identifier String
 - Identifier of the GitOps repository.
 - repos
List<Get
Gitops Repository Repo>  - Repo details holding application configurations.
 - org
Id String - Organization identifier of the GitOps repository.
 - project
Id String - Project identifier of the GitOps repository.
 
- account
Id string - Account identifier of the GitOps repository.
 - agent
Id string - Agent identifier of the GitOps repository.
 - enable
Oci boolean - Indicates if helm-oci support must be enabled for this repo.
 - id string
 - The provider-assigned unique ID for this managed resource.
 - identifier string
 - Identifier of the GitOps repository.
 - repos
Get
Gitops Repository Repo[]  - Repo details holding application configurations.
 - org
Id string - Organization identifier of the GitOps repository.
 - project
Id string - Project identifier of the GitOps repository.
 
- account_
id str - Account identifier of the GitOps repository.
 - agent_
id str - Agent identifier of the GitOps repository.
 - enable_
oci bool - Indicates if helm-oci support must be enabled for this repo.
 - id str
 - The provider-assigned unique ID for this managed resource.
 - identifier str
 - Identifier of the GitOps repository.
 - repos
Sequence[Get
Gitops Repository Repo]  - Repo details holding application configurations.
 - org_
id str - Organization identifier of the GitOps repository.
 - project_
id str - Project identifier of the GitOps repository.
 
- account
Id String - Account identifier of the GitOps repository.
 - agent
Id String - Agent identifier of the GitOps repository.
 - enable
Oci Boolean - Indicates if helm-oci support must be enabled for this repo.
 - id String
 - The provider-assigned unique ID for this managed resource.
 - identifier String
 - Identifier of the GitOps repository.
 - repos List<Property Map>
 - Repo details holding application configurations.
 - org
Id String - Organization identifier of the GitOps repository.
 - project
Id String - Project identifier of the GitOps repository.
 
Supporting Types
GetGitopsRepositoryRepo   
- Connection
Type string - Identifies the authentication method used to connect to the repository. Possible values: "HTTPS" "SSH" "GITHUB" "HTTPS_ANONYMOUS_CONNECTION_TYPE"
 - Enable
Lfs bool - Indicates if git-lfs support must be enabled for this repo. This is valid only for Git repositories.
 - Enable
Oci bool - Indicates if helm-oci support must be enabled for this repo.
 - Github
App stringEnterprise Base Url  - Base URL of GitHub Enterprise installation. If left empty, this defaults to https://api.github.com.
 - Github
App stringId  - Id of the GitHub app used to access the repo.
 - Github
App stringInstallation Id  - Installation id of the GitHub app used to access the repo.
 - Github
App stringPrivate Key  - GitHub app private key PEM data.
 - Inherited
Creds bool - Indicates if the credentials were inherited from a repository credential.
 - Insecure bool
 - Indicates if the connection to the repository ignores any errors when verifying TLS certificates or SSH host keys.
 - Insecure
Ignore boolHost Key  - Indicates if InsecureIgnoreHostKey should be used. Insecure is favored used only for git repos. Deprecated.
 - Name string
 - Name to be used for this repo. Only used with Helm repos.
 - Password string
 - Password or PAT to be used for authenticating the remote repository.
 - Project string
 - The ArgoCD project name corresponding to this GitOps repository. An empty string means that the GitOps repository belongs to the default project created by Harness.
 - Proxy string
 - The HTTP/HTTPS proxy used to access the repo.
 - Repo string
 - URL to the remote repository.
 - Ssh
Private stringKey  - SSH Key in PEM format for authenticating the repository. Used only for Git repository.
 - Tls
Client stringCert Data  - Certificate in PEM format for authenticating at the repo server. This is used for mTLS. The value should be base64 encoded.
 - Tls
Client stringCert Key  - Private key in PEM format for authenticating at the repo server. This is used for mTLS. The value should be base64 encoded.
 - Type_ string
 - Type specifies the type of the repo. Can be either "git" or "helm. "git" is assumed if empty or absent.
 - Username string
 - Username to be used for authenticating the remote repository.
 
- Connection
Type string - Identifies the authentication method used to connect to the repository. Possible values: "HTTPS" "SSH" "GITHUB" "HTTPS_ANONYMOUS_CONNECTION_TYPE"
 - Enable
Lfs bool - Indicates if git-lfs support must be enabled for this repo. This is valid only for Git repositories.
 - Enable
Oci bool - Indicates if helm-oci support must be enabled for this repo.
 - Github
App stringEnterprise Base Url  - Base URL of GitHub Enterprise installation. If left empty, this defaults to https://api.github.com.
 - Github
App stringId  - Id of the GitHub app used to access the repo.
 - Github
App stringInstallation Id  - Installation id of the GitHub app used to access the repo.
 - Github
App stringPrivate Key  - GitHub app private key PEM data.
 - Inherited
Creds bool - Indicates if the credentials were inherited from a repository credential.
 - Insecure bool
 - Indicates if the connection to the repository ignores any errors when verifying TLS certificates or SSH host keys.
 - Insecure
Ignore boolHost Key  - Indicates if InsecureIgnoreHostKey should be used. Insecure is favored used only for git repos. Deprecated.
 - Name string
 - Name to be used for this repo. Only used with Helm repos.
 - Password string
 - Password or PAT to be used for authenticating the remote repository.
 - Project string
 - The ArgoCD project name corresponding to this GitOps repository. An empty string means that the GitOps repository belongs to the default project created by Harness.
 - Proxy string
 - The HTTP/HTTPS proxy used to access the repo.
 - Repo string
 - URL to the remote repository.
 - Ssh
Private stringKey  - SSH Key in PEM format for authenticating the repository. Used only for Git repository.
 - Tls
Client stringCert Data  - Certificate in PEM format for authenticating at the repo server. This is used for mTLS. The value should be base64 encoded.
 - Tls
Client stringCert Key  - Private key in PEM format for authenticating at the repo server. This is used for mTLS. The value should be base64 encoded.
 - Type_ string
 - Type specifies the type of the repo. Can be either "git" or "helm. "git" is assumed if empty or absent.
 - Username string
 - Username to be used for authenticating the remote repository.
 
- connection
Type String - Identifies the authentication method used to connect to the repository. Possible values: "HTTPS" "SSH" "GITHUB" "HTTPS_ANONYMOUS_CONNECTION_TYPE"
 - enable
Lfs Boolean - Indicates if git-lfs support must be enabled for this repo. This is valid only for Git repositories.
 - enable
Oci Boolean - Indicates if helm-oci support must be enabled for this repo.
 - github
App StringEnterprise Base Url  - Base URL of GitHub Enterprise installation. If left empty, this defaults to https://api.github.com.
 - github
App StringId  - Id of the GitHub app used to access the repo.
 - github
App StringInstallation Id  - Installation id of the GitHub app used to access the repo.
 - github
App StringPrivate Key  - GitHub app private key PEM data.
 - inherited
Creds Boolean - Indicates if the credentials were inherited from a repository credential.
 - insecure Boolean
 - Indicates if the connection to the repository ignores any errors when verifying TLS certificates or SSH host keys.
 - insecure
Ignore BooleanHost Key  - Indicates if InsecureIgnoreHostKey should be used. Insecure is favored used only for git repos. Deprecated.
 - name String
 - Name to be used for this repo. Only used with Helm repos.
 - password String
 - Password or PAT to be used for authenticating the remote repository.
 - project String
 - The ArgoCD project name corresponding to this GitOps repository. An empty string means that the GitOps repository belongs to the default project created by Harness.
 - proxy String
 - The HTTP/HTTPS proxy used to access the repo.
 - repo String
 - URL to the remote repository.
 - ssh
Private StringKey  - SSH Key in PEM format for authenticating the repository. Used only for Git repository.
 - tls
Client StringCert Data  - Certificate in PEM format for authenticating at the repo server. This is used for mTLS. The value should be base64 encoded.
 - tls
Client StringCert Key  - Private key in PEM format for authenticating at the repo server. This is used for mTLS. The value should be base64 encoded.
 - type_ String
 - Type specifies the type of the repo. Can be either "git" or "helm. "git" is assumed if empty or absent.
 - username String
 - Username to be used for authenticating the remote repository.
 
- connection
Type string - Identifies the authentication method used to connect to the repository. Possible values: "HTTPS" "SSH" "GITHUB" "HTTPS_ANONYMOUS_CONNECTION_TYPE"
 - enable
Lfs boolean - Indicates if git-lfs support must be enabled for this repo. This is valid only for Git repositories.
 - enable
Oci boolean - Indicates if helm-oci support must be enabled for this repo.
 - github
App stringEnterprise Base Url  - Base URL of GitHub Enterprise installation. If left empty, this defaults to https://api.github.com.
 - github
App stringId  - Id of the GitHub app used to access the repo.
 - github
App stringInstallation Id  - Installation id of the GitHub app used to access the repo.
 - github
App stringPrivate Key  - GitHub app private key PEM data.
 - inherited
Creds boolean - Indicates if the credentials were inherited from a repository credential.
 - insecure boolean
 - Indicates if the connection to the repository ignores any errors when verifying TLS certificates or SSH host keys.
 - insecure
Ignore booleanHost Key  - Indicates if InsecureIgnoreHostKey should be used. Insecure is favored used only for git repos. Deprecated.
 - name string
 - Name to be used for this repo. Only used with Helm repos.
 - password string
 - Password or PAT to be used for authenticating the remote repository.
 - project string
 - The ArgoCD project name corresponding to this GitOps repository. An empty string means that the GitOps repository belongs to the default project created by Harness.
 - proxy string
 - The HTTP/HTTPS proxy used to access the repo.
 - repo string
 - URL to the remote repository.
 - ssh
Private stringKey  - SSH Key in PEM format for authenticating the repository. Used only for Git repository.
 - tls
Client stringCert Data  - Certificate in PEM format for authenticating at the repo server. This is used for mTLS. The value should be base64 encoded.
 - tls
Client stringCert Key  - Private key in PEM format for authenticating at the repo server. This is used for mTLS. The value should be base64 encoded.
 - type_ string
 - Type specifies the type of the repo. Can be either "git" or "helm. "git" is assumed if empty or absent.
 - username string
 - Username to be used for authenticating the remote repository.
 
- connection_
type str - Identifies the authentication method used to connect to the repository. Possible values: "HTTPS" "SSH" "GITHUB" "HTTPS_ANONYMOUS_CONNECTION_TYPE"
 - enable_
lfs bool - Indicates if git-lfs support must be enabled for this repo. This is valid only for Git repositories.
 - enable_
oci bool - Indicates if helm-oci support must be enabled for this repo.
 - github_
app_ strenterprise_ base_ url  - Base URL of GitHub Enterprise installation. If left empty, this defaults to https://api.github.com.
 - github_
app_ strid  - Id of the GitHub app used to access the repo.
 - github_
app_ strinstallation_ id  - Installation id of the GitHub app used to access the repo.
 - github_
app_ strprivate_ key  - GitHub app private key PEM data.
 - inherited_
creds bool - Indicates if the credentials were inherited from a repository credential.
 - insecure bool
 - Indicates if the connection to the repository ignores any errors when verifying TLS certificates or SSH host keys.
 - insecure_
ignore_ boolhost_ key  - Indicates if InsecureIgnoreHostKey should be used. Insecure is favored used only for git repos. Deprecated.
 - name str
 - Name to be used for this repo. Only used with Helm repos.
 - password str
 - Password or PAT to be used for authenticating the remote repository.
 - project str
 - The ArgoCD project name corresponding to this GitOps repository. An empty string means that the GitOps repository belongs to the default project created by Harness.
 - proxy str
 - The HTTP/HTTPS proxy used to access the repo.
 - repo str
 - URL to the remote repository.
 - ssh_
private_ strkey  - SSH Key in PEM format for authenticating the repository. Used only for Git repository.
 - tls_
client_ strcert_ data  - Certificate in PEM format for authenticating at the repo server. This is used for mTLS. The value should be base64 encoded.
 - tls_
client_ strcert_ key  - Private key in PEM format for authenticating at the repo server. This is used for mTLS. The value should be base64 encoded.
 - type_ str
 - Type specifies the type of the repo. Can be either "git" or "helm. "git" is assumed if empty or absent.
 - username str
 - Username to be used for authenticating the remote repository.
 
- connection
Type String - Identifies the authentication method used to connect to the repository. Possible values: "HTTPS" "SSH" "GITHUB" "HTTPS_ANONYMOUS_CONNECTION_TYPE"
 - enable
Lfs Boolean - Indicates if git-lfs support must be enabled for this repo. This is valid only for Git repositories.
 - enable
Oci Boolean - Indicates if helm-oci support must be enabled for this repo.
 - github
App StringEnterprise Base Url  - Base URL of GitHub Enterprise installation. If left empty, this defaults to https://api.github.com.
 - github
App StringId  - Id of the GitHub app used to access the repo.
 - github
App StringInstallation Id  - Installation id of the GitHub app used to access the repo.
 - github
App StringPrivate Key  - GitHub app private key PEM data.
 - inherited
Creds Boolean - Indicates if the credentials were inherited from a repository credential.
 - insecure Boolean
 - Indicates if the connection to the repository ignores any errors when verifying TLS certificates or SSH host keys.
 - insecure
Ignore BooleanHost Key  - Indicates if InsecureIgnoreHostKey should be used. Insecure is favored used only for git repos. Deprecated.
 - name String
 - Name to be used for this repo. Only used with Helm repos.
 - password String
 - Password or PAT to be used for authenticating the remote repository.
 - project String
 - The ArgoCD project name corresponding to this GitOps repository. An empty string means that the GitOps repository belongs to the default project created by Harness.
 - proxy String
 - The HTTP/HTTPS proxy used to access the repo.
 - repo String
 - URL to the remote repository.
 - ssh
Private StringKey  - SSH Key in PEM format for authenticating the repository. Used only for Git repository.
 - tls
Client StringCert Data  - Certificate in PEM format for authenticating at the repo server. This is used for mTLS. The value should be base64 encoded.
 - tls
Client StringCert Key  - Private key in PEM format for authenticating at the repo server. This is used for mTLS. The value should be base64 encoded.
 - type_ String
 - Type specifies the type of the repo. Can be either "git" or "helm. "git" is assumed if empty or absent.
 - username String
 - Username to be used for authenticating the remote repository.
 
Package Details
- Repository
 - harness pulumi/pulumi-harness
 - License
 - Apache-2.0
 - Notes
 - This Pulumi package is based on the 
harnessTerraform Provider.