UNPKG

@pulumi/harness

Version:

A Pulumi package for creating and managing Harness resources.

142 lines (141 loc) 4.74 kB
import * as pulumi from "@pulumi/pulumi"; /** * Resource for configuring application git sync. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as harness from "@pulumi/harness"; * * const _default = harness.getSecretManager({ * "default": true, * }); * const githubToken = new harness.EncryptedText("github_token", { * name: "github_token", * value: "<TOKEN>", * secretManagerId: _default.then(_default => _default.id), * }); * const myrepo = new harness.GitConnector("myrepo", { * name: "myrepo", * url: "https://github.com/someorg/myrepo", * branch: "main", * generateWebhookUrl: true, * username: "someuser", * passwordSecretId: githubToken.id, * urlType: "REPO", * }); * const example = new harness.Application("example", {name: "example-app"}); * const exampleApplicationGitSync = new harness.ApplicationGitSync("example", { * appId: example.id, * connectorId: myrepo.id, * branch: "main", * enabled: false, * }); * ``` * * ## Import * * The `pulumi import` command can be used, for example: * * Import using the Harness application id * * ```sh * $ pulumi import harness:index/applicationGitSync:ApplicationGitSync myapp Xyz123 * ``` */ export declare class ApplicationGitSync extends pulumi.CustomResource { /** * Get an existing ApplicationGitSync 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?: ApplicationGitSyncState, opts?: pulumi.CustomResourceOptions): ApplicationGitSync; /** * Returns true if the given object is an instance of ApplicationGitSync. 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 ApplicationGitSync; /** * The id of the application. */ readonly appId: pulumi.Output<string>; /** * The branch of the git repository to sync to. */ readonly branch: pulumi.Output<string>; /** * The id of the git connector to use. */ readonly connectorId: pulumi.Output<string>; /** * Whether or not to enable git sync. */ readonly enabled: pulumi.Output<boolean | undefined>; /** * The name of the git repository to sync to. This is only used if the git connector is for an account and not an individual repository. */ readonly repositoryName: pulumi.Output<string | undefined>; /** * Create a ApplicationGitSync 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: ApplicationGitSyncArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering ApplicationGitSync resources. */ export interface ApplicationGitSyncState { /** * The id of the application. */ appId?: pulumi.Input<string>; /** * The branch of the git repository to sync to. */ branch?: pulumi.Input<string>; /** * The id of the git connector to use. */ connectorId?: pulumi.Input<string>; /** * Whether or not to enable git sync. */ enabled?: pulumi.Input<boolean>; /** * The name of the git repository to sync to. This is only used if the git connector is for an account and not an individual repository. */ repositoryName?: pulumi.Input<string>; } /** * The set of arguments for constructing a ApplicationGitSync resource. */ export interface ApplicationGitSyncArgs { /** * The id of the application. */ appId: pulumi.Input<string>; /** * The branch of the git repository to sync to. */ branch: pulumi.Input<string>; /** * The id of the git connector to use. */ connectorId: pulumi.Input<string>; /** * Whether or not to enable git sync. */ enabled?: pulumi.Input<boolean>; /** * The name of the git repository to sync to. This is only used if the git connector is for an account and not an individual repository. */ repositoryName?: pulumi.Input<string>; }