Documentation ¶
Index ¶
- type Workflow
- type WorkflowArgs
- type WorkflowArray
- type WorkflowArrayInput
- type WorkflowArrayOutput
- type WorkflowInput
- type WorkflowMap
- type WorkflowMapInput
- type WorkflowMapOutput
- type WorkflowOutput
- func (o WorkflowOutput) CallLogLevel() pulumi.StringPtrOutput
- func (o WorkflowOutput) CreateTime() pulumi.StringOutput
- func (o WorkflowOutput) CryptoKeyName() pulumi.StringPtrOutput
- func (o WorkflowOutput) Description() pulumi.StringOutput
- func (o WorkflowOutput) EffectiveLabels() pulumi.StringMapOutput
- func (WorkflowOutput) ElementType() reflect.Type
- func (o WorkflowOutput) Labels() pulumi.StringMapOutput
- func (o WorkflowOutput) Name() pulumi.StringOutput
- func (o WorkflowOutput) NamePrefix() pulumi.StringOutput
- func (o WorkflowOutput) Project() pulumi.StringOutput
- func (o WorkflowOutput) PulumiLabels() pulumi.StringMapOutput
- func (o WorkflowOutput) Region() pulumi.StringPtrOutput
- func (o WorkflowOutput) RevisionId() pulumi.StringOutput
- func (o WorkflowOutput) ServiceAccount() pulumi.StringOutput
- func (o WorkflowOutput) SourceContents() pulumi.StringPtrOutput
- func (o WorkflowOutput) State() pulumi.StringOutput
- func (o WorkflowOutput) ToWorkflowOutput() WorkflowOutput
- func (o WorkflowOutput) ToWorkflowOutputWithContext(ctx context.Context) WorkflowOutput
- func (o WorkflowOutput) UpdateTime() pulumi.StringOutput
- func (o WorkflowOutput) UserEnvVars() pulumi.StringMapOutput
- type WorkflowState
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Workflow ¶
type Workflow struct { pulumi.CustomResourceState // 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`. CallLogLevel pulumi.StringPtrOutput `pulumi:"callLogLevel"` // The timestamp of when the workflow was created in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. CreateTime pulumi.StringOutput `pulumi:"createTime"` // The KMS key used to encrypt workflow and execution data. // Format: projects/{project}/locations/{location}/keyRings/{keyRing}/cryptoKeys/{cryptoKey} CryptoKeyName pulumi.StringPtrOutput `pulumi:"cryptoKeyName"` // Description of the workflow provided by the user. Must be at most 1000 unicode characters long. Description pulumi.StringOutput `pulumi:"description"` // All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services. EffectiveLabels pulumi.StringMapOutput `pulumi:"effectiveLabels"` // 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 `effectiveLabels` for all of the labels present on the resource. Labels pulumi.StringMapOutput `pulumi:"labels"` // Name of the Workflow. Name pulumi.StringOutput `pulumi:"name"` // Creates a unique name beginning with the // specified prefix. If this and name are unspecified, a random value is chosen for the name. NamePrefix pulumi.StringOutput `pulumi:"namePrefix"` // The ID of the project in which the resource belongs. // If it is not provided, the provider project is used. Project pulumi.StringOutput `pulumi:"project"` // The combination of labels configured directly on the resource // and default labels configured on the provider. PulumiLabels pulumi.StringMapOutput `pulumi:"pulumiLabels"` // The region of the workflow. Region pulumi.StringPtrOutput `pulumi:"region"` // The revision of the workflow. A new one is generated if the service account or source contents is changed. RevisionId pulumi.StringOutput `pulumi:"revisionId"` // 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 uniqueId 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. ServiceAccount pulumi.StringOutput `pulumi:"serviceAccount"` // Workflow code to be executed. The size limit is 128KB. SourceContents pulumi.StringPtrOutput `pulumi:"sourceContents"` // State of the workflow deployment. State pulumi.StringOutput `pulumi:"state"` // The timestamp of when the workflow was last updated in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. UpdateTime pulumi.StringOutput `pulumi:"updateTime"` // 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". UserEnvVars pulumi.StringMapOutput `pulumi:"userEnvVars"` }
Workflow program to be executed by Workflows.
To get more information about Workflow, see:
* [API documentation](https://cloud.google.com/workflows/docs/reference/rest/v1/projects.locations.workflows) * How-to Guides
- [Managing Workflows](https://cloud.google.com/workflows/docs/creating-updating-workflow)
## Example Usage
### Workflow Basic
```go 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"), }, 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 }) }
```
## Import
This resource does not support import.
func GetWorkflow ¶
func GetWorkflow(ctx *pulumi.Context, name string, id pulumi.IDInput, state *WorkflowState, opts ...pulumi.ResourceOption) (*Workflow, error)
GetWorkflow gets an existing Workflow resource's state with the given name, ID, and optional state properties that are used to uniquely qualify the lookup (nil if not required).
func NewWorkflow ¶
func NewWorkflow(ctx *pulumi.Context, name string, args *WorkflowArgs, opts ...pulumi.ResourceOption) (*Workflow, error)
NewWorkflow registers a new resource with the given unique name, arguments, and options.
func (*Workflow) ElementType ¶
func (*Workflow) ToWorkflowOutput ¶
func (i *Workflow) ToWorkflowOutput() WorkflowOutput
func (*Workflow) ToWorkflowOutputWithContext ¶
func (i *Workflow) ToWorkflowOutputWithContext(ctx context.Context) WorkflowOutput
type WorkflowArgs ¶
type WorkflowArgs struct { // 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`. CallLogLevel pulumi.StringPtrInput // The KMS key used to encrypt workflow and execution data. // Format: projects/{project}/locations/{location}/keyRings/{keyRing}/cryptoKeys/{cryptoKey} CryptoKeyName pulumi.StringPtrInput // Description of the workflow provided by the user. Must be at most 1000 unicode characters long. Description pulumi.StringPtrInput // 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 `effectiveLabels` for all of the labels present on the resource. Labels pulumi.StringMapInput // Name of the Workflow. Name pulumi.StringPtrInput // Creates a unique name beginning with the // specified prefix. If this and name are unspecified, a random value is chosen for the name. NamePrefix pulumi.StringPtrInput // The ID of the project in which the resource belongs. // If it is not provided, the provider project is used. Project pulumi.StringPtrInput // The region of the workflow. Region pulumi.StringPtrInput // 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 uniqueId 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. ServiceAccount pulumi.StringPtrInput // Workflow code to be executed. The size limit is 128KB. SourceContents pulumi.StringPtrInput // 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". UserEnvVars pulumi.StringMapInput }
The set of arguments for constructing a Workflow resource.
func (WorkflowArgs) ElementType ¶
func (WorkflowArgs) ElementType() reflect.Type
type WorkflowArray ¶
type WorkflowArray []WorkflowInput
func (WorkflowArray) ElementType ¶
func (WorkflowArray) ElementType() reflect.Type
func (WorkflowArray) ToWorkflowArrayOutput ¶
func (i WorkflowArray) ToWorkflowArrayOutput() WorkflowArrayOutput
func (WorkflowArray) ToWorkflowArrayOutputWithContext ¶
func (i WorkflowArray) ToWorkflowArrayOutputWithContext(ctx context.Context) WorkflowArrayOutput
type WorkflowArrayInput ¶
type WorkflowArrayInput interface { pulumi.Input ToWorkflowArrayOutput() WorkflowArrayOutput ToWorkflowArrayOutputWithContext(context.Context) WorkflowArrayOutput }
WorkflowArrayInput is an input type that accepts WorkflowArray and WorkflowArrayOutput values. You can construct a concrete instance of `WorkflowArrayInput` via:
WorkflowArray{ WorkflowArgs{...} }
type WorkflowArrayOutput ¶
type WorkflowArrayOutput struct{ *pulumi.OutputState }
func (WorkflowArrayOutput) ElementType ¶
func (WorkflowArrayOutput) ElementType() reflect.Type
func (WorkflowArrayOutput) Index ¶
func (o WorkflowArrayOutput) Index(i pulumi.IntInput) WorkflowOutput
func (WorkflowArrayOutput) ToWorkflowArrayOutput ¶
func (o WorkflowArrayOutput) ToWorkflowArrayOutput() WorkflowArrayOutput
func (WorkflowArrayOutput) ToWorkflowArrayOutputWithContext ¶
func (o WorkflowArrayOutput) ToWorkflowArrayOutputWithContext(ctx context.Context) WorkflowArrayOutput
type WorkflowInput ¶
type WorkflowInput interface { pulumi.Input ToWorkflowOutput() WorkflowOutput ToWorkflowOutputWithContext(ctx context.Context) WorkflowOutput }
type WorkflowMap ¶
type WorkflowMap map[string]WorkflowInput
func (WorkflowMap) ElementType ¶
func (WorkflowMap) ElementType() reflect.Type
func (WorkflowMap) ToWorkflowMapOutput ¶
func (i WorkflowMap) ToWorkflowMapOutput() WorkflowMapOutput
func (WorkflowMap) ToWorkflowMapOutputWithContext ¶
func (i WorkflowMap) ToWorkflowMapOutputWithContext(ctx context.Context) WorkflowMapOutput
type WorkflowMapInput ¶
type WorkflowMapInput interface { pulumi.Input ToWorkflowMapOutput() WorkflowMapOutput ToWorkflowMapOutputWithContext(context.Context) WorkflowMapOutput }
WorkflowMapInput is an input type that accepts WorkflowMap and WorkflowMapOutput values. You can construct a concrete instance of `WorkflowMapInput` via:
WorkflowMap{ "key": WorkflowArgs{...} }
type WorkflowMapOutput ¶
type WorkflowMapOutput struct{ *pulumi.OutputState }
func (WorkflowMapOutput) ElementType ¶
func (WorkflowMapOutput) ElementType() reflect.Type
func (WorkflowMapOutput) MapIndex ¶
func (o WorkflowMapOutput) MapIndex(k pulumi.StringInput) WorkflowOutput
func (WorkflowMapOutput) ToWorkflowMapOutput ¶
func (o WorkflowMapOutput) ToWorkflowMapOutput() WorkflowMapOutput
func (WorkflowMapOutput) ToWorkflowMapOutputWithContext ¶
func (o WorkflowMapOutput) ToWorkflowMapOutputWithContext(ctx context.Context) WorkflowMapOutput
type WorkflowOutput ¶
type WorkflowOutput struct{ *pulumi.OutputState }
func (WorkflowOutput) CallLogLevel ¶
func (o WorkflowOutput) CallLogLevel() pulumi.StringPtrOutput
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`.
func (WorkflowOutput) CreateTime ¶
func (o WorkflowOutput) CreateTime() pulumi.StringOutput
The timestamp of when the workflow was created in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits.
func (WorkflowOutput) CryptoKeyName ¶
func (o WorkflowOutput) CryptoKeyName() pulumi.StringPtrOutput
The KMS key used to encrypt workflow and execution data. Format: projects/{project}/locations/{location}/keyRings/{keyRing}/cryptoKeys/{cryptoKey}
func (WorkflowOutput) Description ¶
func (o WorkflowOutput) Description() pulumi.StringOutput
Description of the workflow provided by the user. Must be at most 1000 unicode characters long.
func (WorkflowOutput) EffectiveLabels ¶
func (o WorkflowOutput) EffectiveLabels() pulumi.StringMapOutput
All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
func (WorkflowOutput) ElementType ¶
func (WorkflowOutput) ElementType() reflect.Type
func (WorkflowOutput) Labels ¶
func (o WorkflowOutput) Labels() pulumi.StringMapOutput
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 `effectiveLabels` for all of the labels present on the resource.
func (WorkflowOutput) Name ¶
func (o WorkflowOutput) Name() pulumi.StringOutput
Name of the Workflow.
func (WorkflowOutput) NamePrefix ¶
func (o WorkflowOutput) NamePrefix() pulumi.StringOutput
Creates a unique name beginning with the specified prefix. If this and name are unspecified, a random value is chosen for the name.
func (WorkflowOutput) Project ¶
func (o WorkflowOutput) Project() pulumi.StringOutput
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
func (WorkflowOutput) PulumiLabels ¶
func (o WorkflowOutput) PulumiLabels() pulumi.StringMapOutput
The combination of labels configured directly on the resource and default labels configured on the provider.
func (WorkflowOutput) Region ¶
func (o WorkflowOutput) Region() pulumi.StringPtrOutput
The region of the workflow.
func (WorkflowOutput) RevisionId ¶
func (o WorkflowOutput) RevisionId() pulumi.StringOutput
The revision of the workflow. A new one is generated if the service account or source contents is changed.
func (WorkflowOutput) ServiceAccount ¶
func (o WorkflowOutput) ServiceAccount() pulumi.StringOutput
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 uniqueId 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.
func (WorkflowOutput) SourceContents ¶
func (o WorkflowOutput) SourceContents() pulumi.StringPtrOutput
Workflow code to be executed. The size limit is 128KB.
func (WorkflowOutput) State ¶
func (o WorkflowOutput) State() pulumi.StringOutput
State of the workflow deployment.
func (WorkflowOutput) ToWorkflowOutput ¶
func (o WorkflowOutput) ToWorkflowOutput() WorkflowOutput
func (WorkflowOutput) ToWorkflowOutputWithContext ¶
func (o WorkflowOutput) ToWorkflowOutputWithContext(ctx context.Context) WorkflowOutput
func (WorkflowOutput) UpdateTime ¶
func (o WorkflowOutput) UpdateTime() pulumi.StringOutput
The timestamp of when the workflow was last updated in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits.
func (WorkflowOutput) UserEnvVars ¶
func (o WorkflowOutput) UserEnvVars() pulumi.StringMapOutput
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".
type WorkflowState ¶
type WorkflowState struct { // 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`. CallLogLevel pulumi.StringPtrInput // The timestamp of when the workflow was created in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. CreateTime pulumi.StringPtrInput // The KMS key used to encrypt workflow and execution data. // Format: projects/{project}/locations/{location}/keyRings/{keyRing}/cryptoKeys/{cryptoKey} CryptoKeyName pulumi.StringPtrInput // Description of the workflow provided by the user. Must be at most 1000 unicode characters long. Description pulumi.StringPtrInput // All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services. EffectiveLabels pulumi.StringMapInput // 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 `effectiveLabels` for all of the labels present on the resource. Labels pulumi.StringMapInput // Name of the Workflow. Name pulumi.StringPtrInput // Creates a unique name beginning with the // specified prefix. If this and name are unspecified, a random value is chosen for the name. NamePrefix pulumi.StringPtrInput // The ID of the project in which the resource belongs. // If it is not provided, the provider project is used. Project pulumi.StringPtrInput // The combination of labels configured directly on the resource // and default labels configured on the provider. PulumiLabels pulumi.StringMapInput // The region of the workflow. Region pulumi.StringPtrInput // The revision of the workflow. A new one is generated if the service account or source contents is changed. RevisionId pulumi.StringPtrInput // 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 uniqueId 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. ServiceAccount pulumi.StringPtrInput // Workflow code to be executed. The size limit is 128KB. SourceContents pulumi.StringPtrInput // State of the workflow deployment. State pulumi.StringPtrInput // The timestamp of when the workflow was last updated in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. UpdateTime pulumi.StringPtrInput // 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". UserEnvVars pulumi.StringMapInput }
func (WorkflowState) ElementType ¶
func (WorkflowState) ElementType() reflect.Type