harness.platform.GitOpsRepoCred
Explore with Pulumi AI
Resource for creating a Harness Gitops Repositories Credentials.
Example Usage
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Harness = Lbrlabs.PulumiPackage.Harness;
return await Deployment.RunAsync(() =>
{
var test = new Harness.Platform.GitOpsRepoCred("test", new()
{
Identifier = "identifier",
AccountId = "account_id",
AgentId = "agent_id",
ProjectId = "project_id",
OrgId = "org_id",
Creds = new[]
{
new Harness.Platform.Inputs.GitOpsRepoCredCredArgs
{
Type = "git",
Url = "github.com",
SshPrivateKey = "yoursshprivatekey",
},
},
});
});
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.NewGitOpsRepoCred(ctx, "test", &platform.GitOpsRepoCredArgs{
Identifier: pulumi.String("identifier"),
AccountId: pulumi.String("account_id"),
AgentId: pulumi.String("agent_id"),
ProjectId: pulumi.String("project_id"),
OrgId: pulumi.String("org_id"),
Creds: platform.GitOpsRepoCredCredArray{
&platform.GitOpsRepoCredCredArgs{
Type: pulumi.String("git"),
Url: pulumi.String("github.com"),
SshPrivateKey: pulumi.String("yoursshprivatekey"),
},
},
})
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.GitOpsRepoCred;
import com.pulumi.harness.platform.GitOpsRepoCredArgs;
import com.pulumi.harness.platform.inputs.GitOpsRepoCredCredArgs;
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) {
var test = new GitOpsRepoCred("test", GitOpsRepoCredArgs.builder()
.identifier("identifier")
.accountId("account_id")
.agentId("agent_id")
.projectId("project_id")
.orgId("org_id")
.creds(GitOpsRepoCredCredArgs.builder()
.type("git")
.url("github.com")
.sshPrivateKey("yoursshprivatekey")
.build())
.build());
}
}
import pulumi
import lbrlabs_pulumi_harness as harness
test = harness.platform.GitOpsRepoCred("test",
identifier="identifier",
account_id="account_id",
agent_id="agent_id",
project_id="project_id",
org_id="org_id",
creds=[harness.platform.GitOpsRepoCredCredArgs(
type="git",
url="github.com",
ssh_private_key="yoursshprivatekey",
)])
import * as pulumi from "@pulumi/pulumi";
import * as harness from "@lbrlabs/pulumi-harness";
const test = new harness.platform.GitOpsRepoCred("test", {
identifier: "identifier",
accountId: "account_id",
agentId: "agent_id",
projectId: "project_id",
orgId: "org_id",
creds: [{
type: "git",
url: "github.com",
sshPrivateKey: "yoursshprivatekey",
}],
});
resources:
test:
type: harness:platform:GitOpsRepoCred
properties:
identifier: identifier
accountId: account_id
agentId: agent_id
projectId: project_id
orgId: org_id
creds:
- type: git
url: github.com
sshPrivateKey: yoursshprivatekey
Create GitOpsRepoCred Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new GitOpsRepoCred(name: string, args: GitOpsRepoCredArgs, opts?: CustomResourceOptions);
@overload
def GitOpsRepoCred(resource_name: str,
args: GitOpsRepoCredArgs,
opts: Optional[ResourceOptions] = None)
@overload
def GitOpsRepoCred(resource_name: str,
opts: Optional[ResourceOptions] = None,
account_id: Optional[str] = None,
agent_id: Optional[str] = None,
identifier: Optional[str] = None,
creds: Optional[Sequence[GitOpsRepoCredCredArgs]] = None,
org_id: Optional[str] = None,
project_id: Optional[str] = None,
upsert: Optional[bool] = None)
func NewGitOpsRepoCred(ctx *Context, name string, args GitOpsRepoCredArgs, opts ...ResourceOption) (*GitOpsRepoCred, error)
public GitOpsRepoCred(string name, GitOpsRepoCredArgs args, CustomResourceOptions? opts = null)
public GitOpsRepoCred(String name, GitOpsRepoCredArgs args)
public GitOpsRepoCred(String name, GitOpsRepoCredArgs args, CustomResourceOptions options)
type: harness:platform:GitOpsRepoCred
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args GitOpsRepoCredArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args GitOpsRepoCredArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args GitOpsRepoCredArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args GitOpsRepoCredArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args GitOpsRepoCredArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var gitOpsRepoCredResource = new Harness.Platform.GitOpsRepoCred("gitOpsRepoCredResource", new()
{
AccountId = "string",
AgentId = "string",
Identifier = "string",
Creds = new[]
{
new Harness.Platform.Inputs.GitOpsRepoCredCredArgs
{
EnableOci = false,
GithubAppEnterpriseBaseUrl = "string",
GithubAppId = "string",
GithubAppInstallationId = "string",
GithubAppPrivateKey = "string",
Password = "string",
SshPrivateKey = "string",
TlsClientCertData = "string",
TlsClientCertKey = "string",
Type = "string",
Url = "string",
Username = "string",
},
},
OrgId = "string",
ProjectId = "string",
Upsert = false,
});
example, err := platform.NewGitOpsRepoCred(ctx, "gitOpsRepoCredResource", &platform.GitOpsRepoCredArgs{
AccountId: pulumi.String("string"),
AgentId: pulumi.String("string"),
Identifier: pulumi.String("string"),
Creds: platform.GitOpsRepoCredCredArray{
&platform.GitOpsRepoCredCredArgs{
EnableOci: pulumi.Bool(false),
GithubAppEnterpriseBaseUrl: pulumi.String("string"),
GithubAppId: pulumi.String("string"),
GithubAppInstallationId: pulumi.String("string"),
GithubAppPrivateKey: pulumi.String("string"),
Password: pulumi.String("string"),
SshPrivateKey: pulumi.String("string"),
TlsClientCertData: pulumi.String("string"),
TlsClientCertKey: pulumi.String("string"),
Type: pulumi.String("string"),
Url: pulumi.String("string"),
Username: pulumi.String("string"),
},
},
OrgId: pulumi.String("string"),
ProjectId: pulumi.String("string"),
Upsert: pulumi.Bool(false),
})
var gitOpsRepoCredResource = new GitOpsRepoCred("gitOpsRepoCredResource", GitOpsRepoCredArgs.builder()
.accountId("string")
.agentId("string")
.identifier("string")
.creds(GitOpsRepoCredCredArgs.builder()
.enableOci(false)
.githubAppEnterpriseBaseUrl("string")
.githubAppId("string")
.githubAppInstallationId("string")
.githubAppPrivateKey("string")
.password("string")
.sshPrivateKey("string")
.tlsClientCertData("string")
.tlsClientCertKey("string")
.type("string")
.url("string")
.username("string")
.build())
.orgId("string")
.projectId("string")
.upsert(false)
.build());
git_ops_repo_cred_resource = harness.platform.GitOpsRepoCred("gitOpsRepoCredResource",
account_id="string",
agent_id="string",
identifier="string",
creds=[harness.platform.GitOpsRepoCredCredArgs(
enable_oci=False,
github_app_enterprise_base_url="string",
github_app_id="string",
github_app_installation_id="string",
github_app_private_key="string",
password="string",
ssh_private_key="string",
tls_client_cert_data="string",
tls_client_cert_key="string",
type="string",
url="string",
username="string",
)],
org_id="string",
project_id="string",
upsert=False)
const gitOpsRepoCredResource = new harness.platform.GitOpsRepoCred("gitOpsRepoCredResource", {
accountId: "string",
agentId: "string",
identifier: "string",
creds: [{
enableOci: false,
githubAppEnterpriseBaseUrl: "string",
githubAppId: "string",
githubAppInstallationId: "string",
githubAppPrivateKey: "string",
password: "string",
sshPrivateKey: "string",
tlsClientCertData: "string",
tlsClientCertKey: "string",
type: "string",
url: "string",
username: "string",
}],
orgId: "string",
projectId: "string",
upsert: false,
});
type: harness:platform:GitOpsRepoCred
properties:
accountId: string
agentId: string
creds:
- enableOci: false
githubAppEnterpriseBaseUrl: string
githubAppId: string
githubAppInstallationId: string
githubAppPrivateKey: string
password: string
sshPrivateKey: string
tlsClientCertData: string
tlsClientCertKey: string
type: string
url: string
username: string
identifier: string
orgId: string
projectId: string
upsert: false
GitOpsRepoCred Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The GitOpsRepoCred resource accepts the following input properties:
- Account
Id string - Account identifier of the Repository Credential.
- Agent
Id string - Agent identifier of the Repository Credential.
- Identifier string
- Identifier of the Repository Credential.
- Creds
List<Lbrlabs.
Pulumi Package. Harness. Platform. Inputs. Git Ops Repo Cred Cred> - credential details.
- Org
Id string - Organization identifier of the Repository Credential.
- Project
Id string - Project identifier of the Repository Credential.
- Upsert bool
- if the Repository credential should be upserted.
- Account
Id string - Account identifier of the Repository Credential.
- Agent
Id string - Agent identifier of the Repository Credential.
- Identifier string
- Identifier of the Repository Credential.
- Creds
[]Git
Ops Repo Cred Cred Args - credential details.
- Org
Id string - Organization identifier of the Repository Credential.
- Project
Id string - Project identifier of the Repository Credential.
- Upsert bool
- if the Repository credential should be upserted.
- account
Id String - Account identifier of the Repository Credential.
- agent
Id String - Agent identifier of the Repository Credential.
- identifier String
- Identifier of the Repository Credential.
- creds
List<Git
Ops Repo Cred Cred> - credential details.
- org
Id String - Organization identifier of the Repository Credential.
- project
Id String - Project identifier of the Repository Credential.
- upsert Boolean
- if the Repository credential should be upserted.
- account
Id string - Account identifier of the Repository Credential.
- agent
Id string - Agent identifier of the Repository Credential.
- identifier string
- Identifier of the Repository Credential.
- creds
Git
Ops Repo Cred Cred[] - credential details.
- org
Id string - Organization identifier of the Repository Credential.
- project
Id string - Project identifier of the Repository Credential.
- upsert boolean
- if the Repository credential should be upserted.
- account_
id str - Account identifier of the Repository Credential.
- agent_
id str - Agent identifier of the Repository Credential.
- identifier str
- Identifier of the Repository Credential.
- creds
Sequence[Git
Ops Repo Cred Cred Args] - credential details.
- org_
id str - Organization identifier of the Repository Credential.
- project_
id str - Project identifier of the Repository Credential.
- upsert bool
- if the Repository credential should be upserted.
- account
Id String - Account identifier of the Repository Credential.
- agent
Id String - Agent identifier of the Repository Credential.
- identifier String
- Identifier of the Repository Credential.
- creds List<Property Map>
- credential details.
- org
Id String - Organization identifier of the Repository Credential.
- project
Id String - Project identifier of the Repository Credential.
- upsert Boolean
- if the Repository credential should be upserted.
Outputs
All input properties are implicitly available as output properties. Additionally, the GitOpsRepoCred resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing GitOpsRepoCred Resource
Get an existing GitOpsRepoCred resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: GitOpsRepoCredState, opts?: CustomResourceOptions): GitOpsRepoCred
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
account_id: Optional[str] = None,
agent_id: Optional[str] = None,
creds: Optional[Sequence[GitOpsRepoCredCredArgs]] = None,
identifier: Optional[str] = None,
org_id: Optional[str] = None,
project_id: Optional[str] = None,
upsert: Optional[bool] = None) -> GitOpsRepoCred
func GetGitOpsRepoCred(ctx *Context, name string, id IDInput, state *GitOpsRepoCredState, opts ...ResourceOption) (*GitOpsRepoCred, error)
public static GitOpsRepoCred Get(string name, Input<string> id, GitOpsRepoCredState? state, CustomResourceOptions? opts = null)
public static GitOpsRepoCred get(String name, Output<String> id, GitOpsRepoCredState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Account
Id string - Account identifier of the Repository Credential.
- Agent
Id string - Agent identifier of the Repository Credential.
- Creds
List<Lbrlabs.
Pulumi Package. Harness. Platform. Inputs. Git Ops Repo Cred Cred> - credential details.
- Identifier string
- Identifier of the Repository Credential.
- Org
Id string - Organization identifier of the Repository Credential.
- Project
Id string - Project identifier of the Repository Credential.
- Upsert bool
- if the Repository credential should be upserted.
- Account
Id string - Account identifier of the Repository Credential.
- Agent
Id string - Agent identifier of the Repository Credential.
- Creds
[]Git
Ops Repo Cred Cred Args - credential details.
- Identifier string
- Identifier of the Repository Credential.
- Org
Id string - Organization identifier of the Repository Credential.
- Project
Id string - Project identifier of the Repository Credential.
- Upsert bool
- if the Repository credential should be upserted.
- account
Id String - Account identifier of the Repository Credential.
- agent
Id String - Agent identifier of the Repository Credential.
- creds
List<Git
Ops Repo Cred Cred> - credential details.
- identifier String
- Identifier of the Repository Credential.
- org
Id String - Organization identifier of the Repository Credential.
- project
Id String - Project identifier of the Repository Credential.
- upsert Boolean
- if the Repository credential should be upserted.
- account
Id string - Account identifier of the Repository Credential.
- agent
Id string - Agent identifier of the Repository Credential.
- creds
Git
Ops Repo Cred Cred[] - credential details.
- identifier string
- Identifier of the Repository Credential.
- org
Id string - Organization identifier of the Repository Credential.
- project
Id string - Project identifier of the Repository Credential.
- upsert boolean
- if the Repository credential should be upserted.
- account_
id str - Account identifier of the Repository Credential.
- agent_
id str - Agent identifier of the Repository Credential.
- creds
Sequence[Git
Ops Repo Cred Cred Args] - credential details.
- identifier str
- Identifier of the Repository Credential.
- org_
id str - Organization identifier of the Repository Credential.
- project_
id str - Project identifier of the Repository Credential.
- upsert bool
- if the Repository credential should be upserted.
- account
Id String - Account identifier of the Repository Credential.
- agent
Id String - Agent identifier of the Repository Credential.
- creds List<Property Map>
- credential details.
- identifier String
- Identifier of the Repository Credential.
- org
Id String - Organization identifier of the Repository Credential.
- project
Id String - Project identifier of the Repository Credential.
- upsert Boolean
- if the Repository credential should be upserted.
Supporting Types
GitOpsRepoCredCred, GitOpsRepoCredCredArgs
- Enable
Oci bool - Specifies whether helm-oci support should be enabled for this repo.
- Github
App stringEnterprise Base Url - Specifies the GitHub API URL for GitHub app authentication.
- Github
App stringId - Specifies the Github App ID of the app used to access the repo for GitHub app authentication.
- Github
App stringInstallation Id - Specifies the ID of the installed GitHub App for GitHub app authentication.
- Github
App stringPrivate Key - githubappprivate_key specifies the private key PEM data for authentication via GitHub app.
- Password string
- Password for authenticating at the repo server.
- Ssh
Private stringKey - Contains the private key data for authenticating at the repo server using SSH (only Git repos).
- Tls
Client stringCert Data - Specifies the TLS client cert data for authenticating at the repo server.
- Tls
Client stringCert Key - Specifies the TLS client cert key for authenticating at the repo server.
- Type string
- Type specifies the type of the repoCreds.Can be either 'git' or 'helm. 'git' is assumed if empty or absent
- Url string
- url representing this object.
- Username string
- Username for authenticating at the repo server.
- Enable
Oci bool - Specifies whether helm-oci support should be enabled for this repo.
- Github
App stringEnterprise Base Url - Specifies the GitHub API URL for GitHub app authentication.
- Github
App stringId - Specifies the Github App ID of the app used to access the repo for GitHub app authentication.
- Github
App stringInstallation Id - Specifies the ID of the installed GitHub App for GitHub app authentication.
- Github
App stringPrivate Key - githubappprivate_key specifies the private key PEM data for authentication via GitHub app.
- Password string
- Password for authenticating at the repo server.
- Ssh
Private stringKey - Contains the private key data for authenticating at the repo server using SSH (only Git repos).
- Tls
Client stringCert Data - Specifies the TLS client cert data for authenticating at the repo server.
- Tls
Client stringCert Key - Specifies the TLS client cert key for authenticating at the repo server.
- Type string
- Type specifies the type of the repoCreds.Can be either 'git' or 'helm. 'git' is assumed if empty or absent
- Url string
- url representing this object.
- Username string
- Username for authenticating at the repo server.
- enable
Oci Boolean - Specifies whether helm-oci support should be enabled for this repo.
- github
App StringEnterprise Base Url - Specifies the GitHub API URL for GitHub app authentication.
- github
App StringId - Specifies the Github App ID of the app used to access the repo for GitHub app authentication.
- github
App StringInstallation Id - Specifies the ID of the installed GitHub App for GitHub app authentication.
- github
App StringPrivate Key - githubappprivate_key specifies the private key PEM data for authentication via GitHub app.
- password String
- Password for authenticating at the repo server.
- ssh
Private StringKey - Contains the private key data for authenticating at the repo server using SSH (only Git repos).
- tls
Client StringCert Data - Specifies the TLS client cert data for authenticating at the repo server.
- tls
Client StringCert Key - Specifies the TLS client cert key for authenticating at the repo server.
- type String
- Type specifies the type of the repoCreds.Can be either 'git' or 'helm. 'git' is assumed if empty or absent
- url String
- url representing this object.
- username String
- Username for authenticating at the repo server.
- enable
Oci boolean - Specifies whether helm-oci support should be enabled for this repo.
- github
App stringEnterprise Base Url - Specifies the GitHub API URL for GitHub app authentication.
- github
App stringId - Specifies the Github App ID of the app used to access the repo for GitHub app authentication.
- github
App stringInstallation Id - Specifies the ID of the installed GitHub App for GitHub app authentication.
- github
App stringPrivate Key - githubappprivate_key specifies the private key PEM data for authentication via GitHub app.
- password string
- Password for authenticating at the repo server.
- ssh
Private stringKey - Contains the private key data for authenticating at the repo server using SSH (only Git repos).
- tls
Client stringCert Data - Specifies the TLS client cert data for authenticating at the repo server.
- tls
Client stringCert Key - Specifies the TLS client cert key for authenticating at the repo server.
- type string
- Type specifies the type of the repoCreds.Can be either 'git' or 'helm. 'git' is assumed if empty or absent
- url string
- url representing this object.
- username string
- Username for authenticating at the repo server.
- enable_
oci bool - Specifies whether helm-oci support should be enabled for this repo.
- github_
app_ strenterprise_ base_ url - Specifies the GitHub API URL for GitHub app authentication.
- github_
app_ strid - Specifies the Github App ID of the app used to access the repo for GitHub app authentication.
- github_
app_ strinstallation_ id - Specifies the ID of the installed GitHub App for GitHub app authentication.
- github_
app_ strprivate_ key - githubappprivate_key specifies the private key PEM data for authentication via GitHub app.
- password str
- Password for authenticating at the repo server.
- ssh_
private_ strkey - Contains the private key data for authenticating at the repo server using SSH (only Git repos).
- tls_
client_ strcert_ data - Specifies the TLS client cert data for authenticating at the repo server.
- tls_
client_ strcert_ key - Specifies the TLS client cert key for authenticating at the repo server.
- type str
- Type specifies the type of the repoCreds.Can be either 'git' or 'helm. 'git' is assumed if empty or absent
- url str
- url representing this object.
- username str
- Username for authenticating at the repo server.
- enable
Oci Boolean - Specifies whether helm-oci support should be enabled for this repo.
- github
App StringEnterprise Base Url - Specifies the GitHub API URL for GitHub app authentication.
- github
App StringId - Specifies the Github App ID of the app used to access the repo for GitHub app authentication.
- github
App StringInstallation Id - Specifies the ID of the installed GitHub App for GitHub app authentication.
- github
App StringPrivate Key - githubappprivate_key specifies the private key PEM data for authentication via GitHub app.
- password String
- Password for authenticating at the repo server.
- ssh
Private StringKey - Contains the private key data for authenticating at the repo server using SSH (only Git repos).
- tls
Client StringCert Data - Specifies the TLS client cert data for authenticating at the repo server.
- tls
Client StringCert Key - Specifies the TLS client cert key for authenticating at the repo server.
- type String
- Type specifies the type of the repoCreds.Can be either 'git' or 'helm. 'git' is assumed if empty or absent
- url String
- url representing this object.
- username String
- Username for authenticating at the repo server.
Import
Import a Account level Gitops Repository Credentials
$ pulumi import harness:platform/gitOpsRepoCred:GitOpsRepoCred example <agent_id>/<repocred_id>
Import a Project level Gitops Repository Credentials
$ pulumi import harness:platform/gitOpsRepoCred:GitOpsRepoCred example <organization_id>/<project_id>/<agent_id>/<repocred_id>
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- harness lbrlabs/pulumi-harness
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
harness
Terraform Provider.