1. Registry
  2. Packages
  3. Datadog Provider
  4. API Docs
  5. getWorkflowAutomation
Viewing docs for Datadog v5.20.0
published on Wednesday, Nov 11, 2026 by Pulumi
datadog logo
Viewing docs for Datadog v5.20.0
published on Wednesday, Nov 11, 2026 by Pulumi

    This data source retrieves the definition of an existing Datadog workflow from Workflow Automation for use in other resources. This data source requires a registered application key.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as datadog from "@pulumi/datadog";
    
    const myWorkflow = datadog.getWorkflowAutomation({
        id: "11111111-2222-3333-4444-555555555555",
    });
    
    import pulumi
    import pulumi_datadog as datadog
    
    my_workflow = datadog.get_workflow_automation(id="11111111-2222-3333-4444-555555555555")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-datadog/sdk/v5/go/datadog"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := datadog.GetWorkflowAutomation(ctx, &datadog.LookupWorkflowAutomationArgs{
    			Id: "11111111-2222-3333-4444-555555555555",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Datadog = Pulumi.Datadog;
    
    return await Deployment.RunAsync(() => 
    {
        var myWorkflow = Datadog.GetWorkflowAutomation.Invoke(new()
        {
            Id = "11111111-2222-3333-4444-555555555555",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.datadog.DatadogFunctions;
    import com.pulumi.datadog.inputs.GetWorkflowAutomationArgs;
    import java.util.ArrayList;
    import java.util.Arrays;
    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) {
            final var myWorkflow = DatadogFunctions.getWorkflowAutomation(GetWorkflowAutomationArgs.builder()
                .id("11111111-2222-3333-4444-555555555555")
                .build());
    
        }
    }
    
    variables:
      myWorkflow:
        fn::invoke:
          function: datadog:getWorkflowAutomation
          arguments:
            id: 11111111-2222-3333-4444-555555555555
    
    terraform {
      required_providers {
        datadog = {
          source = "pulumi/datadog"
        }
      }
    }
    
    data "datadog_workflow_automation" "myWorkflow" {
      id = "11111111-2222-3333-4444-555555555555"
    }
    

    Using getWorkflowAutomation

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getWorkflowAutomation(args: GetWorkflowAutomationArgs, opts?: InvokeOptions): Promise<GetWorkflowAutomationResult>
    function getWorkflowAutomationOutput(args: GetWorkflowAutomationOutputArgs, opts?: InvokeOutputOptions): Output<GetWorkflowAutomationResult>
    def get_workflow_automation(id: Optional[str] = None,
                                opts: Optional[InvokeOptions] = None) -> GetWorkflowAutomationResult
    def get_workflow_automation_output(id: pulumi.Input[Optional[str]] = None,
                                opts: Optional[InvokeOutputOptions] = None) -> Output[GetWorkflowAutomationResult]
    func LookupWorkflowAutomation(ctx *Context, args *LookupWorkflowAutomationArgs, opts ...InvokeOption) (*LookupWorkflowAutomationResult, error)
    func LookupWorkflowAutomationOutput(ctx *Context, args *LookupWorkflowAutomationOutputArgs, opts ...InvokeOption) LookupWorkflowAutomationResultOutput

    > Note: This function is named LookupWorkflowAutomation in the Go SDK.

    public static class GetWorkflowAutomation 
    {
        public static Task<GetWorkflowAutomationResult> InvokeAsync(GetWorkflowAutomationArgs args, InvokeOptions? opts = null)
        public static Output<GetWorkflowAutomationResult> Invoke(GetWorkflowAutomationInvokeArgs args, InvokeOptions? opts = null)
        public static Output<GetWorkflowAutomationResult> Invoke(GetWorkflowAutomationInvokeArgs args, InvokeOutputOptions opts)
    }
    public static CompletableFuture<GetWorkflowAutomationResult> getWorkflowAutomation(GetWorkflowAutomationArgs args, InvokeOptions options)
    public static Output<GetWorkflowAutomationResult> getWorkflowAutomation(GetWorkflowAutomationArgs args, InvokeOptions options)
    public static Output<GetWorkflowAutomationResult> getWorkflowAutomation(GetWorkflowAutomationArgs args, InvokeOutputOptions options)
    
    fn::invoke:
      function: datadog:index/getWorkflowAutomation:getWorkflowAutomation
      arguments:
        # arguments dictionary
    data "datadog_get_workflow_automation" "name" {
        # arguments
    }

    The following arguments are supported:

    Id string
    ID of the workflow.
    Id string
    ID of the workflow.
    id string
    ID of the workflow.
    id String
    ID of the workflow.
    id string
    ID of the workflow.
    id str
    ID of the workflow.
    id String
    ID of the workflow.

    getWorkflowAutomation Result

    The following output properties are available:

    Description string
    Description of the workflow.
    Id string
    ID of the workflow.
    Name string
    Name of the workflow.
    Published bool
    Set the workflow to published or unpublished. Workflows in an unpublished state are only executable through manual runs. Automatic triggers such as Schedule do not execute the workflow until it is published.
    RunAs GetWorkflowAutomationRunAs
    Identity used to run the workflow.
    SensitivePrivileges bool
    Whether the workflow requires sensitive privileges to run. Only the workflow owner can update this field. This allows it to run actions that use Execution Policies.
    SpecJson string
    The spec defines what the workflow does.
    Tags List<string>
    Tags of the workflow.
    Description string
    Description of the workflow.
    Id string
    ID of the workflow.
    Name string
    Name of the workflow.
    Published bool
    Set the workflow to published or unpublished. Workflows in an unpublished state are only executable through manual runs. Automatic triggers such as Schedule do not execute the workflow until it is published.
    RunAs GetWorkflowAutomationRunAs
    Identity used to run the workflow.
    SensitivePrivileges bool
    Whether the workflow requires sensitive privileges to run. Only the workflow owner can update this field. This allows it to run actions that use Execution Policies.
    SpecJson string
    The spec defines what the workflow does.
    Tags []string
    Tags of the workflow.
    description string
    Description of the workflow.
    id string
    ID of the workflow.
    name string
    Name of the workflow.
    published bool
    Set the workflow to published or unpublished. Workflows in an unpublished state are only executable through manual runs. Automatic triggers such as Schedule do not execute the workflow until it is published.
    run_as object
    Identity used to run the workflow.
    sensitive_privileges bool
    Whether the workflow requires sensitive privileges to run. Only the workflow owner can update this field. This allows it to run actions that use Execution Policies.
    spec_json string
    The spec defines what the workflow does.
    tags list(string)
    Tags of the workflow.
    description String
    Description of the workflow.
    id String
    ID of the workflow.
    name String
    Name of the workflow.
    published Boolean
    Set the workflow to published or unpublished. Workflows in an unpublished state are only executable through manual runs. Automatic triggers such as Schedule do not execute the workflow until it is published.
    runAs GetWorkflowAutomationRunAs
    Identity used to run the workflow.
    sensitivePrivileges Boolean
    Whether the workflow requires sensitive privileges to run. Only the workflow owner can update this field. This allows it to run actions that use Execution Policies.
    specJson String
    The spec defines what the workflow does.
    tags List<String>
    Tags of the workflow.
    description string
    Description of the workflow.
    id string
    ID of the workflow.
    name string
    Name of the workflow.
    published boolean
    Set the workflow to published or unpublished. Workflows in an unpublished state are only executable through manual runs. Automatic triggers such as Schedule do not execute the workflow until it is published.
    runAs GetWorkflowAutomationRunAs
    Identity used to run the workflow.
    sensitivePrivileges boolean
    Whether the workflow requires sensitive privileges to run. Only the workflow owner can update this field. This allows it to run actions that use Execution Policies.
    specJson string
    The spec defines what the workflow does.
    tags string[]
    Tags of the workflow.
    description str
    Description of the workflow.
    id str
    ID of the workflow.
    name str
    Name of the workflow.
    published bool
    Set the workflow to published or unpublished. Workflows in an unpublished state are only executable through manual runs. Automatic triggers such as Schedule do not execute the workflow until it is published.
    run_as GetWorkflowAutomationRunAs
    Identity used to run the workflow.
    sensitive_privileges bool
    Whether the workflow requires sensitive privileges to run. Only the workflow owner can update this field. This allows it to run actions that use Execution Policies.
    spec_json str
    The spec defines what the workflow does.
    tags Sequence[str]
    Tags of the workflow.
    description String
    Description of the workflow.
    id String
    ID of the workflow.
    name String
    Name of the workflow.
    published Boolean
    Set the workflow to published or unpublished. Workflows in an unpublished state are only executable through manual runs. Automatic triggers such as Schedule do not execute the workflow until it is published.
    runAs Property Map
    Identity used to run the workflow.
    sensitivePrivileges Boolean
    Whether the workflow requires sensitive privileges to run. Only the workflow owner can update this field. This allows it to run actions that use Execution Policies.
    specJson String
    The spec defines what the workflow does.
    tags List<String>
    Tags of the workflow.

    Supporting Types

    GetWorkflowAutomationRunAs

    Id string
    Service account identifier when the workflow runs as a service account.
    Type string
    Type of identity used to run the workflow. owner uses the workflow owner, initiator uses the user who starts the execution, and serviceAccount uses the account specified by id.
    Id string
    Service account identifier when the workflow runs as a service account.
    Type string
    Type of identity used to run the workflow. owner uses the workflow owner, initiator uses the user who starts the execution, and serviceAccount uses the account specified by id.
    id string
    Service account identifier when the workflow runs as a service account.
    type string
    Type of identity used to run the workflow. owner uses the workflow owner, initiator uses the user who starts the execution, and serviceAccount uses the account specified by id.
    id String
    Service account identifier when the workflow runs as a service account.
    type String
    Type of identity used to run the workflow. owner uses the workflow owner, initiator uses the user who starts the execution, and serviceAccount uses the account specified by id.
    id string
    Service account identifier when the workflow runs as a service account.
    type string
    Type of identity used to run the workflow. owner uses the workflow owner, initiator uses the user who starts the execution, and serviceAccount uses the account specified by id.
    id str
    Service account identifier when the workflow runs as a service account.
    type str
    Type of identity used to run the workflow. owner uses the workflow owner, initiator uses the user who starts the execution, and serviceAccount uses the account specified by id.
    id String
    Service account identifier when the workflow runs as a service account.
    type String
    Type of identity used to run the workflow. owner uses the workflow owner, initiator uses the user who starts the execution, and serviceAccount uses the account specified by id.

    Package Details

    Repository
    Datadog pulumi/pulumi-datadog
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the datadog Terraform Provider.
    datadog logo
    Viewing docs for Datadog v5.20.0
    published on Wednesday, Nov 11, 2026 by Pulumi

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial