1. Packages
  2. Konnect Provider
  3. API Docs
  4. Realm
konnect 2.12.0 published on Tuesday, Jul 22, 2025 by kong

konnect.Realm

Explore with Pulumi AI

konnect logo
konnect 2.12.0 published on Tuesday, Jul 22, 2025 by kong

    Realm Resource

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as konnect from "@pulumi/konnect";
    
    const myRealm = new konnect.Realm("myRealm", {
        allowAllControlPlanes: true,
        allowedControlPlanes: ["..."],
        consumerGroups: ["..."],
        forceDestroy: "false",
        negativeTtl: 11,
        ttl: 15,
    });
    
    import pulumi
    import pulumi_konnect as konnect
    
    my_realm = konnect.Realm("myRealm",
        allow_all_control_planes=True,
        allowed_control_planes=["..."],
        consumer_groups=["..."],
        force_destroy="false",
        negative_ttl=11,
        ttl=15)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/konnect/v2/konnect"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := konnect.NewRealm(ctx, "myRealm", &konnect.RealmArgs{
    			AllowAllControlPlanes: pulumi.Bool(true),
    			AllowedControlPlanes: pulumi.StringArray{
    				pulumi.String("..."),
    			},
    			ConsumerGroups: pulumi.StringArray{
    				pulumi.String("..."),
    			},
    			ForceDestroy: pulumi.String("false"),
    			NegativeTtl:  pulumi.Float64(11),
    			Ttl:          pulumi.Float64(15),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Konnect = Pulumi.Konnect;
    
    return await Deployment.RunAsync(() => 
    {
        var myRealm = new Konnect.Realm("myRealm", new()
        {
            AllowAllControlPlanes = true,
            AllowedControlPlanes = new[]
            {
                "...",
            },
            ConsumerGroups = new[]
            {
                "...",
            },
            ForceDestroy = "false",
            NegativeTtl = 11,
            Ttl = 15,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.konnect.Realm;
    import com.pulumi.konnect.RealmArgs;
    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 myRealm = new Realm("myRealm", RealmArgs.builder()
                .allowAllControlPlanes(true)
                .allowedControlPlanes("...")
                .consumerGroups("...")
                .forceDestroy("false")
                .negativeTtl(11)
                .ttl(15)
                .build());
    
        }
    }
    
    resources:
      myRealm:
        type: konnect:Realm
        properties:
          allowAllControlPlanes: true
          allowedControlPlanes:
            - '...'
          consumerGroups:
            - '...'
          forceDestroy: 'false'
          negativeTtl: 11
          ttl: 15
    

    Create Realm Resource

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

    Constructor syntax

    new Realm(name: string, args?: RealmArgs, opts?: CustomResourceOptions);
    @overload
    def Realm(resource_name: str,
              args: Optional[RealmArgs] = None,
              opts: Optional[ResourceOptions] = None)
    
    @overload
    def Realm(resource_name: str,
              opts: Optional[ResourceOptions] = None,
              allow_all_control_planes: Optional[bool] = None,
              allowed_control_planes: Optional[Sequence[str]] = None,
              consumer_groups: Optional[Sequence[str]] = None,
              force_destroy: Optional[str] = None,
              name: Optional[str] = None,
              negative_ttl: Optional[float] = None,
              ttl: Optional[float] = None)
    func NewRealm(ctx *Context, name string, args *RealmArgs, opts ...ResourceOption) (*Realm, error)
    public Realm(string name, RealmArgs? args = null, CustomResourceOptions? opts = null)
    public Realm(String name, RealmArgs args)
    public Realm(String name, RealmArgs args, CustomResourceOptions options)
    
    type: konnect:Realm
    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 RealmArgs
    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 RealmArgs
    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 RealmArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args RealmArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args RealmArgs
    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 realmResource = new Konnect.Realm("realmResource", new()
    {
        AllowAllControlPlanes = false,
        AllowedControlPlanes = new[]
        {
            "string",
        },
        ConsumerGroups = new[]
        {
            "string",
        },
        ForceDestroy = "string",
        Name = "string",
        NegativeTtl = 0,
        Ttl = 0,
    });
    
    example, err := konnect.NewRealm(ctx, "realmResource", &konnect.RealmArgs{
    	AllowAllControlPlanes: pulumi.Bool(false),
    	AllowedControlPlanes: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	ConsumerGroups: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	ForceDestroy: pulumi.String("string"),
    	Name:         pulumi.String("string"),
    	NegativeTtl:  pulumi.Float64(0),
    	Ttl:          pulumi.Float64(0),
    })
    
    var realmResource = new Realm("realmResource", RealmArgs.builder()
        .allowAllControlPlanes(false)
        .allowedControlPlanes("string")
        .consumerGroups("string")
        .forceDestroy("string")
        .name("string")
        .negativeTtl(0.0)
        .ttl(0.0)
        .build());
    
    realm_resource = konnect.Realm("realmResource",
        allow_all_control_planes=False,
        allowed_control_planes=["string"],
        consumer_groups=["string"],
        force_destroy="string",
        name="string",
        negative_ttl=0,
        ttl=0)
    
    const realmResource = new konnect.Realm("realmResource", {
        allowAllControlPlanes: false,
        allowedControlPlanes: ["string"],
        consumerGroups: ["string"],
        forceDestroy: "string",
        name: "string",
        negativeTtl: 0,
        ttl: 0,
    });
    
    type: konnect:Realm
    properties:
        allowAllControlPlanes: false
        allowedControlPlanes:
            - string
        consumerGroups:
            - string
        forceDestroy: string
        name: string
        negativeTtl: 0
        ttl: 0
    

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

    AllowAllControlPlanes bool
    Allow all control planes to use the realm. When this value is set it takes precedence on allowed_control_planes.
    AllowedControlPlanes List<string>
    List of control plane ids that are allowed to use the realm. This is used when allow_all_control_planes value is set to false.
    ConsumerGroups List<string>
    A list of consumer groups to automatically add to any consumers created within this Realm. If consumer_groups are provided on the Consumer object and on the Realm, the Consumer will be placed in all defined consumer groups.
    ForceDestroy string
    Name string
    NegativeTtl double
    If a running Gateway triggers a lookup for a Consumer that cannot be authenticated this realm, a negative_ttl is set. The Gateway will not try to lookup the Consumer in Konnect for negative_ttl minutes.
    Ttl double
    The time in minutes that the Consumer will be cached in memory on a running Gateway if it is successfully loaded from Konnect. Default: 10
    AllowAllControlPlanes bool
    Allow all control planes to use the realm. When this value is set it takes precedence on allowed_control_planes.
    AllowedControlPlanes []string
    List of control plane ids that are allowed to use the realm. This is used when allow_all_control_planes value is set to false.
    ConsumerGroups []string
    A list of consumer groups to automatically add to any consumers created within this Realm. If consumer_groups are provided on the Consumer object and on the Realm, the Consumer will be placed in all defined consumer groups.
    ForceDestroy string
    Name string
    NegativeTtl float64
    If a running Gateway triggers a lookup for a Consumer that cannot be authenticated this realm, a negative_ttl is set. The Gateway will not try to lookup the Consumer in Konnect for negative_ttl minutes.
    Ttl float64
    The time in minutes that the Consumer will be cached in memory on a running Gateway if it is successfully loaded from Konnect. Default: 10
    allowAllControlPlanes Boolean
    Allow all control planes to use the realm. When this value is set it takes precedence on allowed_control_planes.
    allowedControlPlanes List<String>
    List of control plane ids that are allowed to use the realm. This is used when allow_all_control_planes value is set to false.
    consumerGroups List<String>
    A list of consumer groups to automatically add to any consumers created within this Realm. If consumer_groups are provided on the Consumer object and on the Realm, the Consumer will be placed in all defined consumer groups.
    forceDestroy String
    name String
    negativeTtl Double
    If a running Gateway triggers a lookup for a Consumer that cannot be authenticated this realm, a negative_ttl is set. The Gateway will not try to lookup the Consumer in Konnect for negative_ttl minutes.
    ttl Double
    The time in minutes that the Consumer will be cached in memory on a running Gateway if it is successfully loaded from Konnect. Default: 10
    allowAllControlPlanes boolean
    Allow all control planes to use the realm. When this value is set it takes precedence on allowed_control_planes.
    allowedControlPlanes string[]
    List of control plane ids that are allowed to use the realm. This is used when allow_all_control_planes value is set to false.
    consumerGroups string[]
    A list of consumer groups to automatically add to any consumers created within this Realm. If consumer_groups are provided on the Consumer object and on the Realm, the Consumer will be placed in all defined consumer groups.
    forceDestroy string
    name string
    negativeTtl number
    If a running Gateway triggers a lookup for a Consumer that cannot be authenticated this realm, a negative_ttl is set. The Gateway will not try to lookup the Consumer in Konnect for negative_ttl minutes.
    ttl number
    The time in minutes that the Consumer will be cached in memory on a running Gateway if it is successfully loaded from Konnect. Default: 10
    allow_all_control_planes bool
    Allow all control planes to use the realm. When this value is set it takes precedence on allowed_control_planes.
    allowed_control_planes Sequence[str]
    List of control plane ids that are allowed to use the realm. This is used when allow_all_control_planes value is set to false.
    consumer_groups Sequence[str]
    A list of consumer groups to automatically add to any consumers created within this Realm. If consumer_groups are provided on the Consumer object and on the Realm, the Consumer will be placed in all defined consumer groups.
    force_destroy str
    name str
    negative_ttl float
    If a running Gateway triggers a lookup for a Consumer that cannot be authenticated this realm, a negative_ttl is set. The Gateway will not try to lookup the Consumer in Konnect for negative_ttl minutes.
    ttl float
    The time in minutes that the Consumer will be cached in memory on a running Gateway if it is successfully loaded from Konnect. Default: 10
    allowAllControlPlanes Boolean
    Allow all control planes to use the realm. When this value is set it takes precedence on allowed_control_planes.
    allowedControlPlanes List<String>
    List of control plane ids that are allowed to use the realm. This is used when allow_all_control_planes value is set to false.
    consumerGroups List<String>
    A list of consumer groups to automatically add to any consumers created within this Realm. If consumer_groups are provided on the Consumer object and on the Realm, the Consumer will be placed in all defined consumer groups.
    forceDestroy String
    name String
    negativeTtl Number
    If a running Gateway triggers a lookup for a Consumer that cannot be authenticated this realm, a negative_ttl is set. The Gateway will not try to lookup the Consumer in Konnect for negative_ttl minutes.
    ttl Number
    The time in minutes that the Consumer will be cached in memory on a running Gateway if it is successfully loaded from Konnect. Default: 10

    Outputs

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

    CreatedAt string
    An ISO-8601 timestamp representation of entity creation date.
    Id string
    The provider-assigned unique ID for this managed resource.
    UpdatedAt string
    An ISO-8601 timestamp representation of entity update date.
    CreatedAt string
    An ISO-8601 timestamp representation of entity creation date.
    Id string
    The provider-assigned unique ID for this managed resource.
    UpdatedAt string
    An ISO-8601 timestamp representation of entity update date.
    createdAt String
    An ISO-8601 timestamp representation of entity creation date.
    id String
    The provider-assigned unique ID for this managed resource.
    updatedAt String
    An ISO-8601 timestamp representation of entity update date.
    createdAt string
    An ISO-8601 timestamp representation of entity creation date.
    id string
    The provider-assigned unique ID for this managed resource.
    updatedAt string
    An ISO-8601 timestamp representation of entity update date.
    created_at str
    An ISO-8601 timestamp representation of entity creation date.
    id str
    The provider-assigned unique ID for this managed resource.
    updated_at str
    An ISO-8601 timestamp representation of entity update date.
    createdAt String
    An ISO-8601 timestamp representation of entity creation date.
    id String
    The provider-assigned unique ID for this managed resource.
    updatedAt String
    An ISO-8601 timestamp representation of entity update date.

    Look up Existing Realm Resource

    Get an existing Realm 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?: RealmState, opts?: CustomResourceOptions): Realm
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            allow_all_control_planes: Optional[bool] = None,
            allowed_control_planes: Optional[Sequence[str]] = None,
            consumer_groups: Optional[Sequence[str]] = None,
            created_at: Optional[str] = None,
            force_destroy: Optional[str] = None,
            name: Optional[str] = None,
            negative_ttl: Optional[float] = None,
            ttl: Optional[float] = None,
            updated_at: Optional[str] = None) -> Realm
    func GetRealm(ctx *Context, name string, id IDInput, state *RealmState, opts ...ResourceOption) (*Realm, error)
    public static Realm Get(string name, Input<string> id, RealmState? state, CustomResourceOptions? opts = null)
    public static Realm get(String name, Output<String> id, RealmState state, CustomResourceOptions options)
    resources:  _:    type: konnect:Realm    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:
    AllowAllControlPlanes bool
    Allow all control planes to use the realm. When this value is set it takes precedence on allowed_control_planes.
    AllowedControlPlanes List<string>
    List of control plane ids that are allowed to use the realm. This is used when allow_all_control_planes value is set to false.
    ConsumerGroups List<string>
    A list of consumer groups to automatically add to any consumers created within this Realm. If consumer_groups are provided on the Consumer object and on the Realm, the Consumer will be placed in all defined consumer groups.
    CreatedAt string
    An ISO-8601 timestamp representation of entity creation date.
    ForceDestroy string
    Name string
    NegativeTtl double
    If a running Gateway triggers a lookup for a Consumer that cannot be authenticated this realm, a negative_ttl is set. The Gateway will not try to lookup the Consumer in Konnect for negative_ttl minutes.
    Ttl double
    The time in minutes that the Consumer will be cached in memory on a running Gateway if it is successfully loaded from Konnect. Default: 10
    UpdatedAt string
    An ISO-8601 timestamp representation of entity update date.
    AllowAllControlPlanes bool
    Allow all control planes to use the realm. When this value is set it takes precedence on allowed_control_planes.
    AllowedControlPlanes []string
    List of control plane ids that are allowed to use the realm. This is used when allow_all_control_planes value is set to false.
    ConsumerGroups []string
    A list of consumer groups to automatically add to any consumers created within this Realm. If consumer_groups are provided on the Consumer object and on the Realm, the Consumer will be placed in all defined consumer groups.
    CreatedAt string
    An ISO-8601 timestamp representation of entity creation date.
    ForceDestroy string
    Name string
    NegativeTtl float64
    If a running Gateway triggers a lookup for a Consumer that cannot be authenticated this realm, a negative_ttl is set. The Gateway will not try to lookup the Consumer in Konnect for negative_ttl minutes.
    Ttl float64
    The time in minutes that the Consumer will be cached in memory on a running Gateway if it is successfully loaded from Konnect. Default: 10
    UpdatedAt string
    An ISO-8601 timestamp representation of entity update date.
    allowAllControlPlanes Boolean
    Allow all control planes to use the realm. When this value is set it takes precedence on allowed_control_planes.
    allowedControlPlanes List<String>
    List of control plane ids that are allowed to use the realm. This is used when allow_all_control_planes value is set to false.
    consumerGroups List<String>
    A list of consumer groups to automatically add to any consumers created within this Realm. If consumer_groups are provided on the Consumer object and on the Realm, the Consumer will be placed in all defined consumer groups.
    createdAt String
    An ISO-8601 timestamp representation of entity creation date.
    forceDestroy String
    name String
    negativeTtl Double
    If a running Gateway triggers a lookup for a Consumer that cannot be authenticated this realm, a negative_ttl is set. The Gateway will not try to lookup the Consumer in Konnect for negative_ttl minutes.
    ttl Double
    The time in minutes that the Consumer will be cached in memory on a running Gateway if it is successfully loaded from Konnect. Default: 10
    updatedAt String
    An ISO-8601 timestamp representation of entity update date.
    allowAllControlPlanes boolean
    Allow all control planes to use the realm. When this value is set it takes precedence on allowed_control_planes.
    allowedControlPlanes string[]
    List of control plane ids that are allowed to use the realm. This is used when allow_all_control_planes value is set to false.
    consumerGroups string[]
    A list of consumer groups to automatically add to any consumers created within this Realm. If consumer_groups are provided on the Consumer object and on the Realm, the Consumer will be placed in all defined consumer groups.
    createdAt string
    An ISO-8601 timestamp representation of entity creation date.
    forceDestroy string
    name string
    negativeTtl number
    If a running Gateway triggers a lookup for a Consumer that cannot be authenticated this realm, a negative_ttl is set. The Gateway will not try to lookup the Consumer in Konnect for negative_ttl minutes.
    ttl number
    The time in minutes that the Consumer will be cached in memory on a running Gateway if it is successfully loaded from Konnect. Default: 10
    updatedAt string
    An ISO-8601 timestamp representation of entity update date.
    allow_all_control_planes bool
    Allow all control planes to use the realm. When this value is set it takes precedence on allowed_control_planes.
    allowed_control_planes Sequence[str]
    List of control plane ids that are allowed to use the realm. This is used when allow_all_control_planes value is set to false.
    consumer_groups Sequence[str]
    A list of consumer groups to automatically add to any consumers created within this Realm. If consumer_groups are provided on the Consumer object and on the Realm, the Consumer will be placed in all defined consumer groups.
    created_at str
    An ISO-8601 timestamp representation of entity creation date.
    force_destroy str
    name str
    negative_ttl float
    If a running Gateway triggers a lookup for a Consumer that cannot be authenticated this realm, a negative_ttl is set. The Gateway will not try to lookup the Consumer in Konnect for negative_ttl minutes.
    ttl float
    The time in minutes that the Consumer will be cached in memory on a running Gateway if it is successfully loaded from Konnect. Default: 10
    updated_at str
    An ISO-8601 timestamp representation of entity update date.
    allowAllControlPlanes Boolean
    Allow all control planes to use the realm. When this value is set it takes precedence on allowed_control_planes.
    allowedControlPlanes List<String>
    List of control plane ids that are allowed to use the realm. This is used when allow_all_control_planes value is set to false.
    consumerGroups List<String>
    A list of consumer groups to automatically add to any consumers created within this Realm. If consumer_groups are provided on the Consumer object and on the Realm, the Consumer will be placed in all defined consumer groups.
    createdAt String
    An ISO-8601 timestamp representation of entity creation date.
    forceDestroy String
    name String
    negativeTtl Number
    If a running Gateway triggers a lookup for a Consumer that cannot be authenticated this realm, a negative_ttl is set. The Gateway will not try to lookup the Consumer in Konnect for negative_ttl minutes.
    ttl Number
    The time in minutes that the Consumer will be cached in memory on a running Gateway if it is successfully loaded from Konnect. Default: 10
    updatedAt String
    An ISO-8601 timestamp representation of entity update date.

    Import

    $ pulumi import konnect:index/realm:Realm my_konnect_realm ""
    

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

    Package Details

    Repository
    konnect kong/terraform-provider-konnect
    License
    Notes
    This Pulumi package is based on the konnect Terraform Provider.
    konnect logo
    konnect 2.12.0 published on Tuesday, Jul 22, 2025 by kong