import * as pulumi from "@pulumi/pulumi"; /** * This resource allows you to create and manage environment deployment branch policies for a GitHub repository. * * ## Example Usage * * Create a branch-based deployment policy: * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as github from "@pulumi/github"; * * const current = github.getUser({ * username: "", * }); * const test = new github.Repository("test", {name: "tf-acc-test-%s"}); * const testRepositoryEnvironment = new github.RepositoryEnvironment("test", { * repository: test.name, * environment: "environment/test", * waitTimer: 10000, * reviewers: [{ * users: [output(current.then(current => current.id)).apply(x =>Number(x))], * }], * deploymentBranchPolicy: { * protectedBranches: false, * customBranchPolicies: true, * }, * }); * const testRepositoryEnvironmentDeploymentPolicy = new github.RepositoryEnvironmentDeploymentPolicy("test", { * repository: test.name, * environment: testRepositoryEnvironment.environment, * branchPattern: "releases/*", * }); * ``` * * Create a tag-based deployment policy: * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as github from "@pulumi/github"; * * const current = github.getUser({ * username: "", * }); * const test = new github.Repository("test", {name: "tf-acc-test-%s"}); * const testRepositoryEnvironment = new github.RepositoryEnvironment("test", { * repository: test.name, * environment: "environment/test", * waitTimer: 10000, * reviewers: [{ * users: [output(current.then(current => current.id)).apply(x =>Number(x))], * }], * deploymentBranchPolicy: { * protectedBranches: false, * customBranchPolicies: true, * }, * }); * const testRepositoryEnvironmentDeploymentPolicy = new github.RepositoryEnvironmentDeploymentPolicy("test", { * repository: test.name, * environment: testRepositoryEnvironment.environment, * tagPattern: "v*", * }); * ``` * * ## Import * * This resource can be imported using an ID made of the repository name, environment name (any `:` in the environment name need to be escaped as `??`), and deployment policy ID name all separated by a `:`. * * ### Import Command * * The following command imports a deployment policy with the ID `123456` for the repo `myrepo` and environment `myenv` to a `github.RepositoryEnvironmentDeploymentPolicy` resource named `example`. * * ```sh * $ pulumi import github:index/repositoryEnvironmentDeploymentPolicy:RepositoryEnvironmentDeploymentPolicy example myrepo:myenv:123456 * ``` */ export declare class RepositoryEnvironmentDeploymentPolicy extends pulumi.CustomResource { /** * Get an existing RepositoryEnvironmentDeploymentPolicy 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, state?: RepositoryEnvironmentDeploymentPolicyState, opts?: pulumi.CustomResourceOptions): RepositoryEnvironmentDeploymentPolicy; /** * Returns true if the given object is an instance of RepositoryEnvironmentDeploymentPolicy. 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 RepositoryEnvironmentDeploymentPolicy; /** * The name pattern that branches must match in order to deploy to the environment. If not specified, `tagPattern` must be specified. */ readonly branchPattern: pulumi.Output; /** * The name of the environment. */ readonly environment: pulumi.Output; /** * The ID of the deployment policy. */ readonly policyId: pulumi.Output; /** * The repository of the environment. */ readonly repository: pulumi.Output; /** * The ID of the repository. */ readonly repositoryId: pulumi.Output; /** * The name pattern that tags must match in order to deploy to the environment. If not specified, `branchPattern` must be specified. */ readonly tagPattern: pulumi.Output; /** * Create a RepositoryEnvironmentDeploymentPolicy 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: RepositoryEnvironmentDeploymentPolicyArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering RepositoryEnvironmentDeploymentPolicy resources. */ export interface RepositoryEnvironmentDeploymentPolicyState { /** * The name pattern that branches must match in order to deploy to the environment. If not specified, `tagPattern` must be specified. */ branchPattern?: pulumi.Input; /** * The name of the environment. */ environment?: pulumi.Input; /** * The ID of the deployment policy. */ policyId?: pulumi.Input; /** * The repository of the environment. */ repository?: pulumi.Input; /** * The ID of the repository. */ repositoryId?: pulumi.Input; /** * The name pattern that tags must match in order to deploy to the environment. If not specified, `branchPattern` must be specified. */ tagPattern?: pulumi.Input; } /** * The set of arguments for constructing a RepositoryEnvironmentDeploymentPolicy resource. */ export interface RepositoryEnvironmentDeploymentPolicyArgs { /** * The name pattern that branches must match in order to deploy to the environment. If not specified, `tagPattern` must be specified. */ branchPattern?: pulumi.Input; /** * The name of the environment. */ environment: pulumi.Input; /** * The repository of the environment. */ repository: pulumi.Input; /** * The name pattern that tags must match in order to deploy to the environment. If not specified, `branchPattern` must be specified. */ tagPattern?: pulumi.Input; } //# sourceMappingURL=repositoryEnvironmentDeploymentPolicy.d.ts.map