1. Packages
  2. Keycloak
  3. API Docs
  4. RealmKeystoreAesGenerated
Keycloak v5.3.2 published on Friday, May 10, 2024 by Pulumi

keycloak.RealmKeystoreAesGenerated

Explore with Pulumi AI

keycloak logo
Keycloak v5.3.2 published on Friday, May 10, 2024 by Pulumi

    Allows for creating and managing aes-generated Realm keystores within Keycloak.

    A realm keystore manages generated key pairs that are used by Keycloak to perform cryptographic signatures and encryption.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as keycloak from "@pulumi/keycloak";
    
    const realm = new keycloak.Realm("realm", {realm: "my-realm"});
    const keystoreAesGenerated = new keycloak.RealmKeystoreAesGenerated("keystore_aes_generated", {
        name: "my-aes-generated-key",
        realmId: realm.id,
        enabled: true,
        active: true,
        priority: 100,
        secretSize: 16,
    });
    
    import pulumi
    import pulumi_keycloak as keycloak
    
    realm = keycloak.Realm("realm", realm="my-realm")
    keystore_aes_generated = keycloak.RealmKeystoreAesGenerated("keystore_aes_generated",
        name="my-aes-generated-key",
        realm_id=realm.id,
        enabled=True,
        active=True,
        priority=100,
        secret_size=16)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-keycloak/sdk/v5/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("my-realm"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = keycloak.NewRealmKeystoreAesGenerated(ctx, "keystore_aes_generated", &keycloak.RealmKeystoreAesGeneratedArgs{
    			Name:       pulumi.String("my-aes-generated-key"),
    			RealmId:    realm.ID(),
    			Enabled:    pulumi.Bool(true),
    			Active:     pulumi.Bool(true),
    			Priority:   pulumi.Int(100),
    			SecretSize: pulumi.Int(16),
    		})
    		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 keystoreAesGenerated = new Keycloak.RealmKeystoreAesGenerated("keystore_aes_generated", new()
        {
            Name = "my-aes-generated-key",
            RealmId = realm.Id,
            Enabled = true,
            Active = true,
            Priority = 100,
            SecretSize = 16,
        });
    
    });
    
    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.RealmKeystoreAesGenerated;
    import com.pulumi.keycloak.RealmKeystoreAesGeneratedArgs;
    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 keystoreAesGenerated = new RealmKeystoreAesGenerated("keystoreAesGenerated", RealmKeystoreAesGeneratedArgs.builder()        
                .name("my-aes-generated-key")
                .realmId(realm.id())
                .enabled(true)
                .active(true)
                .priority(100)
                .secretSize(16)
                .build());
    
        }
    }
    
    resources:
      realm:
        type: keycloak:Realm
        properties:
          realm: my-realm
      keystoreAesGenerated:
        type: keycloak:RealmKeystoreAesGenerated
        name: keystore_aes_generated
        properties:
          name: my-aes-generated-key
          realmId: ${realm.id}
          enabled: true
          active: true
          priority: 100
          secretSize: 16
    

    Create RealmKeystoreAesGenerated Resource

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

    Constructor syntax

    new RealmKeystoreAesGenerated(name: string, args: RealmKeystoreAesGeneratedArgs, opts?: CustomResourceOptions);
    @overload
    def RealmKeystoreAesGenerated(resource_name: str,
                                  args: RealmKeystoreAesGeneratedArgs,
                                  opts: Optional[ResourceOptions] = None)
    
    @overload
    def RealmKeystoreAesGenerated(resource_name: str,
                                  opts: Optional[ResourceOptions] = None,
                                  realm_id: Optional[str] = None,
                                  active: Optional[bool] = None,
                                  enabled: Optional[bool] = None,
                                  name: Optional[str] = None,
                                  priority: Optional[int] = None,
                                  secret_size: Optional[int] = None)
    func NewRealmKeystoreAesGenerated(ctx *Context, name string, args RealmKeystoreAesGeneratedArgs, opts ...ResourceOption) (*RealmKeystoreAesGenerated, error)
    public RealmKeystoreAesGenerated(string name, RealmKeystoreAesGeneratedArgs args, CustomResourceOptions? opts = null)
    public RealmKeystoreAesGenerated(String name, RealmKeystoreAesGeneratedArgs args)
    public RealmKeystoreAesGenerated(String name, RealmKeystoreAesGeneratedArgs args, CustomResourceOptions options)
    
    type: keycloak:RealmKeystoreAesGenerated
    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 RealmKeystoreAesGeneratedArgs
    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 RealmKeystoreAesGeneratedArgs
    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 RealmKeystoreAesGeneratedArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args RealmKeystoreAesGeneratedArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args RealmKeystoreAesGeneratedArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Example

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

    var realmKeystoreAesGeneratedResource = new Keycloak.RealmKeystoreAesGenerated("realmKeystoreAesGeneratedResource", new()
    {
        RealmId = "string",
        Active = false,
        Enabled = false,
        Name = "string",
        Priority = 0,
        SecretSize = 0,
    });
    
    example, err := keycloak.NewRealmKeystoreAesGenerated(ctx, "realmKeystoreAesGeneratedResource", &keycloak.RealmKeystoreAesGeneratedArgs{
    	RealmId:    pulumi.String("string"),
    	Active:     pulumi.Bool(false),
    	Enabled:    pulumi.Bool(false),
    	Name:       pulumi.String("string"),
    	Priority:   pulumi.Int(0),
    	SecretSize: pulumi.Int(0),
    })
    
    var realmKeystoreAesGeneratedResource = new RealmKeystoreAesGenerated("realmKeystoreAesGeneratedResource", RealmKeystoreAesGeneratedArgs.builder()        
        .realmId("string")
        .active(false)
        .enabled(false)
        .name("string")
        .priority(0)
        .secretSize(0)
        .build());
    
    realm_keystore_aes_generated_resource = keycloak.RealmKeystoreAesGenerated("realmKeystoreAesGeneratedResource",
        realm_id="string",
        active=False,
        enabled=False,
        name="string",
        priority=0,
        secret_size=0)
    
    const realmKeystoreAesGeneratedResource = new keycloak.RealmKeystoreAesGenerated("realmKeystoreAesGeneratedResource", {
        realmId: "string",
        active: false,
        enabled: false,
        name: "string",
        priority: 0,
        secretSize: 0,
    });
    
    type: keycloak:RealmKeystoreAesGenerated
    properties:
        active: false
        enabled: false
        name: string
        priority: 0
        realmId: string
        secretSize: 0
    

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

    RealmId string
    The realm this keystore exists in.
    Active bool
    When false, key in not used for signing. Defaults to true.
    Enabled bool
    When false, key is not accessible in this realm. Defaults to true.
    Name string
    Display name of provider when linked in admin console.
    Priority int
    Priority for the provider. Defaults to 0
    SecretSize int
    Size in bytes for the generated AES Key. Size 16 is for AES-128, Size 24 for AES-192 and Size 32 for AES-256. WARN: Bigger keys then 128 bits are not allowed on some JDK implementations. Defaults to 16.
    RealmId string
    The realm this keystore exists in.
    Active bool
    When false, key in not used for signing. Defaults to true.
    Enabled bool
    When false, key is not accessible in this realm. Defaults to true.
    Name string
    Display name of provider when linked in admin console.
    Priority int
    Priority for the provider. Defaults to 0
    SecretSize int
    Size in bytes for the generated AES Key. Size 16 is for AES-128, Size 24 for AES-192 and Size 32 for AES-256. WARN: Bigger keys then 128 bits are not allowed on some JDK implementations. Defaults to 16.
    realmId String
    The realm this keystore exists in.
    active Boolean
    When false, key in not used for signing. Defaults to true.
    enabled Boolean
    When false, key is not accessible in this realm. Defaults to true.
    name String
    Display name of provider when linked in admin console.
    priority Integer
    Priority for the provider. Defaults to 0
    secretSize Integer
    Size in bytes for the generated AES Key. Size 16 is for AES-128, Size 24 for AES-192 and Size 32 for AES-256. WARN: Bigger keys then 128 bits are not allowed on some JDK implementations. Defaults to 16.
    realmId string
    The realm this keystore exists in.
    active boolean
    When false, key in not used for signing. Defaults to true.
    enabled boolean
    When false, key is not accessible in this realm. Defaults to true.
    name string
    Display name of provider when linked in admin console.
    priority number
    Priority for the provider. Defaults to 0
    secretSize number
    Size in bytes for the generated AES Key. Size 16 is for AES-128, Size 24 for AES-192 and Size 32 for AES-256. WARN: Bigger keys then 128 bits are not allowed on some JDK implementations. Defaults to 16.
    realm_id str
    The realm this keystore exists in.
    active bool
    When false, key in not used for signing. Defaults to true.
    enabled bool
    When false, key is not accessible in this realm. Defaults to true.
    name str
    Display name of provider when linked in admin console.
    priority int
    Priority for the provider. Defaults to 0
    secret_size int
    Size in bytes for the generated AES Key. Size 16 is for AES-128, Size 24 for AES-192 and Size 32 for AES-256. WARN: Bigger keys then 128 bits are not allowed on some JDK implementations. Defaults to 16.
    realmId String
    The realm this keystore exists in.
    active Boolean
    When false, key in not used for signing. Defaults to true.
    enabled Boolean
    When false, key is not accessible in this realm. Defaults to true.
    name String
    Display name of provider when linked in admin console.
    priority Number
    Priority for the provider. Defaults to 0
    secretSize Number
    Size in bytes for the generated AES Key. Size 16 is for AES-128, Size 24 for AES-192 and Size 32 for AES-256. WARN: Bigger keys then 128 bits are not allowed on some JDK implementations. Defaults to 16.

    Outputs

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

    Get an existing RealmKeystoreAesGenerated 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?: RealmKeystoreAesGeneratedState, opts?: CustomResourceOptions): RealmKeystoreAesGenerated
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            active: Optional[bool] = None,
            enabled: Optional[bool] = None,
            name: Optional[str] = None,
            priority: Optional[int] = None,
            realm_id: Optional[str] = None,
            secret_size: Optional[int] = None) -> RealmKeystoreAesGenerated
    func GetRealmKeystoreAesGenerated(ctx *Context, name string, id IDInput, state *RealmKeystoreAesGeneratedState, opts ...ResourceOption) (*RealmKeystoreAesGenerated, error)
    public static RealmKeystoreAesGenerated Get(string name, Input<string> id, RealmKeystoreAesGeneratedState? state, CustomResourceOptions? opts = null)
    public static RealmKeystoreAesGenerated get(String name, Output<String> id, RealmKeystoreAesGeneratedState 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:
    Active bool
    When false, key in not used for signing. Defaults to true.
    Enabled bool
    When false, key is not accessible in this realm. Defaults to true.
    Name string
    Display name of provider when linked in admin console.
    Priority int
    Priority for the provider. Defaults to 0
    RealmId string
    The realm this keystore exists in.
    SecretSize int
    Size in bytes for the generated AES Key. Size 16 is for AES-128, Size 24 for AES-192 and Size 32 for AES-256. WARN: Bigger keys then 128 bits are not allowed on some JDK implementations. Defaults to 16.
    Active bool
    When false, key in not used for signing. Defaults to true.
    Enabled bool
    When false, key is not accessible in this realm. Defaults to true.
    Name string
    Display name of provider when linked in admin console.
    Priority int
    Priority for the provider. Defaults to 0
    RealmId string
    The realm this keystore exists in.
    SecretSize int
    Size in bytes for the generated AES Key. Size 16 is for AES-128, Size 24 for AES-192 and Size 32 for AES-256. WARN: Bigger keys then 128 bits are not allowed on some JDK implementations. Defaults to 16.
    active Boolean
    When false, key in not used for signing. Defaults to true.
    enabled Boolean
    When false, key is not accessible in this realm. Defaults to true.
    name String
    Display name of provider when linked in admin console.
    priority Integer
    Priority for the provider. Defaults to 0
    realmId String
    The realm this keystore exists in.
    secretSize Integer
    Size in bytes for the generated AES Key. Size 16 is for AES-128, Size 24 for AES-192 and Size 32 for AES-256. WARN: Bigger keys then 128 bits are not allowed on some JDK implementations. Defaults to 16.
    active boolean
    When false, key in not used for signing. Defaults to true.
    enabled boolean
    When false, key is not accessible in this realm. Defaults to true.
    name string
    Display name of provider when linked in admin console.
    priority number
    Priority for the provider. Defaults to 0
    realmId string
    The realm this keystore exists in.
    secretSize number
    Size in bytes for the generated AES Key. Size 16 is for AES-128, Size 24 for AES-192 and Size 32 for AES-256. WARN: Bigger keys then 128 bits are not allowed on some JDK implementations. Defaults to 16.
    active bool
    When false, key in not used for signing. Defaults to true.
    enabled bool
    When false, key is not accessible in this realm. Defaults to true.
    name str
    Display name of provider when linked in admin console.
    priority int
    Priority for the provider. Defaults to 0
    realm_id str
    The realm this keystore exists in.
    secret_size int
    Size in bytes for the generated AES Key. Size 16 is for AES-128, Size 24 for AES-192 and Size 32 for AES-256. WARN: Bigger keys then 128 bits are not allowed on some JDK implementations. Defaults to 16.
    active Boolean
    When false, key in not used for signing. Defaults to true.
    enabled Boolean
    When false, key is not accessible in this realm. Defaults to true.
    name String
    Display name of provider when linked in admin console.
    priority Number
    Priority for the provider. Defaults to 0
    realmId String
    The realm this keystore exists in.
    secretSize Number
    Size in bytes for the generated AES Key. Size 16 is for AES-128, Size 24 for AES-192 and Size 32 for AES-256. WARN: Bigger keys then 128 bits are not allowed on some JDK implementations. Defaults to 16.

    Import

    Realm keys can be imported using realm name and keystore id, you can find it in web UI.

    Example:

    bash

    $ pulumi import keycloak:index/realmKeystoreAesGenerated:RealmKeystoreAesGenerated keystore_aes_generated my-realm/618cfba7-49aa-4c09-9a19-2f699b576f0b
    

    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.2 published on Friday, May 10, 2024 by Pulumi