1. Packages
  2. Keycloak Provider
  3. API Docs
  4. RealmLocalization
Keycloak v6.8.0 published on Saturday, Nov 15, 2025 by Pulumi
keycloak logo
Keycloak v6.8.0 published on Saturday, Nov 15, 2025 by Pulumi

    Allows for managing Realm Localization Text overrides within Keycloak.

    A localization resource defines a schema for representing a locale with a map of key/value pairs and how they are managed within a realm.

    Note: whilst you can provide localization texts for unsupported locales, they will not take effect until they are defined within the realm resource.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as keycloak from "@pulumi/keycloak";
    
    const realm = new keycloak.Realm("realm", {realm: "my-realm"});
    const germanTexts = new keycloak.RealmLocalization("german_texts", {
        realmId: myRealm.id,
        locale: "de",
        texts: {
            Hello: "Hallo",
        },
    });
    
    import pulumi
    import pulumi_keycloak as keycloak
    
    realm = keycloak.Realm("realm", realm="my-realm")
    german_texts = keycloak.RealmLocalization("german_texts",
        realm_id=my_realm["id"],
        locale="de",
        texts={
            "Hello": "Hallo",
        })
    
    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 {
    		_, err := keycloak.NewRealm(ctx, "realm", &keycloak.RealmArgs{
    			Realm: pulumi.String("my-realm"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = keycloak.NewRealmLocalization(ctx, "german_texts", &keycloak.RealmLocalizationArgs{
    			RealmId: pulumi.Any(myRealm.Id),
    			Locale:  pulumi.String("de"),
    			Texts: pulumi.StringMap{
    				"Hello": pulumi.String("Hallo"),
    			},
    		})
    		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",
        });
    
        var germanTexts = new Keycloak.RealmLocalization("german_texts", new()
        {
            RealmId = myRealm.Id,
            Locale = "de",
            Texts = 
            {
                { "Hello", "Hallo" },
            },
        });
    
    });
    
    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.RealmLocalization;
    import com.pulumi.keycloak.RealmLocalizationArgs;
    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")
                .build());
    
            var germanTexts = new RealmLocalization("germanTexts", RealmLocalizationArgs.builder()
                .realmId(myRealm.id())
                .locale("de")
                .texts(Map.of("Hello", "Hallo"))
                .build());
    
        }
    }
    
    resources:
      realm:
        type: keycloak:Realm
        properties:
          realm: my-realm
      germanTexts:
        type: keycloak:RealmLocalization
        name: german_texts
        properties:
          realmId: ${myRealm.id}
          locale: de
          texts:
            Hello: Hallo
    

    Create RealmLocalization Resource

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

    Constructor syntax

    new RealmLocalization(name: string, args: RealmLocalizationArgs, opts?: CustomResourceOptions);
    @overload
    def RealmLocalization(resource_name: str,
                          args: RealmLocalizationArgs,
                          opts: Optional[ResourceOptions] = None)
    
    @overload
    def RealmLocalization(resource_name: str,
                          opts: Optional[ResourceOptions] = None,
                          locale: Optional[str] = None,
                          realm_id: Optional[str] = None,
                          texts: Optional[Mapping[str, str]] = None)
    func NewRealmLocalization(ctx *Context, name string, args RealmLocalizationArgs, opts ...ResourceOption) (*RealmLocalization, error)
    public RealmLocalization(string name, RealmLocalizationArgs args, CustomResourceOptions? opts = null)
    public RealmLocalization(String name, RealmLocalizationArgs args)
    public RealmLocalization(String name, RealmLocalizationArgs args, CustomResourceOptions options)
    
    type: keycloak:RealmLocalization
    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 RealmLocalizationArgs
    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 RealmLocalizationArgs
    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 RealmLocalizationArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args RealmLocalizationArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args RealmLocalizationArgs
    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 realmLocalizationResource = new Keycloak.RealmLocalization("realmLocalizationResource", new()
    {
        Locale = "string",
        RealmId = "string",
        Texts = 
        {
            { "string", "string" },
        },
    });
    
    example, err := keycloak.NewRealmLocalization(ctx, "realmLocalizationResource", &keycloak.RealmLocalizationArgs{
    	Locale:  pulumi.String("string"),
    	RealmId: pulumi.String("string"),
    	Texts: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    })
    
    var realmLocalizationResource = new RealmLocalization("realmLocalizationResource", RealmLocalizationArgs.builder()
        .locale("string")
        .realmId("string")
        .texts(Map.of("string", "string"))
        .build());
    
    realm_localization_resource = keycloak.RealmLocalization("realmLocalizationResource",
        locale="string",
        realm_id="string",
        texts={
            "string": "string",
        })
    
    const realmLocalizationResource = new keycloak.RealmLocalization("realmLocalizationResource", {
        locale: "string",
        realmId: "string",
        texts: {
            string: "string",
        },
    });
    
    type: keycloak:RealmLocalization
    properties:
        locale: string
        realmId: string
        texts:
            string: string
    

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

    Locale string
    The locale (language code) the texts apply to.
    RealmId string
    The ID of the realm the user profile applies to.
    Texts Dictionary<string, string>
    A map of translation keys to values.
    Locale string
    The locale (language code) the texts apply to.
    RealmId string
    The ID of the realm the user profile applies to.
    Texts map[string]string
    A map of translation keys to values.
    locale String
    The locale (language code) the texts apply to.
    realmId String
    The ID of the realm the user profile applies to.
    texts Map<String,String>
    A map of translation keys to values.
    locale string
    The locale (language code) the texts apply to.
    realmId string
    The ID of the realm the user profile applies to.
    texts {[key: string]: string}
    A map of translation keys to values.
    locale str
    The locale (language code) the texts apply to.
    realm_id str
    The ID of the realm the user profile applies to.
    texts Mapping[str, str]
    A map of translation keys to values.
    locale String
    The locale (language code) the texts apply to.
    realmId String
    The ID of the realm the user profile applies to.
    texts Map<String>
    A map of translation keys to values.

    Outputs

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

    Get an existing RealmLocalization 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?: RealmLocalizationState, opts?: CustomResourceOptions): RealmLocalization
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            locale: Optional[str] = None,
            realm_id: Optional[str] = None,
            texts: Optional[Mapping[str, str]] = None) -> RealmLocalization
    func GetRealmLocalization(ctx *Context, name string, id IDInput, state *RealmLocalizationState, opts ...ResourceOption) (*RealmLocalization, error)
    public static RealmLocalization Get(string name, Input<string> id, RealmLocalizationState? state, CustomResourceOptions? opts = null)
    public static RealmLocalization get(String name, Output<String> id, RealmLocalizationState state, CustomResourceOptions options)
    resources:  _:    type: keycloak:RealmLocalization    get:      id: ${id}
    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:
    Locale string
    The locale (language code) the texts apply to.
    RealmId string
    The ID of the realm the user profile applies to.
    Texts Dictionary<string, string>
    A map of translation keys to values.
    Locale string
    The locale (language code) the texts apply to.
    RealmId string
    The ID of the realm the user profile applies to.
    Texts map[string]string
    A map of translation keys to values.
    locale String
    The locale (language code) the texts apply to.
    realmId String
    The ID of the realm the user profile applies to.
    texts Map<String,String>
    A map of translation keys to values.
    locale string
    The locale (language code) the texts apply to.
    realmId string
    The ID of the realm the user profile applies to.
    texts {[key: string]: string}
    A map of translation keys to values.
    locale str
    The locale (language code) the texts apply to.
    realm_id str
    The ID of the realm the user profile applies to.
    texts Mapping[str, str]
    A map of translation keys to values.
    locale String
    The locale (language code) the texts apply to.
    realmId String
    The ID of the realm the user profile applies to.
    texts Map<String>
    A map of translation keys to values.

    Import

    This resource does not currently support importing.

    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 v6.8.0 published on Saturday, Nov 15, 2025 by Pulumi
      Meet Neo: Your AI Platform Teammate