import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../../types/input"; import * as outputs from "../../types/output"; import * as enums from "../../types/enums"; /** * Creates a new `BuildTrigger`. */ export declare class Trigger extends pulumi.CustomResource { /** * Get an existing Trigger 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 opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input, opts?: pulumi.CustomResourceOptions): Trigger; /** * Returns true if the given object is an instance of Trigger. 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 Trigger; /** * Configuration for manual approval to start a build invocation of this BuildTrigger. */ readonly approvalConfig: pulumi.Output; /** * Autodetect build configuration. The following precedence is used (case insensitive): 1. cloudbuild.yaml 2. cloudbuild.yml 3. cloudbuild.json 4. Dockerfile Currently only available for GitHub App Triggers. */ readonly autodetect: pulumi.Output; /** * BitbucketServerTriggerConfig describes the configuration of a trigger that creates a build whenever a Bitbucket Server event is received. */ readonly bitbucketServerTriggerConfig: pulumi.Output; /** * Contents of the build template. */ readonly build: pulumi.Output; /** * Time when the trigger was created. */ readonly createTime: pulumi.Output; /** * Human-readable description of this trigger. */ readonly description: pulumi.Output; /** * If true, the trigger will never automatically execute a build. */ readonly disabled: pulumi.Output; /** * EventType allows the user to explicitly set the type of event to which this BuildTrigger should respond. This field will be validated against the rest of the configuration if it is set. */ readonly eventType: pulumi.Output; /** * Path, from the source root, to the build configuration file (i.e. cloudbuild.yaml). */ readonly filename: pulumi.Output; /** * A Common Expression Language string. */ readonly filter: pulumi.Output; /** * The file source describing the local or remote Build template. */ readonly gitFileSource: pulumi.Output; /** * GitHubEventsConfig describes the configuration of a trigger that creates a build whenever a GitHub event is received. Mutually exclusive with `trigger_template`. */ readonly github: pulumi.Output; /** * GitLabEnterpriseEventsConfig describes the configuration of a trigger that creates a build whenever a GitLab Enterprise event is received. */ readonly gitlabEnterpriseEventsConfig: pulumi.Output; /** * ignored_files and included_files are file glob matches using https://golang.org/pkg/path/filepath/#Match extended with support for "**". If ignored_files and changed files are both empty, then they are not used to determine whether or not to trigger a build. If ignored_files is not empty, then we ignore any files that match any of the ignored_file globs. If the change has no files that are outside of the ignored_files globs, then we do not trigger a build. */ readonly ignoredFiles: pulumi.Output; /** * If set to INCLUDE_BUILD_LOGS_WITH_STATUS, log url will be shown on GitHub page when build status is final. Setting this field to INCLUDE_BUILD_LOGS_WITH_STATUS for non GitHub triggers results in INVALID_ARGUMENT error. */ readonly includeBuildLogs: pulumi.Output; /** * If any of the files altered in the commit pass the ignored_files filter and included_files is empty, then as far as this filter is concerned, we should trigger the build. If any of the files altered in the commit pass the ignored_files filter and included_files is not empty, then we make sure that at least one of those files matches a included_files glob. If not, then we do not trigger a build. */ readonly includedFiles: pulumi.Output; readonly location: pulumi.Output; /** * User-assigned name of the trigger. Must be unique within the project. Trigger names must meet the following requirements: + They must contain only alphanumeric characters and dashes. + They can be 1-64 characters long. + They must begin and end with an alphanumeric character. */ readonly name: pulumi.Output; readonly project: pulumi.Output; /** * Required. ID of the project for which to configure automatic builds. */ readonly projectId: pulumi.Output; /** * PubsubConfig describes the configuration of a trigger that creates a build whenever a Pub/Sub message is published. */ readonly pubsubConfig: pulumi.Output; /** * The configuration of a trigger that creates a build whenever an event from Repo API is received. */ readonly repositoryEventConfig: pulumi.Output; /** * The `Trigger` name with format: `projects/{project}/locations/{location}/triggers/{trigger}`, where {trigger} is a unique identifier generated by the service. */ readonly resourceName: pulumi.Output; /** * The service account used for all user-controlled operations including UpdateBuildTrigger, RunBuildTrigger, CreateBuild, and CancelBuild. If no service account is set, then the standard Cloud Build service account ([PROJECT_NUM]@system.gserviceaccount.com) will be used instead. Format: `projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT_ID_OR_EMAIL}` */ readonly serviceAccount: pulumi.Output; /** * The repo and ref of the repository from which to build. This field is used only for those triggers that do not respond to SCM events. Triggers that respond to such events build source at whatever commit caused the event. This field is currently only used by Webhook, Pub/Sub, Manual, and Cron triggers. */ readonly sourceToBuild: pulumi.Output; /** * Substitutions for Build resource. The keys must match the following regular expression: `^_[A-Z0-9_]+$`. */ readonly substitutions: pulumi.Output<{ [key: string]: string; }>; /** * Tags for annotation of a `BuildTrigger` */ readonly tags: pulumi.Output; /** * Template describing the types of source changes to trigger a build. Branch and tag names in trigger templates are interpreted as regular expressions. Any branch or tag change that matches that regular expression will trigger a build. Mutually exclusive with `github`. */ readonly triggerTemplate: pulumi.Output; /** * WebhookConfig describes the configuration of a trigger that creates a build whenever a webhook is sent to a trigger's webhook URL. */ readonly webhookConfig: pulumi.Output; /** * Create a Trigger 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: TriggerArgs, opts?: pulumi.CustomResourceOptions); } /** * The set of arguments for constructing a Trigger resource. */ export interface TriggerArgs { /** * Configuration for manual approval to start a build invocation of this BuildTrigger. */ approvalConfig?: pulumi.Input; /** * Autodetect build configuration. The following precedence is used (case insensitive): 1. cloudbuild.yaml 2. cloudbuild.yml 3. cloudbuild.json 4. Dockerfile Currently only available for GitHub App Triggers. */ autodetect?: pulumi.Input; /** * BitbucketServerTriggerConfig describes the configuration of a trigger that creates a build whenever a Bitbucket Server event is received. */ bitbucketServerTriggerConfig?: pulumi.Input; /** * Contents of the build template. */ build?: pulumi.Input; /** * Human-readable description of this trigger. */ description?: pulumi.Input; /** * If true, the trigger will never automatically execute a build. */ disabled?: pulumi.Input; /** * EventType allows the user to explicitly set the type of event to which this BuildTrigger should respond. This field will be validated against the rest of the configuration if it is set. */ eventType?: pulumi.Input; /** * Path, from the source root, to the build configuration file (i.e. cloudbuild.yaml). */ filename?: pulumi.Input; /** * A Common Expression Language string. */ filter?: pulumi.Input; /** * The file source describing the local or remote Build template. */ gitFileSource?: pulumi.Input; /** * GitHubEventsConfig describes the configuration of a trigger that creates a build whenever a GitHub event is received. Mutually exclusive with `trigger_template`. */ github?: pulumi.Input; /** * GitLabEnterpriseEventsConfig describes the configuration of a trigger that creates a build whenever a GitLab Enterprise event is received. */ gitlabEnterpriseEventsConfig?: pulumi.Input; /** * ignored_files and included_files are file glob matches using https://golang.org/pkg/path/filepath/#Match extended with support for "**". If ignored_files and changed files are both empty, then they are not used to determine whether or not to trigger a build. If ignored_files is not empty, then we ignore any files that match any of the ignored_file globs. If the change has no files that are outside of the ignored_files globs, then we do not trigger a build. */ ignoredFiles?: pulumi.Input[]>; /** * If set to INCLUDE_BUILD_LOGS_WITH_STATUS, log url will be shown on GitHub page when build status is final. Setting this field to INCLUDE_BUILD_LOGS_WITH_STATUS for non GitHub triggers results in INVALID_ARGUMENT error. */ includeBuildLogs?: pulumi.Input; /** * If any of the files altered in the commit pass the ignored_files filter and included_files is empty, then as far as this filter is concerned, we should trigger the build. If any of the files altered in the commit pass the ignored_files filter and included_files is not empty, then we make sure that at least one of those files matches a included_files glob. If not, then we do not trigger a build. */ includedFiles?: pulumi.Input[]>; location?: pulumi.Input; /** * User-assigned name of the trigger. Must be unique within the project. Trigger names must meet the following requirements: + They must contain only alphanumeric characters and dashes. + They can be 1-64 characters long. + They must begin and end with an alphanumeric character. */ name?: pulumi.Input; project?: pulumi.Input; /** * Required. ID of the project for which to configure automatic builds. */ projectId: pulumi.Input; /** * PubsubConfig describes the configuration of a trigger that creates a build whenever a Pub/Sub message is published. */ pubsubConfig?: pulumi.Input; /** * The configuration of a trigger that creates a build whenever an event from Repo API is received. */ repositoryEventConfig?: pulumi.Input; /** * The `Trigger` name with format: `projects/{project}/locations/{location}/triggers/{trigger}`, where {trigger} is a unique identifier generated by the service. */ resourceName?: pulumi.Input; /** * The service account used for all user-controlled operations including UpdateBuildTrigger, RunBuildTrigger, CreateBuild, and CancelBuild. If no service account is set, then the standard Cloud Build service account ([PROJECT_NUM]@system.gserviceaccount.com) will be used instead. Format: `projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT_ID_OR_EMAIL}` */ serviceAccount?: pulumi.Input; /** * The repo and ref of the repository from which to build. This field is used only for those triggers that do not respond to SCM events. Triggers that respond to such events build source at whatever commit caused the event. This field is currently only used by Webhook, Pub/Sub, Manual, and Cron triggers. */ sourceToBuild?: pulumi.Input; /** * Substitutions for Build resource. The keys must match the following regular expression: `^_[A-Z0-9_]+$`. */ substitutions?: pulumi.Input<{ [key: string]: pulumi.Input; }>; /** * Tags for annotation of a `BuildTrigger` */ tags?: pulumi.Input[]>; /** * Template describing the types of source changes to trigger a build. Branch and tag names in trigger templates are interpreted as regular expressions. Any branch or tag change that matches that regular expression will trigger a build. Mutually exclusive with `github`. */ triggerTemplate?: pulumi.Input; /** * WebhookConfig describes the configuration of a trigger that creates a build whenever a webhook is sent to a trigger's webhook URL. */ webhookConfig?: pulumi.Input; }