gcp.workflows.Workflow
Explore with Pulumi AI
Workflow program to be executed by Workflows.
To get more information about Workflow, see:
- API documentation
- How-to Guides
Example Usage
Workflow Basic
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const testAccount = new gcp.serviceaccount.Account("test_account", {
accountId: "my-account",
displayName: "Test Service Account",
});
const example = new gcp.workflows.Workflow("example", {
name: "workflow",
region: "us-central1",
description: "Magic",
serviceAccount: testAccount.id,
callLogLevel: "LOG_ERRORS_ONLY",
labels: {
env: "test",
},
userEnvVars: {
url: "https://timeapi.io/api/Time/current/zone?timeZone=Europe/Amsterdam",
},
deletionProtection: false,
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: \${sys.get_env("url")}
result: currentTime
- readWikipedia:
call: http.get
args:
url: https://en.wikipedia.org/w/api.php
query:
action: opensearch
search: \${currentTime.body.dayOfWeek}
result: wikiResult
- returnOutput:
return: \${wikiResult.body[1]}
`,
});
import pulumi
import pulumi_gcp as gcp
test_account = gcp.serviceaccount.Account("test_account",
account_id="my-account",
display_name="Test Service Account")
example = gcp.workflows.Workflow("example",
name="workflow",
region="us-central1",
description="Magic",
service_account=test_account.id,
call_log_level="LOG_ERRORS_ONLY",
labels={
"env": "test",
},
user_env_vars={
"url": "https://timeapi.io/api/Time/current/zone?timeZone=Europe/Amsterdam",
},
deletion_protection=False,
source_contents="""# 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: ${sys.get_env("url")}
result: currentTime
- readWikipedia:
call: http.get
args:
url: https://en.wikipedia.org/w/api.php
query:
action: opensearch
search: ${currentTime.body.dayOfWeek}
result: wikiResult
- returnOutput:
return: ${wikiResult.body[1]}
""")
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/serviceaccount"
"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/workflows"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
testAccount, err := serviceaccount.NewAccount(ctx, "test_account", &serviceaccount.AccountArgs{
AccountId: pulumi.String("my-account"),
DisplayName: pulumi.String("Test Service Account"),
})
if err != nil {
return err
}
_, err = workflows.NewWorkflow(ctx, "example", &workflows.WorkflowArgs{
Name: pulumi.String("workflow"),
Region: pulumi.String("us-central1"),
Description: pulumi.String("Magic"),
ServiceAccount: testAccount.ID(),
CallLogLevel: pulumi.String("LOG_ERRORS_ONLY"),
Labels: pulumi.StringMap{
"env": pulumi.String("test"),
},
UserEnvVars: pulumi.StringMap{
"url": pulumi.String("https://timeapi.io/api/Time/current/zone?timeZone=Europe/Amsterdam"),
},
DeletionProtection: pulumi.Bool(false),
SourceContents: pulumi.String(`# 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: ${sys.get_env("url")}
result: currentTime
- readWikipedia:
call: http.get
args:
url: https://en.wikipedia.org/w/api.php
query:
action: opensearch
search: ${currentTime.body.dayOfWeek}
result: wikiResult
- returnOutput:
return: ${wikiResult.body[1]}
`),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var testAccount = new Gcp.ServiceAccount.Account("test_account", new()
{
AccountId = "my-account",
DisplayName = "Test Service Account",
});
var example = new Gcp.Workflows.Workflow("example", new()
{
Name = "workflow",
Region = "us-central1",
Description = "Magic",
ServiceAccount = testAccount.Id,
CallLogLevel = "LOG_ERRORS_ONLY",
Labels =
{
{ "env", "test" },
},
UserEnvVars =
{
{ "url", "https://timeapi.io/api/Time/current/zone?timeZone=Europe/Amsterdam" },
},
DeletionProtection = false,
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: ${sys.get_env(""url"")}
result: currentTime
- readWikipedia:
call: http.get
args:
url: https://en.wikipedia.org/w/api.php
query:
action: opensearch
search: ${currentTime.body.dayOfWeek}
result: wikiResult
- returnOutput:
return: ${wikiResult.body[1]}
",
});
});
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()
.name("workflow")
.region("us-central1")
.description("Magic")
.serviceAccount(testAccount.id())
.callLogLevel("LOG_ERRORS_ONLY")
.labels(Map.of("env", "test"))
.userEnvVars(Map.of("url", "https://timeapi.io/api/Time/current/zone?timeZone=Europe/Amsterdam"))
.deletionProtection(false)
.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: ${sys.get_env("url")}
result: currentTime
- readWikipedia:
call: http.get
args:
url: https://en.wikipedia.org/w/api.php
query:
action: opensearch
search: ${currentTime.body.dayOfWeek}
result: wikiResult
- returnOutput:
return: ${wikiResult.body[1]}
""")
.build());
}
}
resources:
testAccount:
type: gcp:serviceaccount:Account
name: test_account
properties:
accountId: my-account
displayName: Test Service Account
example:
type: gcp:workflows:Workflow
properties:
name: workflow
region: us-central1
description: Magic
serviceAccount: ${testAccount.id}
callLogLevel: LOG_ERRORS_ONLY
labels:
env: test
userEnvVars:
url: https://timeapi.io/api/Time/current/zone?timeZone=Europe/Amsterdam
deletionProtection: false
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: ${sys.get_env("url")}
result: currentTime
- readWikipedia:
call: http.get
args:
url: https://en.wikipedia.org/w/api.php
query:
action: opensearch
search: ${currentTime.body.dayOfWeek}
result: wikiResult
- returnOutput:
return: ${wikiResult.body[1]}
Create Workflow Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Workflow(name: string, args?: WorkflowArgs, opts?: CustomResourceOptions);
@overload
def Workflow(resource_name: str,
args: Optional[WorkflowArgs] = None,
opts: Optional[ResourceOptions] = None)
@overload
def Workflow(resource_name: str,
opts: Optional[ResourceOptions] = None,
call_log_level: Optional[str] = None,
crypto_key_name: Optional[str] = None,
deletion_protection: Optional[bool] = None,
description: Optional[str] = None,
labels: Optional[Mapping[str, str]] = None,
name: Optional[str] = None,
name_prefix: Optional[str] = None,
project: Optional[str] = None,
region: Optional[str] = None,
service_account: Optional[str] = None,
source_contents: Optional[str] = None,
user_env_vars: Optional[Mapping[str, str]] = None)
func NewWorkflow(ctx *Context, name string, args *WorkflowArgs, opts ...ResourceOption) (*Workflow, error)
public Workflow(string name, WorkflowArgs? args = null, CustomResourceOptions? opts = null)
public Workflow(String name, WorkflowArgs args)
public Workflow(String name, WorkflowArgs args, CustomResourceOptions options)
type: gcp:workflows:Workflow
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args WorkflowArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args WorkflowArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args WorkflowArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args WorkflowArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args WorkflowArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var workflowResource = new Gcp.Workflows.Workflow("workflowResource", new()
{
CallLogLevel = "string",
CryptoKeyName = "string",
DeletionProtection = false,
Description = "string",
Labels =
{
{ "string", "string" },
},
Name = "string",
NamePrefix = "string",
Project = "string",
Region = "string",
ServiceAccount = "string",
SourceContents = "string",
UserEnvVars =
{
{ "string", "string" },
},
});
example, err := workflows.NewWorkflow(ctx, "workflowResource", &workflows.WorkflowArgs{
CallLogLevel: pulumi.String("string"),
CryptoKeyName: pulumi.String("string"),
DeletionProtection: pulumi.Bool(false),
Description: pulumi.String("string"),
Labels: pulumi.StringMap{
"string": pulumi.String("string"),
},
Name: pulumi.String("string"),
NamePrefix: pulumi.String("string"),
Project: pulumi.String("string"),
Region: pulumi.String("string"),
ServiceAccount: pulumi.String("string"),
SourceContents: pulumi.String("string"),
UserEnvVars: pulumi.StringMap{
"string": pulumi.String("string"),
},
})
var workflowResource = new Workflow("workflowResource", WorkflowArgs.builder()
.callLogLevel("string")
.cryptoKeyName("string")
.deletionProtection(false)
.description("string")
.labels(Map.of("string", "string"))
.name("string")
.namePrefix("string")
.project("string")
.region("string")
.serviceAccount("string")
.sourceContents("string")
.userEnvVars(Map.of("string", "string"))
.build());
workflow_resource = gcp.workflows.Workflow("workflowResource",
call_log_level="string",
crypto_key_name="string",
deletion_protection=False,
description="string",
labels={
"string": "string",
},
name="string",
name_prefix="string",
project="string",
region="string",
service_account="string",
source_contents="string",
user_env_vars={
"string": "string",
})
const workflowResource = new gcp.workflows.Workflow("workflowResource", {
callLogLevel: "string",
cryptoKeyName: "string",
deletionProtection: false,
description: "string",
labels: {
string: "string",
},
name: "string",
namePrefix: "string",
project: "string",
region: "string",
serviceAccount: "string",
sourceContents: "string",
userEnvVars: {
string: "string",
},
});
type: gcp:workflows:Workflow
properties:
callLogLevel: string
cryptoKeyName: string
deletionProtection: false
description: string
labels:
string: string
name: string
namePrefix: string
project: string
region: string
serviceAccount: string
sourceContents: string
userEnvVars:
string: string
Workflow Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The Workflow resource accepts the following input properties:
- Call
Log stringLevel - Describes the level of platform logging to apply to calls and call responses during
executions of this workflow. If both the workflow and the execution specify a logging level,
the execution level takes precedence.
Possible values are:
CALL_LOG_LEVEL_UNSPECIFIED
,LOG_ALL_CALLS
,LOG_ERRORS_ONLY
,LOG_NONE
. - Crypto
Key stringName - The KMS key used to encrypt workflow and execution data. Format: projects/{project}/locations/{location}/keyRings/{keyRing}/cryptoKeys/{cryptoKey}
- Deletion
Protection bool - Description string
- Description of the workflow provided by the user. Must be at most 1000 unicode characters long.
- Labels Dictionary<string, string>
A set of key/value label pairs to assign to this Workflow.
Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field
effective_labels
for all of the labels present on the resource.- Name string
- Name of the Workflow.
- Name
Prefix string - Creates a unique name beginning with the specified prefix. If this and name are unspecified, a random value is chosen for the name.
- Project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- Region string
- The region of the workflow.
- Service
Account 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.
- Source
Contents string - Workflow code to be executed. The size limit is 128KB.
- User
Env Dictionary<string, string>Vars - User-defined environment variables associated with this workflow revision. This map has a maximum length of 20. Each string can take up to 4KiB. Keys cannot be empty strings and cannot start with “GOOGLE” or “WORKFLOWS".
- Call
Log stringLevel - Describes the level of platform logging to apply to calls and call responses during
executions of this workflow. If both the workflow and the execution specify a logging level,
the execution level takes precedence.
Possible values are:
CALL_LOG_LEVEL_UNSPECIFIED
,LOG_ALL_CALLS
,LOG_ERRORS_ONLY
,LOG_NONE
. - Crypto
Key stringName - The KMS key used to encrypt workflow and execution data. Format: projects/{project}/locations/{location}/keyRings/{keyRing}/cryptoKeys/{cryptoKey}
- Deletion
Protection bool - Description string
- Description of the workflow provided by the user. Must be at most 1000 unicode characters long.
- Labels map[string]string
A set of key/value label pairs to assign to this Workflow.
Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field
effective_labels
for all of the labels present on the resource.- Name string
- Name of the Workflow.
- Name
Prefix string - Creates a unique name beginning with the specified prefix. If this and name are unspecified, a random value is chosen for the name.
- Project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- Region string
- The region of the workflow.
- Service
Account 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.
- Source
Contents string - Workflow code to be executed. The size limit is 128KB.
- User
Env map[string]stringVars - User-defined environment variables associated with this workflow revision. This map has a maximum length of 20. Each string can take up to 4KiB. Keys cannot be empty strings and cannot start with “GOOGLE” or “WORKFLOWS".
- call
Log StringLevel - Describes the level of platform logging to apply to calls and call responses during
executions of this workflow. If both the workflow and the execution specify a logging level,
the execution level takes precedence.
Possible values are:
CALL_LOG_LEVEL_UNSPECIFIED
,LOG_ALL_CALLS
,LOG_ERRORS_ONLY
,LOG_NONE
. - crypto
Key StringName - The KMS key used to encrypt workflow and execution data. Format: projects/{project}/locations/{location}/keyRings/{keyRing}/cryptoKeys/{cryptoKey}
- deletion
Protection Boolean - description String
- Description of the workflow provided by the user. Must be at most 1000 unicode characters long.
- labels Map<String,String>
A set of key/value label pairs to assign to this Workflow.
Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field
effective_labels
for all of the labels present on the resource.- name String
- Name of the Workflow.
- name
Prefix String - Creates a unique name beginning with the specified prefix. If this and name are unspecified, a random value is chosen for the name.
- project String
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- region String
- The region of the workflow.
- service
Account 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.
- source
Contents String - Workflow code to be executed. The size limit is 128KB.
- user
Env Map<String,String>Vars - User-defined environment variables associated with this workflow revision. This map has a maximum length of 20. Each string can take up to 4KiB. Keys cannot be empty strings and cannot start with “GOOGLE” or “WORKFLOWS".
- call
Log stringLevel - Describes the level of platform logging to apply to calls and call responses during
executions of this workflow. If both the workflow and the execution specify a logging level,
the execution level takes precedence.
Possible values are:
CALL_LOG_LEVEL_UNSPECIFIED
,LOG_ALL_CALLS
,LOG_ERRORS_ONLY
,LOG_NONE
. - crypto
Key stringName - The KMS key used to encrypt workflow and execution data. Format: projects/{project}/locations/{location}/keyRings/{keyRing}/cryptoKeys/{cryptoKey}
- deletion
Protection boolean - description string
- Description of the workflow provided by the user. Must be at most 1000 unicode characters long.
- labels {[key: string]: string}
A set of key/value label pairs to assign to this Workflow.
Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field
effective_labels
for all of the labels present on the resource.- name string
- Name of the Workflow.
- name
Prefix string - Creates a unique name beginning with the specified prefix. If this and name are unspecified, a random value is chosen for the name.
- project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- region string
- The region of the workflow.
- service
Account 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.
- source
Contents string - Workflow code to be executed. The size limit is 128KB.
- user
Env {[key: string]: string}Vars - User-defined environment variables associated with this workflow revision. This map has a maximum length of 20. Each string can take up to 4KiB. Keys cannot be empty strings and cannot start with “GOOGLE” or “WORKFLOWS".
- call_
log_ strlevel - Describes the level of platform logging to apply to calls and call responses during
executions of this workflow. If both the workflow and the execution specify a logging level,
the execution level takes precedence.
Possible values are:
CALL_LOG_LEVEL_UNSPECIFIED
,LOG_ALL_CALLS
,LOG_ERRORS_ONLY
,LOG_NONE
. - crypto_
key_ strname - The KMS key used to encrypt workflow and execution data. Format: projects/{project}/locations/{location}/keyRings/{keyRing}/cryptoKeys/{cryptoKey}
- deletion_
protection bool - description str
- Description of the workflow provided by the user. Must be at most 1000 unicode characters long.
- labels Mapping[str, str]
A set of key/value label pairs to assign to this Workflow.
Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field
effective_labels
for all of the labels present on the resource.- name str
- Name of the Workflow.
- name_
prefix str - Creates a unique name beginning with the specified prefix. If this and name are unspecified, a random value is chosen for the name.
- project str
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- region str
- The region of the workflow.
- service_
account str - 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.
- source_
contents str - Workflow code to be executed. The size limit is 128KB.
- user_
env_ Mapping[str, str]vars - User-defined environment variables associated with this workflow revision. This map has a maximum length of 20. Each string can take up to 4KiB. Keys cannot be empty strings and cannot start with “GOOGLE” or “WORKFLOWS".
- call
Log StringLevel - Describes the level of platform logging to apply to calls and call responses during
executions of this workflow. If both the workflow and the execution specify a logging level,
the execution level takes precedence.
Possible values are:
CALL_LOG_LEVEL_UNSPECIFIED
,LOG_ALL_CALLS
,LOG_ERRORS_ONLY
,LOG_NONE
. - crypto
Key StringName - The KMS key used to encrypt workflow and execution data. Format: projects/{project}/locations/{location}/keyRings/{keyRing}/cryptoKeys/{cryptoKey}
- deletion
Protection Boolean - description String
- Description of the workflow provided by the user. Must be at most 1000 unicode characters long.
- labels Map<String>
A set of key/value label pairs to assign to this Workflow.
Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field
effective_labels
for all of the labels present on the resource.- name String
- Name of the Workflow.
- name
Prefix String - Creates a unique name beginning with the specified prefix. If this and name are unspecified, a random value is chosen for the name.
- project String
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- region String
- The region of the workflow.
- service
Account 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.
- source
Contents String - Workflow code to be executed. The size limit is 128KB.
- user
Env Map<String>Vars - User-defined environment variables associated with this workflow revision. This map has a maximum length of 20. Each string can take up to 4KiB. Keys cannot be empty strings and cannot start with “GOOGLE” or “WORKFLOWS".
Outputs
All input properties are implicitly available as output properties. Additionally, the Workflow resource produces the following output properties:
- Create
Time string - The timestamp of when the workflow was created in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits.
- Effective
Labels Dictionary<string, string> - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- Id string
- The provider-assigned unique ID for this managed resource.
- Pulumi
Labels Dictionary<string, string> - The combination of labels configured directly on the resource and default labels configured on the provider.
- Revision
Id string - The revision of the workflow. A new one is generated if the service account or source contents is changed.
- State string
- State of the workflow deployment.
- Update
Time string - The timestamp of when the workflow was last updated in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits.
- Create
Time string - The timestamp of when the workflow was created in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits.
- Effective
Labels map[string]string - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- Id string
- The provider-assigned unique ID for this managed resource.
- Pulumi
Labels map[string]string - The combination of labels configured directly on the resource and default labels configured on the provider.
- Revision
Id string - The revision of the workflow. A new one is generated if the service account or source contents is changed.
- State string
- State of the workflow deployment.
- Update
Time string - The timestamp of when the workflow was last updated in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits.
- create
Time String - The timestamp of when the workflow was created in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits.
- effective
Labels Map<String,String> - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- id String
- The provider-assigned unique ID for this managed resource.
- pulumi
Labels Map<String,String> - The combination of labels configured directly on the resource and default labels configured on the provider.
- revision
Id String - The revision of the workflow. A new one is generated if the service account or source contents is changed.
- state String
- State of the workflow deployment.
- update
Time String - The timestamp of when the workflow was last updated in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits.
- create
Time string - The timestamp of when the workflow was created in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits.
- effective
Labels {[key: string]: string} - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- id string
- The provider-assigned unique ID for this managed resource.
- pulumi
Labels {[key: string]: string} - The combination of labels configured directly on the resource and default labels configured on the provider.
- revision
Id string - The revision of the workflow. A new one is generated if the service account or source contents is changed.
- state string
- State of the workflow deployment.
- update
Time string - The timestamp of when the workflow was last updated in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits.
- create_
time str - The timestamp of when the workflow was created in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits.
- effective_
labels Mapping[str, str] - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- id str
- The provider-assigned unique ID for this managed resource.
- pulumi_
labels Mapping[str, str] - The combination of labels configured directly on the resource and default labels configured on the provider.
- revision_
id str - The revision of the workflow. A new one is generated if the service account or source contents is changed.
- state str
- State of the workflow deployment.
- update_
time str - The timestamp of when the workflow was last updated in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits.
- create
Time String - The timestamp of when the workflow was created in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits.
- effective
Labels Map<String> - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- id String
- The provider-assigned unique ID for this managed resource.
- pulumi
Labels Map<String> - The combination of labels configured directly on the resource and default labels configured on the provider.
- revision
Id String - The revision of the workflow. A new one is generated if the service account or source contents is changed.
- state String
- State of the workflow deployment.
- update
Time String - The timestamp of when the workflow was last updated in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits.
Look up Existing Workflow Resource
Get an existing Workflow resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: WorkflowState, opts?: CustomResourceOptions): Workflow
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
call_log_level: Optional[str] = None,
create_time: Optional[str] = None,
crypto_key_name: Optional[str] = None,
deletion_protection: Optional[bool] = None,
description: Optional[str] = None,
effective_labels: Optional[Mapping[str, str]] = None,
labels: Optional[Mapping[str, str]] = None,
name: Optional[str] = None,
name_prefix: Optional[str] = None,
project: Optional[str] = None,
pulumi_labels: Optional[Mapping[str, str]] = None,
region: Optional[str] = None,
revision_id: Optional[str] = None,
service_account: Optional[str] = None,
source_contents: Optional[str] = None,
state: Optional[str] = None,
update_time: Optional[str] = None,
user_env_vars: Optional[Mapping[str, str]] = None) -> Workflow
func GetWorkflow(ctx *Context, name string, id IDInput, state *WorkflowState, opts ...ResourceOption) (*Workflow, error)
public static Workflow Get(string name, Input<string> id, WorkflowState? state, CustomResourceOptions? opts = null)
public static Workflow get(String name, Output<String> id, WorkflowState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Call
Log stringLevel - Describes the level of platform logging to apply to calls and call responses during
executions of this workflow. If both the workflow and the execution specify a logging level,
the execution level takes precedence.
Possible values are:
CALL_LOG_LEVEL_UNSPECIFIED
,LOG_ALL_CALLS
,LOG_ERRORS_ONLY
,LOG_NONE
. - Create
Time string - The timestamp of when the workflow was created in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits.
- Crypto
Key stringName - The KMS key used to encrypt workflow and execution data. Format: projects/{project}/locations/{location}/keyRings/{keyRing}/cryptoKeys/{cryptoKey}
- Deletion
Protection bool - Description string
- Description of the workflow provided by the user. Must be at most 1000 unicode characters long.
- Effective
Labels Dictionary<string, string> - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- Labels Dictionary<string, string>
A set of key/value label pairs to assign to this Workflow.
Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field
effective_labels
for all of the labels present on the resource.- Name string
- Name of the Workflow.
- Name
Prefix string - Creates a unique name beginning with the specified prefix. If this and name are unspecified, a random value is chosen for the name.
- Project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- Pulumi
Labels Dictionary<string, string> - The combination of labels configured directly on the resource and default labels configured on the provider.
- Region string
- The region of the workflow.
- Revision
Id string - The revision of the workflow. A new one is generated if the service account or source contents is changed.
- Service
Account 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.
- Source
Contents string - Workflow code to be executed. The size limit is 128KB.
- State string
- State of the workflow deployment.
- Update
Time string - The timestamp of when the workflow was last updated in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits.
- User
Env Dictionary<string, string>Vars - User-defined environment variables associated with this workflow revision. This map has a maximum length of 20. Each string can take up to 4KiB. Keys cannot be empty strings and cannot start with “GOOGLE” or “WORKFLOWS".
- Call
Log stringLevel - Describes the level of platform logging to apply to calls and call responses during
executions of this workflow. If both the workflow and the execution specify a logging level,
the execution level takes precedence.
Possible values are:
CALL_LOG_LEVEL_UNSPECIFIED
,LOG_ALL_CALLS
,LOG_ERRORS_ONLY
,LOG_NONE
. - Create
Time string - The timestamp of when the workflow was created in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits.
- Crypto
Key stringName - The KMS key used to encrypt workflow and execution data. Format: projects/{project}/locations/{location}/keyRings/{keyRing}/cryptoKeys/{cryptoKey}
- Deletion
Protection bool - Description string
- Description of the workflow provided by the user. Must be at most 1000 unicode characters long.
- Effective
Labels map[string]string - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- Labels map[string]string
A set of key/value label pairs to assign to this Workflow.
Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field
effective_labels
for all of the labels present on the resource.- Name string
- Name of the Workflow.
- Name
Prefix string - Creates a unique name beginning with the specified prefix. If this and name are unspecified, a random value is chosen for the name.
- Project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- Pulumi
Labels map[string]string - The combination of labels configured directly on the resource and default labels configured on the provider.
- Region string
- The region of the workflow.
- Revision
Id string - The revision of the workflow. A new one is generated if the service account or source contents is changed.
- Service
Account 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.
- Source
Contents string - Workflow code to be executed. The size limit is 128KB.
- State string
- State of the workflow deployment.
- Update
Time string - The timestamp of when the workflow was last updated in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits.
- User
Env map[string]stringVars - User-defined environment variables associated with this workflow revision. This map has a maximum length of 20. Each string can take up to 4KiB. Keys cannot be empty strings and cannot start with “GOOGLE” or “WORKFLOWS".
- call
Log StringLevel - Describes the level of platform logging to apply to calls and call responses during
executions of this workflow. If both the workflow and the execution specify a logging level,
the execution level takes precedence.
Possible values are:
CALL_LOG_LEVEL_UNSPECIFIED
,LOG_ALL_CALLS
,LOG_ERRORS_ONLY
,LOG_NONE
. - create
Time String - The timestamp of when the workflow was created in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits.
- crypto
Key StringName - The KMS key used to encrypt workflow and execution data. Format: projects/{project}/locations/{location}/keyRings/{keyRing}/cryptoKeys/{cryptoKey}
- deletion
Protection Boolean - description String
- Description of the workflow provided by the user. Must be at most 1000 unicode characters long.
- effective
Labels Map<String,String> - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- labels Map<String,String>
A set of key/value label pairs to assign to this Workflow.
Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field
effective_labels
for all of the labels present on the resource.- name String
- Name of the Workflow.
- name
Prefix String - Creates a unique name beginning with the specified prefix. If this and name are unspecified, a random value is chosen for the name.
- project String
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- pulumi
Labels Map<String,String> - The combination of labels configured directly on the resource and default labels configured on the provider.
- region String
- The region of the workflow.
- revision
Id String - The revision of the workflow. A new one is generated if the service account or source contents is changed.
- service
Account 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.
- source
Contents String - Workflow code to be executed. The size limit is 128KB.
- state String
- State of the workflow deployment.
- update
Time String - The timestamp of when the workflow was last updated in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits.
- user
Env Map<String,String>Vars - User-defined environment variables associated with this workflow revision. This map has a maximum length of 20. Each string can take up to 4KiB. Keys cannot be empty strings and cannot start with “GOOGLE” or “WORKFLOWS".
- call
Log stringLevel - Describes the level of platform logging to apply to calls and call responses during
executions of this workflow. If both the workflow and the execution specify a logging level,
the execution level takes precedence.
Possible values are:
CALL_LOG_LEVEL_UNSPECIFIED
,LOG_ALL_CALLS
,LOG_ERRORS_ONLY
,LOG_NONE
. - create
Time string - The timestamp of when the workflow was created in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits.
- crypto
Key stringName - The KMS key used to encrypt workflow and execution data. Format: projects/{project}/locations/{location}/keyRings/{keyRing}/cryptoKeys/{cryptoKey}
- deletion
Protection boolean - description string
- Description of the workflow provided by the user. Must be at most 1000 unicode characters long.
- effective
Labels {[key: string]: string} - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- labels {[key: string]: string}
A set of key/value label pairs to assign to this Workflow.
Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field
effective_labels
for all of the labels present on the resource.- name string
- Name of the Workflow.
- name
Prefix string - Creates a unique name beginning with the specified prefix. If this and name are unspecified, a random value is chosen for the name.
- project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- pulumi
Labels {[key: string]: string} - The combination of labels configured directly on the resource and default labels configured on the provider.
- region string
- The region of the workflow.
- revision
Id string - The revision of the workflow. A new one is generated if the service account or source contents is changed.
- service
Account 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.
- source
Contents string - Workflow code to be executed. The size limit is 128KB.
- state string
- State of the workflow deployment.
- update
Time string - The timestamp of when the workflow was last updated in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits.
- user
Env {[key: string]: string}Vars - User-defined environment variables associated with this workflow revision. This map has a maximum length of 20. Each string can take up to 4KiB. Keys cannot be empty strings and cannot start with “GOOGLE” or “WORKFLOWS".
- call_
log_ strlevel - Describes the level of platform logging to apply to calls and call responses during
executions of this workflow. If both the workflow and the execution specify a logging level,
the execution level takes precedence.
Possible values are:
CALL_LOG_LEVEL_UNSPECIFIED
,LOG_ALL_CALLS
,LOG_ERRORS_ONLY
,LOG_NONE
. - create_
time str - The timestamp of when the workflow was created in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits.
- crypto_
key_ strname - The KMS key used to encrypt workflow and execution data. Format: projects/{project}/locations/{location}/keyRings/{keyRing}/cryptoKeys/{cryptoKey}
- deletion_
protection bool - description str
- Description of the workflow provided by the user. Must be at most 1000 unicode characters long.
- effective_
labels Mapping[str, str] - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- labels Mapping[str, str]
A set of key/value label pairs to assign to this Workflow.
Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field
effective_labels
for all of the labels present on the resource.- name str
- Name of the Workflow.
- name_
prefix str - Creates a unique name beginning with the specified prefix. If this and name are unspecified, a random value is chosen for the name.
- project str
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- pulumi_
labels Mapping[str, str] - The combination of labels configured directly on the resource and default labels configured on the provider.
- region str
- The region of the workflow.
- revision_
id str - The revision of the workflow. A new one is generated if the service account or source contents is changed.
- service_
account str - 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.
- source_
contents str - Workflow code to be executed. The size limit is 128KB.
- state str
- State of the workflow deployment.
- update_
time str - The timestamp of when the workflow was last updated in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits.
- user_
env_ Mapping[str, str]vars - User-defined environment variables associated with this workflow revision. This map has a maximum length of 20. Each string can take up to 4KiB. Keys cannot be empty strings and cannot start with “GOOGLE” or “WORKFLOWS".
- call
Log StringLevel - Describes the level of platform logging to apply to calls and call responses during
executions of this workflow. If both the workflow and the execution specify a logging level,
the execution level takes precedence.
Possible values are:
CALL_LOG_LEVEL_UNSPECIFIED
,LOG_ALL_CALLS
,LOG_ERRORS_ONLY
,LOG_NONE
. - create
Time String - The timestamp of when the workflow was created in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits.
- crypto
Key StringName - The KMS key used to encrypt workflow and execution data. Format: projects/{project}/locations/{location}/keyRings/{keyRing}/cryptoKeys/{cryptoKey}
- deletion
Protection Boolean - description String
- Description of the workflow provided by the user. Must be at most 1000 unicode characters long.
- effective
Labels Map<String> - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- labels Map<String>
A set of key/value label pairs to assign to this Workflow.
Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field
effective_labels
for all of the labels present on the resource.- name String
- Name of the Workflow.
- name
Prefix String - Creates a unique name beginning with the specified prefix. If this and name are unspecified, a random value is chosen for the name.
- project String
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- pulumi
Labels Map<String> - The combination of labels configured directly on the resource and default labels configured on the provider.
- region String
- The region of the workflow.
- revision
Id String - The revision of the workflow. A new one is generated if the service account or source contents is changed.
- service
Account 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.
- source
Contents String - Workflow code to be executed. The size limit is 128KB.
- state String
- State of the workflow deployment.
- update
Time String - The timestamp of when the workflow was last updated in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits.
- user
Env Map<String>Vars - User-defined environment variables associated with this workflow revision. This map has a maximum length of 20. Each string can take up to 4KiB. Keys cannot be empty strings and cannot start with “GOOGLE” or “WORKFLOWS".
Import
This resource does not support import.
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Google Cloud (GCP) Classic pulumi/pulumi-gcp
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
google-beta
Terraform Provider.