@pulumi/gcp
Version:
A Pulumi package for creating and managing Google Cloud Platform resources.
331 lines (330 loc) • 15.4 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import * as inputs from "../types/input";
import * as outputs from "../types/output";
/**
* A Workflow Template is a reusable workflow configuration. It defines a graph of jobs with information on where to run those jobs.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
*
* const template = new gcp.dataproc.WorkflowTemplate("template", {
* name: "template-example",
* location: "us-central1",
* placement: {
* managedCluster: {
* clusterName: "my-cluster",
* config: {
* gceClusterConfig: {
* zone: "us-central1-a",
* tags: [
* "foo",
* "bar",
* ],
* },
* masterConfig: {
* numInstances: 1,
* machineType: "n1-standard-1",
* diskConfig: {
* bootDiskType: "pd-ssd",
* bootDiskSizeGb: 15,
* },
* },
* workerConfig: {
* numInstances: 3,
* machineType: "n1-standard-2",
* diskConfig: {
* bootDiskSizeGb: 10,
* numLocalSsds: 2,
* },
* },
* secondaryWorkerConfig: {
* numInstances: 2,
* },
* softwareConfig: {
* imageVersion: "2.0.35-debian10",
* },
* },
* },
* },
* jobs: [
* {
* stepId: "someJob",
* sparkJob: {
* mainClass: "SomeClass",
* },
* },
* {
* stepId: "otherJob",
* prerequisiteStepIds: ["someJob"],
* prestoJob: {
* queryFileUri: "someuri",
* },
* },
* ],
* });
* ```
*
* ## Import
*
* WorkflowTemplate can be imported using any of these accepted formats:
*
* * `projects/{{project}}/locations/{{location}}/workflowTemplates/{{name}}`
*
* * `{{project}}/{{location}}/{{name}}`
*
* * `{{location}}/{{name}}`
*
* When using the `pulumi import` command, WorkflowTemplate can be imported using one of the formats above. For example:
*
* ```sh
* $ pulumi import gcp:dataproc/workflowTemplate:WorkflowTemplate default projects/{{project}}/locations/{{location}}/workflowTemplates/{{name}}
* ```
*
* ```sh
* $ pulumi import gcp:dataproc/workflowTemplate:WorkflowTemplate default {{project}}/{{location}}/{{name}}
* ```
*
* ```sh
* $ pulumi import gcp:dataproc/workflowTemplate:WorkflowTemplate default {{location}}/{{name}}
* ```
*/
export declare class WorkflowTemplate extends pulumi.CustomResource {
/**
* Get an existing WorkflowTemplate 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?: WorkflowTemplateState, opts?: pulumi.CustomResourceOptions): WorkflowTemplate;
/**
* Returns true if the given object is an instance of WorkflowTemplate. 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 WorkflowTemplate;
/**
* Output only. The time template was created.
*/
readonly createTime: pulumi.Output<string>;
/**
* Optional. Timeout duration for the DAG of jobs, expressed in seconds (see [JSON representation of
* duration](https://developers.google.com/protocol-buffers/docs/proto3#json)). The timeout duration must be from 10
* minutes ("600s") to 24 hours ("86400s"). The timer begins when the first job is submitted. If the workflow is running at
* the end of the timeout period, any remaining jobs are cancelled, the workflow is ended, and if the workflow was running
* on a [managed
* cluster](https://www.terraform.io/dataproc/docs/concepts/workflows/using-workflows#configuring_or_selecting_a_cluster),
* the cluster is deleted.
*/
readonly dagTimeout: pulumi.Output<string | undefined>;
readonly effectiveLabels: pulumi.Output<{
[key: string]: string;
}>;
/**
* Optional. The encryption configuration for the workflow template.
*/
readonly encryptionConfig: pulumi.Output<outputs.dataproc.WorkflowTemplateEncryptionConfig | undefined>;
/**
* Required. The Directed Acyclic Graph of Jobs to submit.
*/
readonly jobs: pulumi.Output<outputs.dataproc.WorkflowTemplateJob[]>;
/**
* Optional. The labels to associate with this template. These labels will be propagated to all jobs and clusters created
* by the workflow instance. Label **keys** must contain 1 to 63 characters, and must conform to [RFC
* 1035](https://www.ietf.org/rfc/rfc1035.txt). Label **values** may be empty, but, if present, must contain 1 to 63
* characters, and must conform to [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be
* associated with a template. **Note**: This field is non-authoritative, and will only manage the labels present in your
* configuration. Please refer to the field `effectiveLabels` for all of the labels present on the resource.
*/
readonly labels: pulumi.Output<{
[key: string]: string;
} | undefined>;
/**
* The location for the resource
*/
readonly location: pulumi.Output<string>;
/**
* Output only. The resource name of the workflow template, as described in https://cloud.google.com/apis/design/resource_names. * For `projects.regions.workflowTemplates`, the resource name of the template has the following format: `projects/{project_id}/regions/{region}/workflowTemplates/{template_id}` * For `projects.locations.workflowTemplates`, the resource name of the template has the following format: `projects/{project_id}/locations/{location}/workflowTemplates/{template_id}`
*/
readonly name: pulumi.Output<string>;
/**
* Optional. Template parameters whose values are substituted into the template. Values for parameters must be provided
* when the template is instantiated.
*/
readonly parameters: pulumi.Output<outputs.dataproc.WorkflowTemplateParameter[] | undefined>;
/**
* Required. WorkflowTemplate scheduling information.
*/
readonly placement: pulumi.Output<outputs.dataproc.WorkflowTemplatePlacement>;
/**
* The project for the resource
*/
readonly project: pulumi.Output<string>;
/**
* The combination of labels configured directly on the resource and default labels configured on the provider.
*/
readonly pulumiLabels: pulumi.Output<{
[key: string]: string;
}>;
/**
* Output only. The time template was last updated.
*/
readonly updateTime: pulumi.Output<string>;
/**
* Output only. The current version of this workflow template.
*
* @deprecated version is not useful as a configurable field, and will be removed in the future.
*/
readonly version: pulumi.Output<number>;
/**
* Create a WorkflowTemplate 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: WorkflowTemplateArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering WorkflowTemplate resources.
*/
export interface WorkflowTemplateState {
/**
* Output only. The time template was created.
*/
createTime?: pulumi.Input<string>;
/**
* Optional. Timeout duration for the DAG of jobs, expressed in seconds (see [JSON representation of
* duration](https://developers.google.com/protocol-buffers/docs/proto3#json)). The timeout duration must be from 10
* minutes ("600s") to 24 hours ("86400s"). The timer begins when the first job is submitted. If the workflow is running at
* the end of the timeout period, any remaining jobs are cancelled, the workflow is ended, and if the workflow was running
* on a [managed
* cluster](https://www.terraform.io/dataproc/docs/concepts/workflows/using-workflows#configuring_or_selecting_a_cluster),
* the cluster is deleted.
*/
dagTimeout?: pulumi.Input<string>;
effectiveLabels?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
/**
* Optional. The encryption configuration for the workflow template.
*/
encryptionConfig?: pulumi.Input<inputs.dataproc.WorkflowTemplateEncryptionConfig>;
/**
* Required. The Directed Acyclic Graph of Jobs to submit.
*/
jobs?: pulumi.Input<pulumi.Input<inputs.dataproc.WorkflowTemplateJob>[]>;
/**
* Optional. The labels to associate with this template. These labels will be propagated to all jobs and clusters created
* by the workflow instance. Label **keys** must contain 1 to 63 characters, and must conform to [RFC
* 1035](https://www.ietf.org/rfc/rfc1035.txt). Label **values** may be empty, but, if present, must contain 1 to 63
* characters, and must conform to [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be
* associated with a template. **Note**: This field is non-authoritative, and will only manage the labels present in your
* configuration. Please refer to the field `effectiveLabels` for all of the labels present on the resource.
*/
labels?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
/**
* The location for the resource
*/
location?: pulumi.Input<string>;
/**
* Output only. The resource name of the workflow template, as described in https://cloud.google.com/apis/design/resource_names. * For `projects.regions.workflowTemplates`, the resource name of the template has the following format: `projects/{project_id}/regions/{region}/workflowTemplates/{template_id}` * For `projects.locations.workflowTemplates`, the resource name of the template has the following format: `projects/{project_id}/locations/{location}/workflowTemplates/{template_id}`
*/
name?: pulumi.Input<string>;
/**
* Optional. Template parameters whose values are substituted into the template. Values for parameters must be provided
* when the template is instantiated.
*/
parameters?: pulumi.Input<pulumi.Input<inputs.dataproc.WorkflowTemplateParameter>[]>;
/**
* Required. WorkflowTemplate scheduling information.
*/
placement?: pulumi.Input<inputs.dataproc.WorkflowTemplatePlacement>;
/**
* The project for the resource
*/
project?: pulumi.Input<string>;
/**
* The combination of labels configured directly on the resource and default labels configured on the provider.
*/
pulumiLabels?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
/**
* Output only. The time template was last updated.
*/
updateTime?: pulumi.Input<string>;
/**
* Output only. The current version of this workflow template.
*
* @deprecated version is not useful as a configurable field, and will be removed in the future.
*/
version?: pulumi.Input<number>;
}
/**
* The set of arguments for constructing a WorkflowTemplate resource.
*/
export interface WorkflowTemplateArgs {
/**
* Optional. Timeout duration for the DAG of jobs, expressed in seconds (see [JSON representation of
* duration](https://developers.google.com/protocol-buffers/docs/proto3#json)). The timeout duration must be from 10
* minutes ("600s") to 24 hours ("86400s"). The timer begins when the first job is submitted. If the workflow is running at
* the end of the timeout period, any remaining jobs are cancelled, the workflow is ended, and if the workflow was running
* on a [managed
* cluster](https://www.terraform.io/dataproc/docs/concepts/workflows/using-workflows#configuring_or_selecting_a_cluster),
* the cluster is deleted.
*/
dagTimeout?: pulumi.Input<string>;
/**
* Optional. The encryption configuration for the workflow template.
*/
encryptionConfig?: pulumi.Input<inputs.dataproc.WorkflowTemplateEncryptionConfig>;
/**
* Required. The Directed Acyclic Graph of Jobs to submit.
*/
jobs: pulumi.Input<pulumi.Input<inputs.dataproc.WorkflowTemplateJob>[]>;
/**
* Optional. The labels to associate with this template. These labels will be propagated to all jobs and clusters created
* by the workflow instance. Label **keys** must contain 1 to 63 characters, and must conform to [RFC
* 1035](https://www.ietf.org/rfc/rfc1035.txt). Label **values** may be empty, but, if present, must contain 1 to 63
* characters, and must conform to [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be
* associated with a template. **Note**: This field is non-authoritative, and will only manage the labels present in your
* configuration. Please refer to the field `effectiveLabels` for all of the labels present on the resource.
*/
labels?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
/**
* The location for the resource
*/
location: pulumi.Input<string>;
/**
* Output only. The resource name of the workflow template, as described in https://cloud.google.com/apis/design/resource_names. * For `projects.regions.workflowTemplates`, the resource name of the template has the following format: `projects/{project_id}/regions/{region}/workflowTemplates/{template_id}` * For `projects.locations.workflowTemplates`, the resource name of the template has the following format: `projects/{project_id}/locations/{location}/workflowTemplates/{template_id}`
*/
name?: pulumi.Input<string>;
/**
* Optional. Template parameters whose values are substituted into the template. Values for parameters must be provided
* when the template is instantiated.
*/
parameters?: pulumi.Input<pulumi.Input<inputs.dataproc.WorkflowTemplateParameter>[]>;
/**
* Required. WorkflowTemplate scheduling information.
*/
placement: pulumi.Input<inputs.dataproc.WorkflowTemplatePlacement>;
/**
* The project for the resource
*/
project?: pulumi.Input<string>;
/**
* Output only. The current version of this workflow template.
*
* @deprecated version is not useful as a configurable field, and will be removed in the future.
*/
version?: pulumi.Input<number>;
}