Workflow

class Workflow : KotlinCustomResource

Workflow program to be executed by Workflows. To get more information about Workflow, see:

Example Usage

Workflow Basic

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.serviceAccount.Account;
import com.pulumi.gcp.serviceAccount.AccountArgs;
import com.pulumi.gcp.workflows.Workflow;
import com.pulumi.gcp.workflows.WorkflowArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var testAccount = new Account("testAccount", AccountArgs.builder()
.accountId("my-account")
.displayName("Test Service Account")
.build());
var example = new Workflow("example", WorkflowArgs.builder()
.region("us-central1")
.description("Magic")
.serviceAccount(testAccount.id())
.sourceContents("""
# This is a sample workflow. You can replace it with your source code.
# This workflow does the following:
# - reads current time and date information from an external API and stores
# the response in currentTime variable
# - retrieves a list of Wikipedia articles related to the day of the week
# from currentTime
# - returns the list of articles as an output of the workflow
# Note: In Terraform you need to escape the $$ or it will cause errors.
- getCurrentTime:
call: http.get
args:
url: https://timeapi.io/api/Time/current/zone?timeZone=Europe/Amsterdam
result: currentTime
- readWikipedia:
call: http.get
args:
url: https://en.wikipedia.org/w/api.php
query:
action: opensearch
search: %s
result: wikiResult
- returnOutput:
return: %s
", currentTime.body().dayOfWeek(),wikiResult.body()[1]))
.build());
}
}

Import

This resource does not support import.

Properties

Link copied to clipboard
val createTime: Output<String>

The timestamp of when the workflow was created in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits.

Link copied to clipboard
val cryptoKeyName: Output<String>?

The KMS key used to encrypt workflow and execution data. Format: projects/{project}/locations/{location}/keyRings/{keyRing}/cryptoKeys/{cryptoKey}

Link copied to clipboard
val description: Output<String>

Description of the workflow provided by the user. Must be at most 1000 unicode characters long.

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val labels: Output<Map<String, String>>?

A set of key/value label pairs to assign to this Workflow.

Link copied to clipboard
val name: Output<String>

Name of the Workflow.

Link copied to clipboard
val namePrefix: Output<String>

Creates a unique name beginning with the specified prefix. If this and name are unspecified, a random value is chosen for the name.

Link copied to clipboard
val project: Output<String>

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val region: Output<String>?

The region of the workflow.

Link copied to clipboard
val revisionId: Output<String>

The revision of the workflow. A new one is generated if the service account or source contents is changed.

Link copied to clipboard
val serviceAccount: Output<String>

Name of the service account associated with the latest workflow version. This service account represents the identity of the workflow and determines what permissions the workflow has. Format: projects/{project}/serviceAccounts/{account} or {account}. Using - as a wildcard for the {project} or not providing one at all will infer the project from the account. The {account} value can be the email address or the unique_id of the service account. If not provided, workflow will use the project's default service account. Modifying this field for an existing workflow results in a new workflow revision.

Link copied to clipboard
val sourceContents: Output<String>?

Workflow code to be executed. The size limit is 32KB.

Link copied to clipboard
val state: Output<String>

State of the workflow deployment.

Link copied to clipboard
val updateTime: Output<String>

The timestamp of when the workflow was last updated in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits.

Link copied to clipboard
val urn: Output<String>