1. Registry
  2. Packages
  3. Keycloak Provider
  4. API Docs
  5. getWorkflow
Viewing docs for Keycloak v6.13.0
published on Saturday, Aug 1, 2026 by Pulumi
keycloak logo keycloak logo
Viewing docs for Keycloak v6.13.0
published on Saturday, Aug 1, 2026 by Pulumi

    This data source can be used to fetch properties of a Keycloak workflow for usage with other resources.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as keycloak from "@pulumi/keycloak";
    
    const realm = keycloak.getRealm({
        realm: "my-realm",
    });
    const onboarding = realm.then(realm => keycloak.getWorkflow({
        realm: realm.id,
        name: "onboarding-new-users",
    }));
    
    import pulumi
    import pulumi_keycloak as keycloak
    
    realm = keycloak.get_realm(realm="my-realm")
    onboarding = keycloak.get_workflow(realm=realm.id,
        name="onboarding-new-users")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-keycloak/sdk/v6/go/keycloak"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		realm, err := keycloak.GetRealm(ctx, &keycloak.LookupRealmArgs{
    			Realm: "my-realm",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		_, err = keycloak.GetWorkflow(ctx, &keycloak.LookupWorkflowArgs{
    			Realm: realm.Id,
    			Name:  "onboarding-new-users",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Keycloak = Pulumi.Keycloak;
    
    return await Deployment.RunAsync(() => 
    {
        var realm = Keycloak.GetRealm.Invoke(new()
        {
            Realm = "my-realm",
        });
    
        var onboarding = Keycloak.GetWorkflow.Invoke(new()
        {
            Realm = realm.Apply(getRealmResult => getRealmResult.Id),
            Name = "onboarding-new-users",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.keycloak.KeycloakFunctions;
    import com.pulumi.keycloak.inputs.GetRealmArgs;
    import com.pulumi.keycloak.inputs.GetWorkflowArgs;
    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 realm = KeycloakFunctions.getRealm(GetRealmArgs.builder()
                .realm("my-realm")
                .build());
    
            final var onboarding = KeycloakFunctions.getWorkflow(GetWorkflowArgs.builder()
                .realm(realm.id())
                .name("onboarding-new-users")
                .build());
    
        }
    }
    
    variables:
      realm:
        fn::invoke:
          function: keycloak:getRealm
          arguments:
            realm: my-realm
      onboarding:
        fn::invoke:
          function: keycloak:getWorkflow
          arguments:
            realm: ${realm.id}
            name: onboarding-new-users
    
    pulumi {
      required_providers {
        keycloak = {
          source = "pulumi/keycloak"
        }
      }
    }
    
    data "keycloak_getrealm" "realm" {
      realm = "my-realm"
    }
    data "keycloak_getworkflow" "onboarding" {
      realm = data.keycloak_getrealm.realm.id
      name  = "onboarding-new-users"
    }
    

    Using getWorkflow

    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 getWorkflow(args: GetWorkflowArgs, opts?: InvokeOptions): Promise<GetWorkflowResult>
    function getWorkflowOutput(args: GetWorkflowOutputArgs, opts?: InvokeOutputOptions): Output<GetWorkflowResult>
    def get_workflow(name: Optional[str] = None,
                     realm: Optional[str] = None,
                     opts: Optional[InvokeOptions] = None) -> GetWorkflowResult
    def get_workflow_output(name: pulumi.Input[Optional[str]] = None,
                     realm: pulumi.Input[Optional[str]] = None,
                     opts: Optional[InvokeOutputOptions] = None) -> Output[GetWorkflowResult]
    func LookupWorkflow(ctx *Context, args *LookupWorkflowArgs, opts ...InvokeOption) (*LookupWorkflowResult, error)
    func LookupWorkflowOutput(ctx *Context, args *LookupWorkflowOutputArgs, opts ...InvokeOption) LookupWorkflowResultOutput

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

    public static class GetWorkflow 
    {
        public static Task<GetWorkflowResult> InvokeAsync(GetWorkflowArgs args, InvokeOptions? opts = null)
        public static Output<GetWorkflowResult> Invoke(GetWorkflowInvokeArgs args, InvokeOptions? opts = null)
        public static Output<GetWorkflowResult> Invoke(GetWorkflowInvokeArgs args, InvokeOutputOptions opts)
    }
    public static CompletableFuture<GetWorkflowResult> getWorkflow(GetWorkflowArgs args, InvokeOptions options)
    public static Output<GetWorkflowResult> getWorkflow(GetWorkflowArgs args, InvokeOptions options)
    public static Output<GetWorkflowResult> getWorkflow(GetWorkflowArgs args, InvokeOutputOptions options)
    
    fn::invoke:
      function: keycloak:index/getWorkflow:getWorkflow
      arguments:
        # arguments dictionary
    data "keycloak_get_workflow" "name" {
        # arguments
    }

    The following arguments are supported:

    Name string
    The workflow name.
    Realm string
    The name of the realm this workflow exists within.
    Name string
    The workflow name.
    Realm string
    The name of the realm this workflow exists within.
    name string
    The workflow name.
    realm string
    The name of the realm this workflow exists within.
    name String
    The workflow name.
    realm String
    The name of the realm this workflow exists within.
    name string
    The workflow name.
    realm string
    The name of the realm this workflow exists within.
    name str
    The workflow name.
    realm str
    The name of the realm this workflow exists within.
    name String
    The workflow name.
    realm String
    The name of the realm this workflow exists within.

    getWorkflow Result

    The following output properties are available:

    CancelInProgress string
    Conditions string
    Enabled bool
    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    On string
    Realm string
    RestartInProgress string
    Schedules List<GetWorkflowSchedule>
    States List<GetWorkflowState>
    Steps List<GetWorkflowStep>
    CancelInProgress string
    Conditions string
    Enabled bool
    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    On string
    Realm string
    RestartInProgress string
    Schedules []GetWorkflowSchedule
    States []GetWorkflowState
    Steps []GetWorkflowStep
    cancel_in_progress string
    conditions string
    enabled bool
    id string
    The provider-assigned unique ID for this managed resource.
    name string
    on string
    realm string
    restart_in_progress string
    schedules list(object)
    states list(object)
    steps list(object)
    cancelInProgress String
    conditions String
    enabled Boolean
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    on String
    realm String
    restartInProgress String
    schedules List<GetWorkflowSchedule>
    states List<GetWorkflowState>
    steps List<GetWorkflowStep>
    cancelInProgress string
    conditions string
    enabled boolean
    id string
    The provider-assigned unique ID for this managed resource.
    name string
    on string
    realm string
    restartInProgress string
    schedules GetWorkflowSchedule[]
    states GetWorkflowState[]
    steps GetWorkflowStep[]
    cancelInProgress String
    conditions String
    enabled Boolean
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    on String
    realm String
    restartInProgress String
    schedules List<Property Map>
    states List<Property Map>
    steps List<Property Map>

    Supporting Types

    GetWorkflowSchedule

    After string
    BatchSize int
    After string
    BatchSize int
    after string
    batch_size number
    after String
    batchSize Integer
    after string
    batchSize number
    after String
    batchSize Number

    GetWorkflowState

    Errors List<string>
    Errors []string
    errors list(string)
    errors List<String>
    errors string[]
    errors Sequence[str]
    errors List<String>

    GetWorkflowStep

    After string
    Config Dictionary<string, string>
    Priority string
    ScheduledAt int
    Status string
    Uses string
    After string
    Config map[string]string
    Priority string
    ScheduledAt int
    Status string
    Uses string
    after string
    config map(string)
    priority string
    scheduled_at number
    status string
    uses string
    after String
    config Map<String,String>
    priority String
    scheduledAt Integer
    status String
    uses String
    after string
    config {[key: string]: string}
    priority string
    scheduledAt number
    status string
    uses string
    after str
    config Mapping[str, str]
    priority str
    scheduled_at int
    status str
    uses str
    after String
    config Map<String>
    priority String
    scheduledAt Number
    status String
    uses String

    Package Details

    Repository
    Keycloak pulumi/pulumi-keycloak
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the keycloak Terraform Provider.
    keycloak logo keycloak logo
    Viewing docs for Keycloak v6.13.0
    published on Saturday, Aug 1, 2026 by Pulumi

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial