1. Packages
  2. Google Cloud (GCP) Classic
  3. API Docs
  4. workflows
  5. Workflow
Google Cloud Classic v7.16.0 published on Wednesday, Mar 27, 2024 by Pulumi

gcp.workflows.Workflow

Explore with Pulumi AI

gcp logo
Google Cloud Classic v7.16.0 published on Wednesday, Mar 27, 2024 by Pulumi

    Workflow program to be executed by Workflows.

    To get more information about Workflow, see:

    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",
        },
        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",
        },
        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/v7/go/gcp/serviceaccount"
    	"github.com/pulumi/pulumi-gcp/sdk/v7/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"),
    			},
    			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" },
            },
            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"))
                .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
          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

    new Workflow(name: string, args?: WorkflowArgs, opts?: CustomResourceOptions);
    @overload
    def Workflow(resource_name: str,
                 opts: Optional[ResourceOptions] = None,
                 call_log_level: Optional[str] = None,
                 crypto_key_name: Optional[str] = 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)
    @overload
    def Workflow(resource_name: str,
                 args: Optional[WorkflowArgs] = None,
                 opts: Optional[ResourceOptions] = 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.
    
    
    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.

    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

    The Workflow resource accepts the following input properties:

    CallLogLevel string
    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.
    CryptoKeyName string
    The KMS key used to encrypt workflow and execution data. Format: projects/{project}/locations/{location}/keyRings/{keyRing}/cryptoKeys/{cryptoKey}
    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.
    NamePrefix 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.
    ServiceAccount 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.
    SourceContents string
    Workflow code to be executed. The size limit is 128KB.
    UserEnvVars Dictionary<string, string>
    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".
    CallLogLevel string
    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.
    CryptoKeyName string
    The KMS key used to encrypt workflow and execution data. Format: projects/{project}/locations/{location}/keyRings/{keyRing}/cryptoKeys/{cryptoKey}
    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.
    NamePrefix 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.
    ServiceAccount 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.
    SourceContents string
    Workflow code to be executed. The size limit is 128KB.
    UserEnvVars map[string]string
    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".
    callLogLevel String
    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.
    cryptoKeyName String
    The KMS key used to encrypt workflow and execution data. Format: projects/{project}/locations/{location}/keyRings/{keyRing}/cryptoKeys/{cryptoKey}
    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.
    namePrefix 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.
    serviceAccount 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.
    sourceContents String
    Workflow code to be executed. The size limit is 128KB.
    userEnvVars Map<String,String>
    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".
    callLogLevel string
    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.
    cryptoKeyName string
    The KMS key used to encrypt workflow and execution data. Format: projects/{project}/locations/{location}/keyRings/{keyRing}/cryptoKeys/{cryptoKey}
    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.
    namePrefix 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.
    serviceAccount 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.
    sourceContents string
    Workflow code to be executed. The size limit is 128KB.
    userEnvVars {[key: string]: string}
    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_level str
    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_name str
    The KMS key used to encrypt workflow and execution data. Format: projects/{project}/locations/{location}/keyRings/{keyRing}/cryptoKeys/{cryptoKey}
    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_vars Mapping[str, str]
    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".
    callLogLevel String
    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.
    cryptoKeyName String
    The KMS key used to encrypt workflow and execution data. Format: projects/{project}/locations/{location}/keyRings/{keyRing}/cryptoKeys/{cryptoKey}
    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.
    namePrefix 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.
    serviceAccount 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.
    sourceContents String
    Workflow code to be executed. The size limit is 128KB.
    userEnvVars Map<String>
    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:

    CreateTime string
    The timestamp of when the workflow was created in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits.
    EffectiveLabels 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.
    PulumiLabels Dictionary<string, string>
    The combination of labels configured directly on the resource and default labels configured on the provider.
    RevisionId 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.
    UpdateTime string
    The timestamp of when the workflow was last updated in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits.
    CreateTime string
    The timestamp of when the workflow was created in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits.
    EffectiveLabels 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.
    PulumiLabels map[string]string
    The combination of labels configured directly on the resource and default labels configured on the provider.
    RevisionId 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.
    UpdateTime string
    The timestamp of when the workflow was last updated in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits.
    createTime String
    The timestamp of when the workflow was created in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits.
    effectiveLabels 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.
    pulumiLabels Map<String,String>
    The combination of labels configured directly on the resource and default labels configured on the provider.
    revisionId 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.
    updateTime String
    The timestamp of when the workflow was last updated in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits.
    createTime string
    The timestamp of when the workflow was created in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits.
    effectiveLabels {[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.
    pulumiLabels {[key: string]: string}
    The combination of labels configured directly on the resource and default labels configured on the provider.
    revisionId 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.
    updateTime 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.
    createTime String
    The timestamp of when the workflow was created in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits.
    effectiveLabels 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.
    pulumiLabels Map<String>
    The combination of labels configured directly on the resource and default labels configured on the provider.
    revisionId 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.
    updateTime 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,
            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.
    The following state arguments are supported:
    CallLogLevel string
    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.
    CreateTime string
    The timestamp of when the workflow was created in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits.
    CryptoKeyName string
    The KMS key used to encrypt workflow and execution data. Format: projects/{project}/locations/{location}/keyRings/{keyRing}/cryptoKeys/{cryptoKey}
    Description string
    Description of the workflow provided by the user. Must be at most 1000 unicode characters long.
    EffectiveLabels 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.
    NamePrefix 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.
    PulumiLabels 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.
    RevisionId string
    The revision of the workflow. A new one is generated if the service account or source contents is changed.
    ServiceAccount 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.
    SourceContents string
    Workflow code to be executed. The size limit is 128KB.
    State string
    State of the workflow deployment.
    UpdateTime string
    The timestamp of when the workflow was last updated in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits.
    UserEnvVars Dictionary<string, string>
    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".
    CallLogLevel string
    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.
    CreateTime string
    The timestamp of when the workflow was created in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits.
    CryptoKeyName string
    The KMS key used to encrypt workflow and execution data. Format: projects/{project}/locations/{location}/keyRings/{keyRing}/cryptoKeys/{cryptoKey}
    Description string
    Description of the workflow provided by the user. Must be at most 1000 unicode characters long.
    EffectiveLabels 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.
    NamePrefix 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.
    PulumiLabels 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.
    RevisionId string
    The revision of the workflow. A new one is generated if the service account or source contents is changed.
    ServiceAccount 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.
    SourceContents string
    Workflow code to be executed. The size limit is 128KB.
    State string
    State of the workflow deployment.
    UpdateTime string
    The timestamp of when the workflow was last updated in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits.
    UserEnvVars map[string]string
    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".
    callLogLevel String
    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.
    createTime String
    The timestamp of when the workflow was created in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits.
    cryptoKeyName String
    The KMS key used to encrypt workflow and execution data. Format: projects/{project}/locations/{location}/keyRings/{keyRing}/cryptoKeys/{cryptoKey}
    description String
    Description of the workflow provided by the user. Must be at most 1000 unicode characters long.
    effectiveLabels 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.
    namePrefix 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.
    pulumiLabels 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.
    revisionId String
    The revision of the workflow. A new one is generated if the service account or source contents is changed.
    serviceAccount 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.
    sourceContents String
    Workflow code to be executed. The size limit is 128KB.
    state String
    State of the workflow deployment.
    updateTime String
    The timestamp of when the workflow was last updated in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits.
    userEnvVars Map<String,String>
    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".
    callLogLevel string
    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.
    createTime string
    The timestamp of when the workflow was created in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits.
    cryptoKeyName string
    The KMS key used to encrypt workflow and execution data. Format: projects/{project}/locations/{location}/keyRings/{keyRing}/cryptoKeys/{cryptoKey}
    description string
    Description of the workflow provided by the user. Must be at most 1000 unicode characters long.
    effectiveLabels {[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.
    namePrefix 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.
    pulumiLabels {[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.
    revisionId string
    The revision of the workflow. A new one is generated if the service account or source contents is changed.
    serviceAccount 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.
    sourceContents string
    Workflow code to be executed. The size limit is 128KB.
    state string
    State of the workflow deployment.
    updateTime string
    The timestamp of when the workflow was last updated in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits.
    userEnvVars {[key: string]: string}
    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_level str
    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_name str
    The KMS key used to encrypt workflow and execution data. Format: projects/{project}/locations/{location}/keyRings/{keyRing}/cryptoKeys/{cryptoKey}
    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_vars Mapping[str, str]
    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".
    callLogLevel String
    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.
    createTime String
    The timestamp of when the workflow was created in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits.
    cryptoKeyName String
    The KMS key used to encrypt workflow and execution data. Format: projects/{project}/locations/{location}/keyRings/{keyRing}/cryptoKeys/{cryptoKey}
    description String
    Description of the workflow provided by the user. Must be at most 1000 unicode characters long.
    effectiveLabels 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.
    namePrefix 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.
    pulumiLabels 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.
    revisionId String
    The revision of the workflow. A new one is generated if the service account or source contents is changed.
    serviceAccount 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.
    sourceContents String
    Workflow code to be executed. The size limit is 128KB.
    state String
    State of the workflow deployment.
    updateTime String
    The timestamp of when the workflow was last updated in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits.
    userEnvVars Map<String>
    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.

    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.
    gcp logo
    Google Cloud Classic v7.16.0 published on Wednesday, Mar 27, 2024 by Pulumi