1. Packages
  2. Keycloak Provider
  3. API Docs
  4. CustomUserFederation
Keycloak v6.2.1 published on Monday, Feb 3, 2025 by Pulumi

keycloak.CustomUserFederation

Explore with Pulumi AI

Allows for creating and managing custom user federation providers within Keycloak.

A custom user federation provider is an implementation of Keycloak’s User Storage SPI. An example of this implementation can be found here.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as keycloak from "@pulumi/keycloak";

const realm = new keycloak.Realm("realm", {
    realm: "test",
    enabled: true,
});
const customUserFederation = new keycloak.CustomUserFederation("custom_user_federation", {
    name: "custom",
    realmId: realm.id,
    providerId: "custom",
    enabled: true,
    config: {
        dummyString: "foobar",
        dummyBool: "true",
        multivalue: "value1##value2",
    },
});
Copy
import pulumi
import pulumi_keycloak as keycloak

realm = keycloak.Realm("realm",
    realm="test",
    enabled=True)
custom_user_federation = keycloak.CustomUserFederation("custom_user_federation",
    name="custom",
    realm_id=realm.id,
    provider_id="custom",
    enabled=True,
    config={
        "dummyString": "foobar",
        "dummyBool": "true",
        "multivalue": "value1##value2",
    })
Copy
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.NewRealm(ctx, "realm", &keycloak.RealmArgs{
			Realm:   pulumi.String("test"),
			Enabled: pulumi.Bool(true),
		})
		if err != nil {
			return err
		}
		_, err = keycloak.NewCustomUserFederation(ctx, "custom_user_federation", &keycloak.CustomUserFederationArgs{
			Name:       pulumi.String("custom"),
			RealmId:    realm.ID(),
			ProviderId: pulumi.String("custom"),
			Enabled:    pulumi.Bool(true),
			Config: pulumi.StringMap{
				"dummyString": pulumi.String("foobar"),
				"dummyBool":   pulumi.String("true"),
				"multivalue":  pulumi.String("value1##value2"),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
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 = "test",
        Enabled = true,
    });

    var customUserFederation = new Keycloak.CustomUserFederation("custom_user_federation", new()
    {
        Name = "custom",
        RealmId = realm.Id,
        ProviderId = "custom",
        Enabled = true,
        Config = 
        {
            { "dummyString", "foobar" },
            { "dummyBool", "true" },
            { "multivalue", "value1##value2" },
        },
    });

});
Copy
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.CustomUserFederation;
import com.pulumi.keycloak.CustomUserFederationArgs;
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("test")
            .enabled(true)
            .build());

        var customUserFederation = new CustomUserFederation("customUserFederation", CustomUserFederationArgs.builder()
            .name("custom")
            .realmId(realm.id())
            .providerId("custom")
            .enabled(true)
            .config(Map.ofEntries(
                Map.entry("dummyString", "foobar"),
                Map.entry("dummyBool", true),
                Map.entry("multivalue", "value1##value2")
            ))
            .build());

    }
}
Copy
resources:
  realm:
    type: keycloak:Realm
    properties:
      realm: test
      enabled: true
  customUserFederation:
    type: keycloak:CustomUserFederation
    name: custom_user_federation
    properties:
      name: custom
      realmId: ${realm.id}
      providerId: custom
      enabled: true
      config:
        dummyString: foobar
        dummyBool: true
        multivalue: value1##value2
Copy

Create CustomUserFederation Resource

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

Constructor syntax

new CustomUserFederation(name: string, args: CustomUserFederationArgs, opts?: CustomResourceOptions);
@overload
def CustomUserFederation(resource_name: str,
                         args: CustomUserFederationArgs,
                         opts: Optional[ResourceOptions] = None)

@overload
def CustomUserFederation(resource_name: str,
                         opts: Optional[ResourceOptions] = None,
                         provider_id: Optional[str] = None,
                         realm_id: Optional[str] = None,
                         cache_policy: Optional[str] = None,
                         changed_sync_period: Optional[int] = None,
                         config: Optional[Mapping[str, str]] = None,
                         enabled: Optional[bool] = None,
                         full_sync_period: Optional[int] = None,
                         name: Optional[str] = None,
                         parent_id: Optional[str] = None,
                         priority: Optional[int] = None)
func NewCustomUserFederation(ctx *Context, name string, args CustomUserFederationArgs, opts ...ResourceOption) (*CustomUserFederation, error)
public CustomUserFederation(string name, CustomUserFederationArgs args, CustomResourceOptions? opts = null)
public CustomUserFederation(String name, CustomUserFederationArgs args)
public CustomUserFederation(String name, CustomUserFederationArgs args, CustomResourceOptions options)
type: keycloak:CustomUserFederation
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. CustomUserFederationArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. CustomUserFederationArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. CustomUserFederationArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. CustomUserFederationArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. CustomUserFederationArgs
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 customUserFederationResource = new Keycloak.CustomUserFederation("customUserFederationResource", new()
{
    ProviderId = "string",
    RealmId = "string",
    CachePolicy = "string",
    ChangedSyncPeriod = 0,
    Config = 
    {
        { "string", "string" },
    },
    Enabled = false,
    FullSyncPeriod = 0,
    Name = "string",
    ParentId = "string",
    Priority = 0,
});
Copy
example, err := keycloak.NewCustomUserFederation(ctx, "customUserFederationResource", &keycloak.CustomUserFederationArgs{
	ProviderId:        pulumi.String("string"),
	RealmId:           pulumi.String("string"),
	CachePolicy:       pulumi.String("string"),
	ChangedSyncPeriod: pulumi.Int(0),
	Config: pulumi.StringMap{
		"string": pulumi.String("string"),
	},
	Enabled:        pulumi.Bool(false),
	FullSyncPeriod: pulumi.Int(0),
	Name:           pulumi.String("string"),
	ParentId:       pulumi.String("string"),
	Priority:       pulumi.Int(0),
})
Copy
var customUserFederationResource = new CustomUserFederation("customUserFederationResource", CustomUserFederationArgs.builder()
    .providerId("string")
    .realmId("string")
    .cachePolicy("string")
    .changedSyncPeriod(0)
    .config(Map.of("string", "string"))
    .enabled(false)
    .fullSyncPeriod(0)
    .name("string")
    .parentId("string")
    .priority(0)
    .build());
Copy
custom_user_federation_resource = keycloak.CustomUserFederation("customUserFederationResource",
    provider_id="string",
    realm_id="string",
    cache_policy="string",
    changed_sync_period=0,
    config={
        "string": "string",
    },
    enabled=False,
    full_sync_period=0,
    name="string",
    parent_id="string",
    priority=0)
Copy
const customUserFederationResource = new keycloak.CustomUserFederation("customUserFederationResource", {
    providerId: "string",
    realmId: "string",
    cachePolicy: "string",
    changedSyncPeriod: 0,
    config: {
        string: "string",
    },
    enabled: false,
    fullSyncPeriod: 0,
    name: "string",
    parentId: "string",
    priority: 0,
});
Copy
type: keycloak:CustomUserFederation
properties:
    cachePolicy: string
    changedSyncPeriod: 0
    config:
        string: string
    enabled: false
    fullSyncPeriod: 0
    name: string
    parentId: string
    priority: 0
    providerId: string
    realmId: string
Copy

CustomUserFederation Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The CustomUserFederation resource accepts the following input properties:

ProviderId
This property is required.
Changes to this property will trigger replacement.
string
The unique ID of the custom provider, specified in the getId implementation for the UserStorageProviderFactory interface.
RealmId
This property is required.
Changes to this property will trigger replacement.
string
The realm that this provider will provide user federation for.
CachePolicy string
Can be one of DEFAULT, EVICT_DAILY, EVICT_WEEKLY, MAX_LIFESPAN, or NO_CACHE. Defaults to DEFAULT.
ChangedSyncPeriod int
How frequently Keycloak should sync changed users, in seconds. Omit this property to disable periodic changed users sync.
Config Dictionary<string, string>
The provider configuration handed over to your custom user federation provider. In order to add multivalued settings, use ## to separate the values.
Enabled bool
When false, this provider will not be used when performing queries for users. Defaults to true.
FullSyncPeriod int
How frequently Keycloak should sync all users, in seconds. Omit this property to disable periodic full sync.
Name string
Display name of the provider when displayed in the console.
ParentId Changes to this property will trigger replacement. string
Must be set to the realms' internal_id when it differs from the realm. This can happen when existing resources are imported into the state.
Priority int
Priority of this provider when looking up users. Lower values are first. Defaults to 0.
ProviderId
This property is required.
Changes to this property will trigger replacement.
string
The unique ID of the custom provider, specified in the getId implementation for the UserStorageProviderFactory interface.
RealmId
This property is required.
Changes to this property will trigger replacement.
string
The realm that this provider will provide user federation for.
CachePolicy string
Can be one of DEFAULT, EVICT_DAILY, EVICT_WEEKLY, MAX_LIFESPAN, or NO_CACHE. Defaults to DEFAULT.
ChangedSyncPeriod int
How frequently Keycloak should sync changed users, in seconds. Omit this property to disable periodic changed users sync.
Config map[string]string
The provider configuration handed over to your custom user federation provider. In order to add multivalued settings, use ## to separate the values.
Enabled bool
When false, this provider will not be used when performing queries for users. Defaults to true.
FullSyncPeriod int
How frequently Keycloak should sync all users, in seconds. Omit this property to disable periodic full sync.
Name string
Display name of the provider when displayed in the console.
ParentId Changes to this property will trigger replacement. string
Must be set to the realms' internal_id when it differs from the realm. This can happen when existing resources are imported into the state.
Priority int
Priority of this provider when looking up users. Lower values are first. Defaults to 0.
providerId
This property is required.
Changes to this property will trigger replacement.
String
The unique ID of the custom provider, specified in the getId implementation for the UserStorageProviderFactory interface.
realmId
This property is required.
Changes to this property will trigger replacement.
String
The realm that this provider will provide user federation for.
cachePolicy String
Can be one of DEFAULT, EVICT_DAILY, EVICT_WEEKLY, MAX_LIFESPAN, or NO_CACHE. Defaults to DEFAULT.
changedSyncPeriod Integer
How frequently Keycloak should sync changed users, in seconds. Omit this property to disable periodic changed users sync.
config Map<String,String>
The provider configuration handed over to your custom user federation provider. In order to add multivalued settings, use ## to separate the values.
enabled Boolean
When false, this provider will not be used when performing queries for users. Defaults to true.
fullSyncPeriod Integer
How frequently Keycloak should sync all users, in seconds. Omit this property to disable periodic full sync.
name String
Display name of the provider when displayed in the console.
parentId Changes to this property will trigger replacement. String
Must be set to the realms' internal_id when it differs from the realm. This can happen when existing resources are imported into the state.
priority Integer
Priority of this provider when looking up users. Lower values are first. Defaults to 0.
providerId
This property is required.
Changes to this property will trigger replacement.
string
The unique ID of the custom provider, specified in the getId implementation for the UserStorageProviderFactory interface.
realmId
This property is required.
Changes to this property will trigger replacement.
string
The realm that this provider will provide user federation for.
cachePolicy string
Can be one of DEFAULT, EVICT_DAILY, EVICT_WEEKLY, MAX_LIFESPAN, or NO_CACHE. Defaults to DEFAULT.
changedSyncPeriod number
How frequently Keycloak should sync changed users, in seconds. Omit this property to disable periodic changed users sync.
config {[key: string]: string}
The provider configuration handed over to your custom user federation provider. In order to add multivalued settings, use ## to separate the values.
enabled boolean
When false, this provider will not be used when performing queries for users. Defaults to true.
fullSyncPeriod number
How frequently Keycloak should sync all users, in seconds. Omit this property to disable periodic full sync.
name string
Display name of the provider when displayed in the console.
parentId Changes to this property will trigger replacement. string
Must be set to the realms' internal_id when it differs from the realm. This can happen when existing resources are imported into the state.
priority number
Priority of this provider when looking up users. Lower values are first. Defaults to 0.
provider_id
This property is required.
Changes to this property will trigger replacement.
str
The unique ID of the custom provider, specified in the getId implementation for the UserStorageProviderFactory interface.
realm_id
This property is required.
Changes to this property will trigger replacement.
str
The realm that this provider will provide user federation for.
cache_policy str
Can be one of DEFAULT, EVICT_DAILY, EVICT_WEEKLY, MAX_LIFESPAN, or NO_CACHE. Defaults to DEFAULT.
changed_sync_period int
How frequently Keycloak should sync changed users, in seconds. Omit this property to disable periodic changed users sync.
config Mapping[str, str]
The provider configuration handed over to your custom user federation provider. In order to add multivalued settings, use ## to separate the values.
enabled bool
When false, this provider will not be used when performing queries for users. Defaults to true.
full_sync_period int
How frequently Keycloak should sync all users, in seconds. Omit this property to disable periodic full sync.
name str
Display name of the provider when displayed in the console.
parent_id Changes to this property will trigger replacement. str
Must be set to the realms' internal_id when it differs from the realm. This can happen when existing resources are imported into the state.
priority int
Priority of this provider when looking up users. Lower values are first. Defaults to 0.
providerId
This property is required.
Changes to this property will trigger replacement.
String
The unique ID of the custom provider, specified in the getId implementation for the UserStorageProviderFactory interface.
realmId
This property is required.
Changes to this property will trigger replacement.
String
The realm that this provider will provide user federation for.
cachePolicy String
Can be one of DEFAULT, EVICT_DAILY, EVICT_WEEKLY, MAX_LIFESPAN, or NO_CACHE. Defaults to DEFAULT.
changedSyncPeriod Number
How frequently Keycloak should sync changed users, in seconds. Omit this property to disable periodic changed users sync.
config Map<String>
The provider configuration handed over to your custom user federation provider. In order to add multivalued settings, use ## to separate the values.
enabled Boolean
When false, this provider will not be used when performing queries for users. Defaults to true.
fullSyncPeriod Number
How frequently Keycloak should sync all users, in seconds. Omit this property to disable periodic full sync.
name String
Display name of the provider when displayed in the console.
parentId Changes to this property will trigger replacement. String
Must be set to the realms' internal_id when it differs from the realm. This can happen when existing resources are imported into the state.
priority Number
Priority of this provider when looking up users. Lower values are first. Defaults to 0.

Outputs

All input properties are implicitly available as output properties. Additionally, the CustomUserFederation 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 CustomUserFederation Resource

Get an existing CustomUserFederation 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?: CustomUserFederationState, opts?: CustomResourceOptions): CustomUserFederation
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        cache_policy: Optional[str] = None,
        changed_sync_period: Optional[int] = None,
        config: Optional[Mapping[str, str]] = None,
        enabled: Optional[bool] = None,
        full_sync_period: Optional[int] = None,
        name: Optional[str] = None,
        parent_id: Optional[str] = None,
        priority: Optional[int] = None,
        provider_id: Optional[str] = None,
        realm_id: Optional[str] = None) -> CustomUserFederation
func GetCustomUserFederation(ctx *Context, name string, id IDInput, state *CustomUserFederationState, opts ...ResourceOption) (*CustomUserFederation, error)
public static CustomUserFederation Get(string name, Input<string> id, CustomUserFederationState? state, CustomResourceOptions? opts = null)
public static CustomUserFederation get(String name, Output<String> id, CustomUserFederationState state, CustomResourceOptions options)
resources:  _:    type: keycloak:CustomUserFederation    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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:
CachePolicy string
Can be one of DEFAULT, EVICT_DAILY, EVICT_WEEKLY, MAX_LIFESPAN, or NO_CACHE. Defaults to DEFAULT.
ChangedSyncPeriod int
How frequently Keycloak should sync changed users, in seconds. Omit this property to disable periodic changed users sync.
Config Dictionary<string, string>
The provider configuration handed over to your custom user federation provider. In order to add multivalued settings, use ## to separate the values.
Enabled bool
When false, this provider will not be used when performing queries for users. Defaults to true.
FullSyncPeriod int
How frequently Keycloak should sync all users, in seconds. Omit this property to disable periodic full sync.
Name string
Display name of the provider when displayed in the console.
ParentId Changes to this property will trigger replacement. string
Must be set to the realms' internal_id when it differs from the realm. This can happen when existing resources are imported into the state.
Priority int
Priority of this provider when looking up users. Lower values are first. Defaults to 0.
ProviderId Changes to this property will trigger replacement. string
The unique ID of the custom provider, specified in the getId implementation for the UserStorageProviderFactory interface.
RealmId Changes to this property will trigger replacement. string
The realm that this provider will provide user federation for.
CachePolicy string
Can be one of DEFAULT, EVICT_DAILY, EVICT_WEEKLY, MAX_LIFESPAN, or NO_CACHE. Defaults to DEFAULT.
ChangedSyncPeriod int
How frequently Keycloak should sync changed users, in seconds. Omit this property to disable periodic changed users sync.
Config map[string]string
The provider configuration handed over to your custom user federation provider. In order to add multivalued settings, use ## to separate the values.
Enabled bool
When false, this provider will not be used when performing queries for users. Defaults to true.
FullSyncPeriod int
How frequently Keycloak should sync all users, in seconds. Omit this property to disable periodic full sync.
Name string
Display name of the provider when displayed in the console.
ParentId Changes to this property will trigger replacement. string
Must be set to the realms' internal_id when it differs from the realm. This can happen when existing resources are imported into the state.
Priority int
Priority of this provider when looking up users. Lower values are first. Defaults to 0.
ProviderId Changes to this property will trigger replacement. string
The unique ID of the custom provider, specified in the getId implementation for the UserStorageProviderFactory interface.
RealmId Changes to this property will trigger replacement. string
The realm that this provider will provide user federation for.
cachePolicy String
Can be one of DEFAULT, EVICT_DAILY, EVICT_WEEKLY, MAX_LIFESPAN, or NO_CACHE. Defaults to DEFAULT.
changedSyncPeriod Integer
How frequently Keycloak should sync changed users, in seconds. Omit this property to disable periodic changed users sync.
config Map<String,String>
The provider configuration handed over to your custom user federation provider. In order to add multivalued settings, use ## to separate the values.
enabled Boolean
When false, this provider will not be used when performing queries for users. Defaults to true.
fullSyncPeriod Integer
How frequently Keycloak should sync all users, in seconds. Omit this property to disable periodic full sync.
name String
Display name of the provider when displayed in the console.
parentId Changes to this property will trigger replacement. String
Must be set to the realms' internal_id when it differs from the realm. This can happen when existing resources are imported into the state.
priority Integer
Priority of this provider when looking up users. Lower values are first. Defaults to 0.
providerId Changes to this property will trigger replacement. String
The unique ID of the custom provider, specified in the getId implementation for the UserStorageProviderFactory interface.
realmId Changes to this property will trigger replacement. String
The realm that this provider will provide user federation for.
cachePolicy string
Can be one of DEFAULT, EVICT_DAILY, EVICT_WEEKLY, MAX_LIFESPAN, or NO_CACHE. Defaults to DEFAULT.
changedSyncPeriod number
How frequently Keycloak should sync changed users, in seconds. Omit this property to disable periodic changed users sync.
config {[key: string]: string}
The provider configuration handed over to your custom user federation provider. In order to add multivalued settings, use ## to separate the values.
enabled boolean
When false, this provider will not be used when performing queries for users. Defaults to true.
fullSyncPeriod number
How frequently Keycloak should sync all users, in seconds. Omit this property to disable periodic full sync.
name string
Display name of the provider when displayed in the console.
parentId Changes to this property will trigger replacement. string
Must be set to the realms' internal_id when it differs from the realm. This can happen when existing resources are imported into the state.
priority number
Priority of this provider when looking up users. Lower values are first. Defaults to 0.
providerId Changes to this property will trigger replacement. string
The unique ID of the custom provider, specified in the getId implementation for the UserStorageProviderFactory interface.
realmId Changes to this property will trigger replacement. string
The realm that this provider will provide user federation for.
cache_policy str
Can be one of DEFAULT, EVICT_DAILY, EVICT_WEEKLY, MAX_LIFESPAN, or NO_CACHE. Defaults to DEFAULT.
changed_sync_period int
How frequently Keycloak should sync changed users, in seconds. Omit this property to disable periodic changed users sync.
config Mapping[str, str]
The provider configuration handed over to your custom user federation provider. In order to add multivalued settings, use ## to separate the values.
enabled bool
When false, this provider will not be used when performing queries for users. Defaults to true.
full_sync_period int
How frequently Keycloak should sync all users, in seconds. Omit this property to disable periodic full sync.
name str
Display name of the provider when displayed in the console.
parent_id Changes to this property will trigger replacement. str
Must be set to the realms' internal_id when it differs from the realm. This can happen when existing resources are imported into the state.
priority int
Priority of this provider when looking up users. Lower values are first. Defaults to 0.
provider_id Changes to this property will trigger replacement. str
The unique ID of the custom provider, specified in the getId implementation for the UserStorageProviderFactory interface.
realm_id Changes to this property will trigger replacement. str
The realm that this provider will provide user federation for.
cachePolicy String
Can be one of DEFAULT, EVICT_DAILY, EVICT_WEEKLY, MAX_LIFESPAN, or NO_CACHE. Defaults to DEFAULT.
changedSyncPeriod Number
How frequently Keycloak should sync changed users, in seconds. Omit this property to disable periodic changed users sync.
config Map<String>
The provider configuration handed over to your custom user federation provider. In order to add multivalued settings, use ## to separate the values.
enabled Boolean
When false, this provider will not be used when performing queries for users. Defaults to true.
fullSyncPeriod Number
How frequently Keycloak should sync all users, in seconds. Omit this property to disable periodic full sync.
name String
Display name of the provider when displayed in the console.
parentId Changes to this property will trigger replacement. String
Must be set to the realms' internal_id when it differs from the realm. This can happen when existing resources are imported into the state.
priority Number
Priority of this provider when looking up users. Lower values are first. Defaults to 0.
providerId Changes to this property will trigger replacement. String
The unique ID of the custom provider, specified in the getId implementation for the UserStorageProviderFactory interface.
realmId Changes to this property will trigger replacement. String
The realm that this provider will provide user federation for.

Import

Custom user federation providers can be imported using the format {{realm_id}}/{{custom_user_federation_id}}.

The ID of the custom user federation provider can be found within the Keycloak GUI and is typically a GUID:

bash

$ pulumi import keycloak:index/customUserFederation:CustomUserFederation custom_user_federation my-realm/af2a6ca3-e4d7-49c3-b08b-1b3c70b4b860
Copy

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.