1. Packages
  2. Keycloak Provider
  3. API Docs
  4. authentication
  5. ExecutionConfig
Keycloak v5.3.4 published on Friday, Sep 20, 2024 by Pulumi

keycloak.authentication.ExecutionConfig

Explore with Pulumi AI

keycloak logo
Keycloak v5.3.4 published on Friday, Sep 20, 2024 by Pulumi

    Allows for managing an authentication execution’s configuration. If a particular authentication execution supports additional configuration (such as with the identity-provider-redirector execution), this can be managed with this resource.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as keycloak from "@pulumi/keycloak";
    
    const realm = new keycloak.Realm("realm", {
        realm: "my-realm",
        enabled: true,
    });
    const flow = new keycloak.authentication.Flow("flow", {
        realmId: realm.id,
        alias: "my-flow-alias",
    });
    const execution = new keycloak.authentication.Execution("execution", {
        realmId: realm.id,
        parentFlowAlias: flow.alias,
        authenticator: "identity-provider-redirector",
    });
    const config = new keycloak.authentication.ExecutionConfig("config", {
        realmId: realm.id,
        executionId: execution.id,
        alias: "my-config-alias",
        config: {
            defaultProvider: "my-config-default-idp",
        },
    });
    
    import pulumi
    import pulumi_keycloak as keycloak
    
    realm = keycloak.Realm("realm",
        realm="my-realm",
        enabled=True)
    flow = keycloak.authentication.Flow("flow",
        realm_id=realm.id,
        alias="my-flow-alias")
    execution = keycloak.authentication.Execution("execution",
        realm_id=realm.id,
        parent_flow_alias=flow.alias,
        authenticator="identity-provider-redirector")
    config = keycloak.authentication.ExecutionConfig("config",
        realm_id=realm.id,
        execution_id=execution.id,
        alias="my-config-alias",
        config={
            "defaultProvider": "my-config-default-idp",
        })
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-keycloak/sdk/v5/go/keycloak"
    	"github.com/pulumi/pulumi-keycloak/sdk/v5/go/keycloak/authentication"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		realm, err := keycloak.NewRealm(ctx, "realm", &keycloak.RealmArgs{
    			Realm:   pulumi.String("my-realm"),
    			Enabled: pulumi.Bool(true),
    		})
    		if err != nil {
    			return err
    		}
    		flow, err := authentication.NewFlow(ctx, "flow", &authentication.FlowArgs{
    			RealmId: realm.ID(),
    			Alias:   pulumi.String("my-flow-alias"),
    		})
    		if err != nil {
    			return err
    		}
    		execution, err := authentication.NewExecution(ctx, "execution", &authentication.ExecutionArgs{
    			RealmId:         realm.ID(),
    			ParentFlowAlias: flow.Alias,
    			Authenticator:   pulumi.String("identity-provider-redirector"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = authentication.NewExecutionConfig(ctx, "config", &authentication.ExecutionConfigArgs{
    			RealmId:     realm.ID(),
    			ExecutionId: execution.ID(),
    			Alias:       pulumi.String("my-config-alias"),
    			Config: pulumi.StringMap{
    				"defaultProvider": pulumi.String("my-config-default-idp"),
    			},
    		})
    		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 = new Keycloak.Realm("realm", new()
        {
            RealmName = "my-realm",
            Enabled = true,
        });
    
        var flow = new Keycloak.Authentication.Flow("flow", new()
        {
            RealmId = realm.Id,
            Alias = "my-flow-alias",
        });
    
        var execution = new Keycloak.Authentication.Execution("execution", new()
        {
            RealmId = realm.Id,
            ParentFlowAlias = flow.Alias,
            Authenticator = "identity-provider-redirector",
        });
    
        var config = new Keycloak.Authentication.ExecutionConfig("config", new()
        {
            RealmId = realm.Id,
            ExecutionId = execution.Id,
            Alias = "my-config-alias",
            Config = 
            {
                { "defaultProvider", "my-config-default-idp" },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.keycloak.Realm;
    import com.pulumi.keycloak.RealmArgs;
    import com.pulumi.keycloak.authentication.Flow;
    import com.pulumi.keycloak.authentication.FlowArgs;
    import com.pulumi.keycloak.authentication.Execution;
    import com.pulumi.keycloak.authentication.ExecutionArgs;
    import com.pulumi.keycloak.authentication.ExecutionConfig;
    import com.pulumi.keycloak.authentication.ExecutionConfigArgs;
    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 realm = new Realm("realm", RealmArgs.builder()
                .realm("my-realm")
                .enabled(true)
                .build());
    
            var flow = new Flow("flow", FlowArgs.builder()
                .realmId(realm.id())
                .alias("my-flow-alias")
                .build());
    
            var execution = new Execution("execution", ExecutionArgs.builder()
                .realmId(realm.id())
                .parentFlowAlias(flow.alias())
                .authenticator("identity-provider-redirector")
                .build());
    
            var config = new ExecutionConfig("config", ExecutionConfigArgs.builder()
                .realmId(realm.id())
                .executionId(execution.id())
                .alias("my-config-alias")
                .config(Map.of("defaultProvider", "my-config-default-idp"))
                .build());
    
        }
    }
    
    resources:
      realm:
        type: keycloak:Realm
        properties:
          realm: my-realm
          enabled: true
      flow:
        type: keycloak:authentication:Flow
        properties:
          realmId: ${realm.id}
          alias: my-flow-alias
      execution:
        type: keycloak:authentication:Execution
        properties:
          realmId: ${realm.id}
          parentFlowAlias: ${flow.alias}
          authenticator: identity-provider-redirector
      config:
        type: keycloak:authentication:ExecutionConfig
        properties:
          realmId: ${realm.id}
          executionId: ${execution.id}
          alias: my-config-alias
          config:
            defaultProvider: my-config-default-idp
    

    Create ExecutionConfig Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new ExecutionConfig(name: string, args: ExecutionConfigArgs, opts?: CustomResourceOptions);
    @overload
    def ExecutionConfig(resource_name: str,
                        args: ExecutionConfigArgs,
                        opts: Optional[ResourceOptions] = None)
    
    @overload
    def ExecutionConfig(resource_name: str,
                        opts: Optional[ResourceOptions] = None,
                        alias: Optional[str] = None,
                        config: Optional[Mapping[str, str]] = None,
                        execution_id: Optional[str] = None,
                        realm_id: Optional[str] = None)
    func NewExecutionConfig(ctx *Context, name string, args ExecutionConfigArgs, opts ...ResourceOption) (*ExecutionConfig, error)
    public ExecutionConfig(string name, ExecutionConfigArgs args, CustomResourceOptions? opts = null)
    public ExecutionConfig(String name, ExecutionConfigArgs args)
    public ExecutionConfig(String name, ExecutionConfigArgs args, CustomResourceOptions options)
    
    type: keycloak:authentication:ExecutionConfig
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args ExecutionConfigArgs
    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 ExecutionConfigArgs
    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 ExecutionConfigArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ExecutionConfigArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ExecutionConfigArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var executionConfigResource = new Keycloak.Authentication.ExecutionConfig("executionConfigResource", new()
    {
        Alias = "string",
        Config = 
        {
            { "string", "string" },
        },
        ExecutionId = "string",
        RealmId = "string",
    });
    
    example, err := authentication.NewExecutionConfig(ctx, "executionConfigResource", &authentication.ExecutionConfigArgs{
    	Alias: pulumi.String("string"),
    	Config: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    	ExecutionId: pulumi.String("string"),
    	RealmId:     pulumi.String("string"),
    })
    
    var executionConfigResource = new ExecutionConfig("executionConfigResource", ExecutionConfigArgs.builder()
        .alias("string")
        .config(Map.of("string", "string"))
        .executionId("string")
        .realmId("string")
        .build());
    
    execution_config_resource = keycloak.authentication.ExecutionConfig("executionConfigResource",
        alias="string",
        config={
            "string": "string",
        },
        execution_id="string",
        realm_id="string")
    
    const executionConfigResource = new keycloak.authentication.ExecutionConfig("executionConfigResource", {
        alias: "string",
        config: {
            string: "string",
        },
        executionId: "string",
        realmId: "string",
    });
    
    type: keycloak:authentication:ExecutionConfig
    properties:
        alias: string
        config:
            string: string
        executionId: string
        realmId: string
    

    ExecutionConfig 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 ExecutionConfig resource accepts the following input properties:

    Alias string
    The name of the configuration.
    Config Dictionary<string, string>
    The configuration. Keys are specific to each configurable authentication execution and not checked when applying.
    ExecutionId string
    The authentication execution this configuration is attached to.
    RealmId string
    The realm the authentication execution exists in.
    Alias string
    The name of the configuration.
    Config map[string]string
    The configuration. Keys are specific to each configurable authentication execution and not checked when applying.
    ExecutionId string
    The authentication execution this configuration is attached to.
    RealmId string
    The realm the authentication execution exists in.
    alias String
    The name of the configuration.
    config Map<String,String>
    The configuration. Keys are specific to each configurable authentication execution and not checked when applying.
    executionId String
    The authentication execution this configuration is attached to.
    realmId String
    The realm the authentication execution exists in.
    alias string
    The name of the configuration.
    config {[key: string]: string}
    The configuration. Keys are specific to each configurable authentication execution and not checked when applying.
    executionId string
    The authentication execution this configuration is attached to.
    realmId string
    The realm the authentication execution exists in.
    alias str
    The name of the configuration.
    config Mapping[str, str]
    The configuration. Keys are specific to each configurable authentication execution and not checked when applying.
    execution_id str
    The authentication execution this configuration is attached to.
    realm_id str
    The realm the authentication execution exists in.
    alias String
    The name of the configuration.
    config Map<String>
    The configuration. Keys are specific to each configurable authentication execution and not checked when applying.
    executionId String
    The authentication execution this configuration is attached to.
    realmId String
    The realm the authentication execution exists in.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the ExecutionConfig resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing ExecutionConfig Resource

    Get an existing ExecutionConfig 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?: ExecutionConfigState, opts?: CustomResourceOptions): ExecutionConfig
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            alias: Optional[str] = None,
            config: Optional[Mapping[str, str]] = None,
            execution_id: Optional[str] = None,
            realm_id: Optional[str] = None) -> ExecutionConfig
    func GetExecutionConfig(ctx *Context, name string, id IDInput, state *ExecutionConfigState, opts ...ResourceOption) (*ExecutionConfig, error)
    public static ExecutionConfig Get(string name, Input<string> id, ExecutionConfigState? state, CustomResourceOptions? opts = null)
    public static ExecutionConfig get(String name, Output<String> id, ExecutionConfigState 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:
    Alias string
    The name of the configuration.
    Config Dictionary<string, string>
    The configuration. Keys are specific to each configurable authentication execution and not checked when applying.
    ExecutionId string
    The authentication execution this configuration is attached to.
    RealmId string
    The realm the authentication execution exists in.
    Alias string
    The name of the configuration.
    Config map[string]string
    The configuration. Keys are specific to each configurable authentication execution and not checked when applying.
    ExecutionId string
    The authentication execution this configuration is attached to.
    RealmId string
    The realm the authentication execution exists in.
    alias String
    The name of the configuration.
    config Map<String,String>
    The configuration. Keys are specific to each configurable authentication execution and not checked when applying.
    executionId String
    The authentication execution this configuration is attached to.
    realmId String
    The realm the authentication execution exists in.
    alias string
    The name of the configuration.
    config {[key: string]: string}
    The configuration. Keys are specific to each configurable authentication execution and not checked when applying.
    executionId string
    The authentication execution this configuration is attached to.
    realmId string
    The realm the authentication execution exists in.
    alias str
    The name of the configuration.
    config Mapping[str, str]
    The configuration. Keys are specific to each configurable authentication execution and not checked when applying.
    execution_id str
    The authentication execution this configuration is attached to.
    realm_id str
    The realm the authentication execution exists in.
    alias String
    The name of the configuration.
    config Map<String>
    The configuration. Keys are specific to each configurable authentication execution and not checked when applying.
    executionId String
    The authentication execution this configuration is attached to.
    realmId String
    The realm the authentication execution exists in.

    Import

    Configurations can be imported using the format {{realm}}/{{authenticationExecutionId}}/{{authenticationExecutionConfigId}}.

    If the authenticationExecutionId is incorrect, the import will still be successful.

    A subsequent apply will change the authenticationExecutionId to the correct one, which causes the configuration to be replaced.

    Example:

    bash

    $ pulumi import keycloak:authentication/executionConfig:ExecutionConfig config my-realm/be081463-ddbf-4b42-9eff-9c97886f24ff/30559fcf-6fb8-45ea-8c46-2b86f46ebc17
    

    To learn more about importing existing cloud resources, see Importing resources.

    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 v5.3.4 published on Friday, Sep 20, 2024 by Pulumi