UNPKG

@spacelift-io/pulumi-spacelift

Version:

A Pulumi package for creating and managing Spacelift resources.

128 lines (127 loc) 4.94 kB
import * as pulumi from "@pulumi/pulumi"; /** * `spacelift.DriftDetection` represents a Drift Detection configuration for a Stack. It will trigger a proposed run on the given schedule, which you can listen for using run state webhooks. If reconcile is true, then a tracked run will be triggered when drift is detected. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as spacelift from "@spacelift-io/pulumi-spacelift"; * * const core_infra_production = new spacelift.Stack("core-infra-production", { * branch: "master", * repository: "core-infra", * }); * const core_infra_production_drift_detection = new spacelift.DriftDetection("core-infra-production-drift-detection", { * reconcile: true, * stackId: core_infra_production.id, * schedules: ["*&#47;15 * * * *"], * }); * // Every 15 minutes * ``` * * ## Import * * ```sh * $ pulumi import spacelift:index/driftDetection:DriftDetection core-infra-production-drift-detection stack/$STACK_ID * ``` * * ```sh * $ pulumi import spacelift:index/driftDetection:DriftDetection core-infra-production-drift-detection module/$MODULE_ID * ``` */ export declare class DriftDetection extends pulumi.CustomResource { /** * Get an existing DriftDetection 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?: DriftDetectionState, opts?: pulumi.CustomResourceOptions): DriftDetection; /** * Returns true if the given object is an instance of DriftDetection. 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 DriftDetection; /** * Controls whether drift detection should be performed on a stack in any final state instead of just 'Finished'. */ readonly ignoreState: pulumi.Output<boolean | undefined>; /** * Whether a tracked run should be triggered when drift is detected. */ readonly reconcile: pulumi.Output<boolean | undefined>; /** * List of cron schedule expressions based on which drift detection should be triggered. */ readonly schedules: pulumi.Output<string[]>; /** * ID of the stack for which to set up drift detection */ readonly stackId: pulumi.Output<string>; /** * Timezone in which the schedule is expressed. Defaults to `UTC`. */ readonly timezone: pulumi.Output<string | undefined>; /** * Create a DriftDetection 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: DriftDetectionArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering DriftDetection resources. */ export interface DriftDetectionState { /** * Controls whether drift detection should be performed on a stack in any final state instead of just 'Finished'. */ ignoreState?: pulumi.Input<boolean>; /** * Whether a tracked run should be triggered when drift is detected. */ reconcile?: pulumi.Input<boolean>; /** * List of cron schedule expressions based on which drift detection should be triggered. */ schedules?: pulumi.Input<pulumi.Input<string>[]>; /** * ID of the stack for which to set up drift detection */ stackId?: pulumi.Input<string>; /** * Timezone in which the schedule is expressed. Defaults to `UTC`. */ timezone?: pulumi.Input<string>; } /** * The set of arguments for constructing a DriftDetection resource. */ export interface DriftDetectionArgs { /** * Controls whether drift detection should be performed on a stack in any final state instead of just 'Finished'. */ ignoreState?: pulumi.Input<boolean>; /** * Whether a tracked run should be triggered when drift is detected. */ reconcile?: pulumi.Input<boolean>; /** * List of cron schedule expressions based on which drift detection should be triggered. */ schedules: pulumi.Input<pulumi.Input<string>[]>; /** * ID of the stack for which to set up drift detection */ stackId: pulumi.Input<string>; /** * Timezone in which the schedule is expressed. Defaults to `UTC`. */ timezone?: pulumi.Input<string>; }