Workflow

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, feel free to 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 CurrentDateTime variable
# - retrieves a list of Wikipedia articles related to the day of the week
# from CurrentDateTime
# - returns the list of articles as an output of the workflow
# FYI, In terraform you need to escape the $$ or it will cause errors.
- getCurrentTime:
call: http.get
args:
url: https://us-central1-workflowsample.cloudfunctions.net/datetime
result: CurrentDateTime
- readWikipedia:
call: http.get
args:
url: https://en.wikipedia.org/w/api.php
query:
action: opensearch
search: %s
result: WikiResult
- returnOutput:
return: %s
", CurrentDateTime.body().dayOfTheWeek(),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 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
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}.

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>