1. Packages
  2. Confluent Provider
  3. API Docs
  4. getSubjectConfig
Confluent v2.58.0 published on Tuesday, Feb 10, 2026 by Pulumi
confluentcloud logo
Confluent v2.58.0 published on Tuesday, Feb 10, 2026 by Pulumi

    General Availability

    confluent_subject_compatibility_level describes a Subject Config data source.

    Example Usage

    Option #1: Manage multiple Schema Registry clusters in the same Pulumi Stack

    import * as pulumi from "@pulumi/pulumi";
    import * as confluent from "@pulumi/confluent";
    
    const example = confluent.index.SubjectCompatibilityLevel({
        schemaRegistryCluster: [{
            id: essentials.id,
        }],
        restEndpoint: essentials.restEndpoint,
        subjectName: "proto-purchase-value",
        credentials: [{
            key: "<Schema Registry API Key for confluent_schema_registry_region.essentials>",
            secret: "<Schema Registry API Secret for confluent_schema_registry_region.essentials>",
        }],
    });
    export const compatibilityLevel = example.compatibilityLevel;
    
    import pulumi
    import pulumi_confluent as confluent
    
    example = confluent.index.subject_compatibility_level(schema_registry_cluster=[{
            "id": essentials["id"],
        }],
        rest_endpoint=essentials["restEndpoint"],
        subject_name="proto-purchase-value",
        credentials=[{
            "key": "<Schema Registry API Key for confluent_schema_registry_region.essentials>",
            "secret": "<Schema Registry API Secret for confluent_schema_registry_region.essentials>",
        }])
    pulumi.export("compatibilityLevel", example["compatibilityLevel"])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-confluent/sdk/go/confluent"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		example, err := confluent.SubjectCompatibilityLevel(ctx, map[string]interface{}{
    			"schemaRegistryCluster": []map[string]interface{}{
    				map[string]interface{}{
    					"id": essentials.Id,
    				},
    			},
    			"restEndpoint": essentials.RestEndpoint,
    			"subjectName":  "proto-purchase-value",
    			"credentials": []map[string]interface{}{
    				map[string]interface{}{
    					"key":    "<Schema Registry API Key for confluent_schema_registry_region.essentials>",
    					"secret": "<Schema Registry API Secret for confluent_schema_registry_region.essentials>",
    				},
    			},
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("compatibilityLevel", example.CompatibilityLevel)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Confluent = Pulumi.Confluent;
    
    return await Deployment.RunAsync(() => 
    {
        var example = Confluent.Index.SubjectCompatibilityLevel.Invoke(new()
        {
            SchemaRegistryCluster = new[]
            {
                
                {
                    { "id", essentials.Id },
                },
            },
            RestEndpoint = essentials.RestEndpoint,
            SubjectName = "proto-purchase-value",
            Credentials = new[]
            {
                
                {
                    { "key", "<Schema Registry API Key for confluent_schema_registry_region.essentials>" },
                    { "secret", "<Schema Registry API Secret for confluent_schema_registry_region.essentials>" },
                },
            },
        });
    
        return new Dictionary<string, object?>
        {
            ["compatibilityLevel"] = example.CompatibilityLevel,
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.confluent.ConfluentFunctions;
    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) {
            final var example = ConfluentFunctions.SubjectCompatibilityLevel(Map.ofEntries(
                Map.entry("schemaRegistryCluster", List.of(Map.of("id", essentials.id()))),
                Map.entry("restEndpoint", essentials.restEndpoint()),
                Map.entry("subjectName", "proto-purchase-value"),
                Map.entry("credentials", List.of(Map.ofEntries(
                    Map.entry("key", "<Schema Registry API Key for confluent_schema_registry_region.essentials>"),
                    Map.entry("secret", "<Schema Registry API Secret for confluent_schema_registry_region.essentials>")
                )))
            ));
    
            ctx.export("compatibilityLevel", example.compatibilityLevel());
        }
    }
    
    variables:
      example:
        fn::invoke:
          function: confluent:SubjectCompatibilityLevel
          arguments:
            schemaRegistryCluster:
              - id: ${essentials.id}
            restEndpoint: ${essentials.restEndpoint}
            subjectName: proto-purchase-value
            credentials:
              - key: <Schema Registry API Key for confluent_schema_registry_region.essentials>
                secret: <Schema Registry API Secret for confluent_schema_registry_region.essentials>
    outputs:
      compatibilityLevel: ${example.compatibilityLevel}
    

    Option #2: Manage a single Schema Registry cluster in the same Pulumi Stack

    import * as pulumi from "@pulumi/pulumi";
    import * as confluent from "@pulumi/confluent";
    
    const example = confluent.index.SubjectCompatibilityLevel({
        subjectName: "proto-purchase-value",
    });
    export const compatibilityLevel = example.compatibilityLevel;
    
    import pulumi
    import pulumi_confluent as confluent
    
    example = confluent.index.subject_compatibility_level(subject_name="proto-purchase-value")
    pulumi.export("compatibilityLevel", example["compatibilityLevel"])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-confluent/sdk/go/confluent"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		example, err := confluent.SubjectCompatibilityLevel(ctx, map[string]interface{}{
    			"subjectName": "proto-purchase-value",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("compatibilityLevel", example.CompatibilityLevel)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Confluent = Pulumi.Confluent;
    
    return await Deployment.RunAsync(() => 
    {
        var example = Confluent.Index.SubjectCompatibilityLevel.Invoke(new()
        {
            SubjectName = "proto-purchase-value",
        });
    
        return new Dictionary<string, object?>
        {
            ["compatibilityLevel"] = example.CompatibilityLevel,
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.confluent.ConfluentFunctions;
    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) {
            final var example = ConfluentFunctions.SubjectCompatibilityLevel(Map.of("subjectName", "proto-purchase-value"));
    
            ctx.export("compatibilityLevel", example.compatibilityLevel());
        }
    }
    
    variables:
      example:
        fn::invoke:
          function: confluent:SubjectCompatibilityLevel
          arguments:
            subjectName: proto-purchase-value
    outputs:
      compatibilityLevel: ${example.compatibilityLevel}
    

    Using getSubjectConfig

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getSubjectConfig(args: GetSubjectConfigArgs, opts?: InvokeOptions): Promise<GetSubjectConfigResult>
    function getSubjectConfigOutput(args: GetSubjectConfigOutputArgs, opts?: InvokeOptions): Output<GetSubjectConfigResult>
    def get_subject_config(credentials: Optional[GetSubjectConfigCredentials] = None,
                           rest_endpoint: Optional[str] = None,
                           schema_registry_cluster: Optional[GetSubjectConfigSchemaRegistryCluster] = None,
                           subject_name: Optional[str] = None,
                           opts: Optional[InvokeOptions] = None) -> GetSubjectConfigResult
    def get_subject_config_output(credentials: Optional[pulumi.Input[GetSubjectConfigCredentialsArgs]] = None,
                           rest_endpoint: Optional[pulumi.Input[str]] = None,
                           schema_registry_cluster: Optional[pulumi.Input[GetSubjectConfigSchemaRegistryClusterArgs]] = None,
                           subject_name: Optional[pulumi.Input[str]] = None,
                           opts: Optional[InvokeOptions] = None) -> Output[GetSubjectConfigResult]
    func LookupSubjectConfig(ctx *Context, args *LookupSubjectConfigArgs, opts ...InvokeOption) (*LookupSubjectConfigResult, error)
    func LookupSubjectConfigOutput(ctx *Context, args *LookupSubjectConfigOutputArgs, opts ...InvokeOption) LookupSubjectConfigResultOutput

    > Note: This function is named LookupSubjectConfig in the Go SDK.

    public static class GetSubjectConfig 
    {
        public static Task<GetSubjectConfigResult> InvokeAsync(GetSubjectConfigArgs args, InvokeOptions? opts = null)
        public static Output<GetSubjectConfigResult> Invoke(GetSubjectConfigInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetSubjectConfigResult> getSubjectConfig(GetSubjectConfigArgs args, InvokeOptions options)
    public static Output<GetSubjectConfigResult> getSubjectConfig(GetSubjectConfigArgs args, InvokeOptions options)
    
    fn::invoke:
      function: confluentcloud:index/getSubjectConfig:getSubjectConfig
      arguments:
        # arguments dictionary

    The following arguments are supported:

    SubjectName string
    The name of the subject (in other words, the namespace), representing the subject under which the schema will be registered, for example, test-subject.
    Credentials Pulumi.ConfluentCloud.Inputs.GetSubjectConfigCredentials
    RestEndpoint string
    The REST endpoint of the Schema Registry cluster, for example, https://psrc-00000.us-central1.gcp.confluent.cloud:443).
    SchemaRegistryCluster Pulumi.ConfluentCloud.Inputs.GetSubjectConfigSchemaRegistryCluster
    SubjectName string
    The name of the subject (in other words, the namespace), representing the subject under which the schema will be registered, for example, test-subject.
    Credentials GetSubjectConfigCredentials
    RestEndpoint string
    The REST endpoint of the Schema Registry cluster, for example, https://psrc-00000.us-central1.gcp.confluent.cloud:443).
    SchemaRegistryCluster GetSubjectConfigSchemaRegistryCluster
    subjectName String
    The name of the subject (in other words, the namespace), representing the subject under which the schema will be registered, for example, test-subject.
    credentials GetSubjectConfigCredentials
    restEndpoint String
    The REST endpoint of the Schema Registry cluster, for example, https://psrc-00000.us-central1.gcp.confluent.cloud:443).
    schemaRegistryCluster GetSubjectConfigSchemaRegistryCluster
    subjectName string
    The name of the subject (in other words, the namespace), representing the subject under which the schema will be registered, for example, test-subject.
    credentials GetSubjectConfigCredentials
    restEndpoint string
    The REST endpoint of the Schema Registry cluster, for example, https://psrc-00000.us-central1.gcp.confluent.cloud:443).
    schemaRegistryCluster GetSubjectConfigSchemaRegistryCluster
    subject_name str
    The name of the subject (in other words, the namespace), representing the subject under which the schema will be registered, for example, test-subject.
    credentials GetSubjectConfigCredentials
    rest_endpoint str
    The REST endpoint of the Schema Registry cluster, for example, https://psrc-00000.us-central1.gcp.confluent.cloud:443).
    schema_registry_cluster GetSubjectConfigSchemaRegistryCluster
    subjectName String
    The name of the subject (in other words, the namespace), representing the subject under which the schema will be registered, for example, test-subject.
    credentials Property Map
    restEndpoint String
    The REST endpoint of the Schema Registry cluster, for example, https://psrc-00000.us-central1.gcp.confluent.cloud:443).
    schemaRegistryCluster Property Map

    getSubjectConfig Result

    The following output properties are available:

    Alias string
    (Optional String) The subject name that this subject is an alias for.
    CompatibilityGroup string
    (Optional String) The Compatibility Group of the specified subject.
    CompatibilityLevel string
    (Optional String) The Compatibility Level of the specified subject. Accepted values are: BACKWARD, BACKWARD_TRANSITIVE, FORWARD, FORWARD_TRANSITIVE, FULL, FULL_TRANSITIVE, and NONE. See the Compatibility Types for more details.
    Id string
    The provider-assigned unique ID for this managed resource.
    Normalize bool
    (Optional Boolean) Whether schemas are automatically normalized when registered or passed during lookups.
    SubjectName string
    Credentials Pulumi.ConfluentCloud.Outputs.GetSubjectConfigCredentials
    RestEndpoint string
    SchemaRegistryCluster Pulumi.ConfluentCloud.Outputs.GetSubjectConfigSchemaRegistryCluster
    Alias string
    (Optional String) The subject name that this subject is an alias for.
    CompatibilityGroup string
    (Optional String) The Compatibility Group of the specified subject.
    CompatibilityLevel string
    (Optional String) The Compatibility Level of the specified subject. Accepted values are: BACKWARD, BACKWARD_TRANSITIVE, FORWARD, FORWARD_TRANSITIVE, FULL, FULL_TRANSITIVE, and NONE. See the Compatibility Types for more details.
    Id string
    The provider-assigned unique ID for this managed resource.
    Normalize bool
    (Optional Boolean) Whether schemas are automatically normalized when registered or passed during lookups.
    SubjectName string
    Credentials GetSubjectConfigCredentials
    RestEndpoint string
    SchemaRegistryCluster GetSubjectConfigSchemaRegistryCluster
    alias String
    (Optional String) The subject name that this subject is an alias for.
    compatibilityGroup String
    (Optional String) The Compatibility Group of the specified subject.
    compatibilityLevel String
    (Optional String) The Compatibility Level of the specified subject. Accepted values are: BACKWARD, BACKWARD_TRANSITIVE, FORWARD, FORWARD_TRANSITIVE, FULL, FULL_TRANSITIVE, and NONE. See the Compatibility Types for more details.
    id String
    The provider-assigned unique ID for this managed resource.
    normalize Boolean
    (Optional Boolean) Whether schemas are automatically normalized when registered or passed during lookups.
    subjectName String
    credentials GetSubjectConfigCredentials
    restEndpoint String
    schemaRegistryCluster GetSubjectConfigSchemaRegistryCluster
    alias string
    (Optional String) The subject name that this subject is an alias for.
    compatibilityGroup string
    (Optional String) The Compatibility Group of the specified subject.
    compatibilityLevel string
    (Optional String) The Compatibility Level of the specified subject. Accepted values are: BACKWARD, BACKWARD_TRANSITIVE, FORWARD, FORWARD_TRANSITIVE, FULL, FULL_TRANSITIVE, and NONE. See the Compatibility Types for more details.
    id string
    The provider-assigned unique ID for this managed resource.
    normalize boolean
    (Optional Boolean) Whether schemas are automatically normalized when registered or passed during lookups.
    subjectName string
    credentials GetSubjectConfigCredentials
    restEndpoint string
    schemaRegistryCluster GetSubjectConfigSchemaRegistryCluster
    alias str
    (Optional String) The subject name that this subject is an alias for.
    compatibility_group str
    (Optional String) The Compatibility Group of the specified subject.
    compatibility_level str
    (Optional String) The Compatibility Level of the specified subject. Accepted values are: BACKWARD, BACKWARD_TRANSITIVE, FORWARD, FORWARD_TRANSITIVE, FULL, FULL_TRANSITIVE, and NONE. See the Compatibility Types for more details.
    id str
    The provider-assigned unique ID for this managed resource.
    normalize bool
    (Optional Boolean) Whether schemas are automatically normalized when registered or passed during lookups.
    subject_name str
    credentials GetSubjectConfigCredentials
    rest_endpoint str
    schema_registry_cluster GetSubjectConfigSchemaRegistryCluster
    alias String
    (Optional String) The subject name that this subject is an alias for.
    compatibilityGroup String
    (Optional String) The Compatibility Group of the specified subject.
    compatibilityLevel String
    (Optional String) The Compatibility Level of the specified subject. Accepted values are: BACKWARD, BACKWARD_TRANSITIVE, FORWARD, FORWARD_TRANSITIVE, FULL, FULL_TRANSITIVE, and NONE. See the Compatibility Types for more details.
    id String
    The provider-assigned unique ID for this managed resource.
    normalize Boolean
    (Optional Boolean) Whether schemas are automatically normalized when registered or passed during lookups.
    subjectName String
    credentials Property Map
    restEndpoint String
    schemaRegistryCluster Property Map

    Supporting Types

    GetSubjectConfigCredentials

    Key string
    The Schema Registry API Key.
    Secret string
    The Schema Registry API Secret.
    Key string
    The Schema Registry API Key.
    Secret string
    The Schema Registry API Secret.
    key String
    The Schema Registry API Key.
    secret String
    The Schema Registry API Secret.
    key string
    The Schema Registry API Key.
    secret string
    The Schema Registry API Secret.
    key str
    The Schema Registry API Key.
    secret str
    The Schema Registry API Secret.
    key String
    The Schema Registry API Key.
    secret String
    The Schema Registry API Secret.

    GetSubjectConfigSchemaRegistryCluster

    Id string
    The ID of the Schema Registry cluster, for example, lsrc-abc123.
    Id string
    The ID of the Schema Registry cluster, for example, lsrc-abc123.
    id String
    The ID of the Schema Registry cluster, for example, lsrc-abc123.
    id string
    The ID of the Schema Registry cluster, for example, lsrc-abc123.
    id str
    The ID of the Schema Registry cluster, for example, lsrc-abc123.
    id String
    The ID of the Schema Registry cluster, for example, lsrc-abc123.

    Package Details

    Repository
    Confluent Cloud pulumi/pulumi-confluentcloud
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the confluent Terraform Provider.
    confluentcloud logo
    Confluent v2.58.0 published on Tuesday, Feb 10, 2026 by Pulumi
      Meet Neo: Your AI Platform Teammate