UNPKG

@pulumi/harness

Version:

A Pulumi package for creating and managing Harness resources.

239 lines (238 loc) 7.04 kB
import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * Resource for creating a Harness Repo. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as harness from "@pulumi/harness"; * * const test = new harness.platform.Repo("test", { * identifier: "test_repo_123", * orgId: "test_org_123", * projectId: "test_project_123", * defaultBranch: "main", * description: "test_description_123", * sources: [{ * repo: "octocat/hello-worId", * type: "github", * }], * }); * ``` * * ## Import * * The `pulumi import` command can be used, for example: * * Import * * ```sh * $ pulumi import harness:platform/repo:Repo example <identifier> * ``` * * Import using the organization id * * ```sh * $ pulumi import harness:platform/repo:Repo example <org_id>/<identifier> * ``` * * Import using the organization id and the project id * * ```sh * $ pulumi import harness:platform/repo:Repo example <org_id>/<project_id>/<identifier> * ``` */ export declare class Repo extends pulumi.CustomResource { /** * Get an existing Repo resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input<pulumi.ID>, state?: RepoState, opts?: pulumi.CustomResourceOptions): Repo; /** * Returns true if the given object is an instance of Repo. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is Repo; /** * Timestamp when the repository was created. */ readonly created: pulumi.Output<number>; /** * ID of the user who created the repository. */ readonly createdBy: pulumi.Output<number>; /** * Default branch of the repository (Applicate only for create). */ readonly defaultBranch: pulumi.Output<string | undefined>; /** * Description of the repository. */ readonly description: pulumi.Output<string | undefined>; /** * Repository should be created with specified predefined gitignore file. */ readonly gitIgnore: pulumi.Output<string | undefined>; /** * Git URL of the repository. */ readonly gitUrl: pulumi.Output<string>; /** * Identifier of the repository. */ readonly identifier: pulumi.Output<string>; /** * Repository should be created with specified predefined license file. */ readonly license: pulumi.Output<string | undefined>; /** * Name of the repository. */ readonly name: pulumi.Output<string>; /** * Unique identifier of the organization. */ readonly orgId: pulumi.Output<string | undefined>; /** * Path of the repository. */ readonly path: pulumi.Output<string>; /** * Unique identifier of the project. */ readonly projectId: pulumi.Output<string | undefined>; /** * Repository should be created with readme file. */ readonly readme: pulumi.Output<boolean | undefined>; /** * Configuration for importing an existing repository from SCM provider. */ readonly sources: pulumi.Output<outputs.platform.RepoSource[] | undefined>; /** * Timestamp when the repository was last updated. */ readonly updated: pulumi.Output<number>; /** * Create a Repo resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: RepoArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering Repo resources. */ export interface RepoState { /** * Timestamp when the repository was created. */ created?: pulumi.Input<number>; /** * ID of the user who created the repository. */ createdBy?: pulumi.Input<number>; /** * Default branch of the repository (Applicate only for create). */ defaultBranch?: pulumi.Input<string>; /** * Description of the repository. */ description?: pulumi.Input<string>; /** * Repository should be created with specified predefined gitignore file. */ gitIgnore?: pulumi.Input<string>; /** * Git URL of the repository. */ gitUrl?: pulumi.Input<string>; /** * Identifier of the repository. */ identifier?: pulumi.Input<string>; /** * Repository should be created with specified predefined license file. */ license?: pulumi.Input<string>; /** * Name of the repository. */ name?: pulumi.Input<string>; /** * Unique identifier of the organization. */ orgId?: pulumi.Input<string>; /** * Path of the repository. */ path?: pulumi.Input<string>; /** * Unique identifier of the project. */ projectId?: pulumi.Input<string>; /** * Repository should be created with readme file. */ readme?: pulumi.Input<boolean>; /** * Configuration for importing an existing repository from SCM provider. */ sources?: pulumi.Input<pulumi.Input<inputs.platform.RepoSource>[]>; /** * Timestamp when the repository was last updated. */ updated?: pulumi.Input<number>; } /** * The set of arguments for constructing a Repo resource. */ export interface RepoArgs { /** * Default branch of the repository (Applicate only for create). */ defaultBranch?: pulumi.Input<string>; /** * Description of the repository. */ description?: pulumi.Input<string>; /** * Repository should be created with specified predefined gitignore file. */ gitIgnore?: pulumi.Input<string>; /** * Identifier of the repository. */ identifier: pulumi.Input<string>; /** * Repository should be created with specified predefined license file. */ license?: pulumi.Input<string>; /** * Unique identifier of the organization. */ orgId?: pulumi.Input<string>; /** * Unique identifier of the project. */ projectId?: pulumi.Input<string>; /** * Repository should be created with readme file. */ readme?: pulumi.Input<boolean>; /** * Configuration for importing an existing repository from SCM provider. */ sources?: pulumi.Input<pulumi.Input<inputs.platform.RepoSource>[]>; }