1. Packages
  2. Confluent Provider
  3. API Docs
  4. SchemaRegistryClusterMode
Confluent v2.24.0 published on Saturday, Apr 19, 2025 by Pulumi

confluentcloud.SchemaRegistryClusterMode

Explore with Pulumi AI

Example Usage

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

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

const example = new confluentcloud.SchemaRegistryClusterMode("example", {
    schemaRegistryCluster: {
        id: essentials.id,
    },
    restEndpoint: essentials.restEndpoint,
    mode: "READONLY",
    credentials: {
        key: "<Schema Registry API Key for data.confluent_schema_registry_cluster.essentials>",
        secret: "<Schema Registry API Secret for data.confluent_schema_registry_cluster.essentials>",
    },
});
Copy
import pulumi
import pulumi_confluentcloud as confluentcloud

example = confluentcloud.SchemaRegistryClusterMode("example",
    schema_registry_cluster={
        "id": essentials["id"],
    },
    rest_endpoint=essentials["restEndpoint"],
    mode="READONLY",
    credentials={
        "key": "<Schema Registry API Key for data.confluent_schema_registry_cluster.essentials>",
        "secret": "<Schema Registry API Secret for data.confluent_schema_registry_cluster.essentials>",
    })
Copy
package main

import (
	"github.com/pulumi/pulumi-confluentcloud/sdk/v2/go/confluentcloud"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := confluentcloud.NewSchemaRegistryClusterMode(ctx, "example", &confluentcloud.SchemaRegistryClusterModeArgs{
			SchemaRegistryCluster: &confluentcloud.SchemaRegistryClusterModeSchemaRegistryClusterArgs{
				Id: pulumi.Any(essentials.Id),
			},
			RestEndpoint: pulumi.Any(essentials.RestEndpoint),
			Mode:         pulumi.String("READONLY"),
			Credentials: &confluentcloud.SchemaRegistryClusterModeCredentialsArgs{
				Key:    pulumi.String("<Schema Registry API Key for data.confluent_schema_registry_cluster.essentials>"),
				Secret: pulumi.String("<Schema Registry API Secret for data.confluent_schema_registry_cluster.essentials>"),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using ConfluentCloud = Pulumi.ConfluentCloud;

return await Deployment.RunAsync(() => 
{
    var example = new ConfluentCloud.SchemaRegistryClusterMode("example", new()
    {
        SchemaRegistryCluster = new ConfluentCloud.Inputs.SchemaRegistryClusterModeSchemaRegistryClusterArgs
        {
            Id = essentials.Id,
        },
        RestEndpoint = essentials.RestEndpoint,
        Mode = "READONLY",
        Credentials = new ConfluentCloud.Inputs.SchemaRegistryClusterModeCredentialsArgs
        {
            Key = "<Schema Registry API Key for data.confluent_schema_registry_cluster.essentials>",
            Secret = "<Schema Registry API Secret for data.confluent_schema_registry_cluster.essentials>",
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.confluentcloud.SchemaRegistryClusterMode;
import com.pulumi.confluentcloud.SchemaRegistryClusterModeArgs;
import com.pulumi.confluentcloud.inputs.SchemaRegistryClusterModeSchemaRegistryClusterArgs;
import com.pulumi.confluentcloud.inputs.SchemaRegistryClusterModeCredentialsArgs;
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 example = new SchemaRegistryClusterMode("example", SchemaRegistryClusterModeArgs.builder()
            .schemaRegistryCluster(SchemaRegistryClusterModeSchemaRegistryClusterArgs.builder()
                .id(essentials.id())
                .build())
            .restEndpoint(essentials.restEndpoint())
            .mode("READONLY")
            .credentials(SchemaRegistryClusterModeCredentialsArgs.builder()
                .key("<Schema Registry API Key for data.confluent_schema_registry_cluster.essentials>")
                .secret("<Schema Registry API Secret for data.confluent_schema_registry_cluster.essentials>")
                .build())
            .build());

    }
}
Copy
resources:
  example:
    type: confluentcloud:SchemaRegistryClusterMode
    properties:
      schemaRegistryCluster:
        id: ${essentials.id}
      restEndpoint: ${essentials.restEndpoint}
      mode: READONLY
      credentials:
        key: <Schema Registry API Key for data.confluent_schema_registry_cluster.essentials>
        secret: <Schema Registry API Secret for data.confluent_schema_registry_cluster.essentials>
Copy

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

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

const example = new confluentcloud.SchemaRegistryClusterMode("example", {mode: "READONLY"});
Copy
import pulumi
import pulumi_confluentcloud as confluentcloud

example = confluentcloud.SchemaRegistryClusterMode("example", mode="READONLY")
Copy
package main

import (
	"github.com/pulumi/pulumi-confluentcloud/sdk/v2/go/confluentcloud"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := confluentcloud.NewSchemaRegistryClusterMode(ctx, "example", &confluentcloud.SchemaRegistryClusterModeArgs{
			Mode: pulumi.String("READONLY"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using ConfluentCloud = Pulumi.ConfluentCloud;

return await Deployment.RunAsync(() => 
{
    var example = new ConfluentCloud.SchemaRegistryClusterMode("example", new()
    {
        Mode = "READONLY",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.confluentcloud.SchemaRegistryClusterMode;
import com.pulumi.confluentcloud.SchemaRegistryClusterModeArgs;
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 example = new SchemaRegistryClusterMode("example", SchemaRegistryClusterModeArgs.builder()
            .mode("READONLY")
            .build());

    }
}
Copy
resources:
  example:
    type: confluentcloud:SchemaRegistryClusterMode
    properties:
      mode: READONLY
Copy

Create SchemaRegistryClusterMode Resource

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

Constructor syntax

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

@overload
def SchemaRegistryClusterMode(resource_name: str,
                              opts: Optional[ResourceOptions] = None,
                              credentials: Optional[SchemaRegistryClusterModeCredentialsArgs] = None,
                              mode: Optional[str] = None,
                              rest_endpoint: Optional[str] = None,
                              schema_registry_cluster: Optional[SchemaRegistryClusterModeSchemaRegistryClusterArgs] = None)
func NewSchemaRegistryClusterMode(ctx *Context, name string, args *SchemaRegistryClusterModeArgs, opts ...ResourceOption) (*SchemaRegistryClusterMode, error)
public SchemaRegistryClusterMode(string name, SchemaRegistryClusterModeArgs? args = null, CustomResourceOptions? opts = null)
public SchemaRegistryClusterMode(String name, SchemaRegistryClusterModeArgs args)
public SchemaRegistryClusterMode(String name, SchemaRegistryClusterModeArgs args, CustomResourceOptions options)
type: confluentcloud:SchemaRegistryClusterMode
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 SchemaRegistryClusterModeArgs
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 SchemaRegistryClusterModeArgs
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 SchemaRegistryClusterModeArgs
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 SchemaRegistryClusterModeArgs
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. SchemaRegistryClusterModeArgs
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 schemaRegistryClusterModeResource = new ConfluentCloud.SchemaRegistryClusterMode("schemaRegistryClusterModeResource", new()
{
    Credentials = new ConfluentCloud.Inputs.SchemaRegistryClusterModeCredentialsArgs
    {
        Key = "string",
        Secret = "string",
    },
    Mode = "string",
    RestEndpoint = "string",
    SchemaRegistryCluster = new ConfluentCloud.Inputs.SchemaRegistryClusterModeSchemaRegistryClusterArgs
    {
        Id = "string",
    },
});
Copy
example, err := confluentcloud.NewSchemaRegistryClusterMode(ctx, "schemaRegistryClusterModeResource", &confluentcloud.SchemaRegistryClusterModeArgs{
	Credentials: &confluentcloud.SchemaRegistryClusterModeCredentialsArgs{
		Key:    pulumi.String("string"),
		Secret: pulumi.String("string"),
	},
	Mode:         pulumi.String("string"),
	RestEndpoint: pulumi.String("string"),
	SchemaRegistryCluster: &confluentcloud.SchemaRegistryClusterModeSchemaRegistryClusterArgs{
		Id: pulumi.String("string"),
	},
})
Copy
var schemaRegistryClusterModeResource = new SchemaRegistryClusterMode("schemaRegistryClusterModeResource", SchemaRegistryClusterModeArgs.builder()
    .credentials(SchemaRegistryClusterModeCredentialsArgs.builder()
        .key("string")
        .secret("string")
        .build())
    .mode("string")
    .restEndpoint("string")
    .schemaRegistryCluster(SchemaRegistryClusterModeSchemaRegistryClusterArgs.builder()
        .id("string")
        .build())
    .build());
Copy
schema_registry_cluster_mode_resource = confluentcloud.SchemaRegistryClusterMode("schemaRegistryClusterModeResource",
    credentials={
        "key": "string",
        "secret": "string",
    },
    mode="string",
    rest_endpoint="string",
    schema_registry_cluster={
        "id": "string",
    })
Copy
const schemaRegistryClusterModeResource = new confluentcloud.SchemaRegistryClusterMode("schemaRegistryClusterModeResource", {
    credentials: {
        key: "string",
        secret: "string",
    },
    mode: "string",
    restEndpoint: "string",
    schemaRegistryCluster: {
        id: "string",
    },
});
Copy
type: confluentcloud:SchemaRegistryClusterMode
properties:
    credentials:
        key: string
        secret: string
    mode: string
    restEndpoint: string
    schemaRegistryCluster:
        id: string
Copy

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

Credentials Pulumi.ConfluentCloud.Inputs.SchemaRegistryClusterModeCredentials
The Cluster API Credentials.
Mode string
The global Schema Registry mode. Accepted values are: READWRITE, READONLY, READONLY_OVERRIDE, and IMPORT.
RestEndpoint Changes to this property will trigger replacement. string
The REST endpoint of the Schema Registry cluster, for example, https://psrc-00000.us-central1.gcp.confluent.cloud:443).
SchemaRegistryCluster Changes to this property will trigger replacement. Pulumi.ConfluentCloud.Inputs.SchemaRegistryClusterModeSchemaRegistryCluster
Credentials SchemaRegistryClusterModeCredentialsArgs
The Cluster API Credentials.
Mode string
The global Schema Registry mode. Accepted values are: READWRITE, READONLY, READONLY_OVERRIDE, and IMPORT.
RestEndpoint Changes to this property will trigger replacement. string
The REST endpoint of the Schema Registry cluster, for example, https://psrc-00000.us-central1.gcp.confluent.cloud:443).
SchemaRegistryCluster Changes to this property will trigger replacement. SchemaRegistryClusterModeSchemaRegistryClusterArgs
credentials SchemaRegistryClusterModeCredentials
The Cluster API Credentials.
mode String
The global Schema Registry mode. Accepted values are: READWRITE, READONLY, READONLY_OVERRIDE, and IMPORT.
restEndpoint Changes to this property will trigger replacement. String
The REST endpoint of the Schema Registry cluster, for example, https://psrc-00000.us-central1.gcp.confluent.cloud:443).
schemaRegistryCluster Changes to this property will trigger replacement. SchemaRegistryClusterModeSchemaRegistryCluster
credentials SchemaRegistryClusterModeCredentials
The Cluster API Credentials.
mode string
The global Schema Registry mode. Accepted values are: READWRITE, READONLY, READONLY_OVERRIDE, and IMPORT.
restEndpoint Changes to this property will trigger replacement. string
The REST endpoint of the Schema Registry cluster, for example, https://psrc-00000.us-central1.gcp.confluent.cloud:443).
schemaRegistryCluster Changes to this property will trigger replacement. SchemaRegistryClusterModeSchemaRegistryCluster
credentials SchemaRegistryClusterModeCredentialsArgs
The Cluster API Credentials.
mode str
The global Schema Registry mode. Accepted values are: READWRITE, READONLY, READONLY_OVERRIDE, and IMPORT.
rest_endpoint Changes to this property will trigger replacement. str
The REST endpoint of the Schema Registry cluster, for example, https://psrc-00000.us-central1.gcp.confluent.cloud:443).
schema_registry_cluster Changes to this property will trigger replacement. SchemaRegistryClusterModeSchemaRegistryClusterArgs
credentials Property Map
The Cluster API Credentials.
mode String
The global Schema Registry mode. Accepted values are: READWRITE, READONLY, READONLY_OVERRIDE, and IMPORT.
restEndpoint Changes to this property will trigger replacement. String
The REST endpoint of the Schema Registry cluster, for example, https://psrc-00000.us-central1.gcp.confluent.cloud:443).
schemaRegistryCluster Changes to this property will trigger replacement. Property Map

Outputs

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

Get an existing SchemaRegistryClusterMode 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?: SchemaRegistryClusterModeState, opts?: CustomResourceOptions): SchemaRegistryClusterMode
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        credentials: Optional[SchemaRegistryClusterModeCredentialsArgs] = None,
        mode: Optional[str] = None,
        rest_endpoint: Optional[str] = None,
        schema_registry_cluster: Optional[SchemaRegistryClusterModeSchemaRegistryClusterArgs] = None) -> SchemaRegistryClusterMode
func GetSchemaRegistryClusterMode(ctx *Context, name string, id IDInput, state *SchemaRegistryClusterModeState, opts ...ResourceOption) (*SchemaRegistryClusterMode, error)
public static SchemaRegistryClusterMode Get(string name, Input<string> id, SchemaRegistryClusterModeState? state, CustomResourceOptions? opts = null)
public static SchemaRegistryClusterMode get(String name, Output<String> id, SchemaRegistryClusterModeState state, CustomResourceOptions options)
resources:  _:    type: confluentcloud:SchemaRegistryClusterMode    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:
Credentials Pulumi.ConfluentCloud.Inputs.SchemaRegistryClusterModeCredentials
The Cluster API Credentials.
Mode string
The global Schema Registry mode. Accepted values are: READWRITE, READONLY, READONLY_OVERRIDE, and IMPORT.
RestEndpoint Changes to this property will trigger replacement. string
The REST endpoint of the Schema Registry cluster, for example, https://psrc-00000.us-central1.gcp.confluent.cloud:443).
SchemaRegistryCluster Changes to this property will trigger replacement. Pulumi.ConfluentCloud.Inputs.SchemaRegistryClusterModeSchemaRegistryCluster
Credentials SchemaRegistryClusterModeCredentialsArgs
The Cluster API Credentials.
Mode string
The global Schema Registry mode. Accepted values are: READWRITE, READONLY, READONLY_OVERRIDE, and IMPORT.
RestEndpoint Changes to this property will trigger replacement. string
The REST endpoint of the Schema Registry cluster, for example, https://psrc-00000.us-central1.gcp.confluent.cloud:443).
SchemaRegistryCluster Changes to this property will trigger replacement. SchemaRegistryClusterModeSchemaRegistryClusterArgs
credentials SchemaRegistryClusterModeCredentials
The Cluster API Credentials.
mode String
The global Schema Registry mode. Accepted values are: READWRITE, READONLY, READONLY_OVERRIDE, and IMPORT.
restEndpoint Changes to this property will trigger replacement. String
The REST endpoint of the Schema Registry cluster, for example, https://psrc-00000.us-central1.gcp.confluent.cloud:443).
schemaRegistryCluster Changes to this property will trigger replacement. SchemaRegistryClusterModeSchemaRegistryCluster
credentials SchemaRegistryClusterModeCredentials
The Cluster API Credentials.
mode string
The global Schema Registry mode. Accepted values are: READWRITE, READONLY, READONLY_OVERRIDE, and IMPORT.
restEndpoint Changes to this property will trigger replacement. string
The REST endpoint of the Schema Registry cluster, for example, https://psrc-00000.us-central1.gcp.confluent.cloud:443).
schemaRegistryCluster Changes to this property will trigger replacement. SchemaRegistryClusterModeSchemaRegistryCluster
credentials SchemaRegistryClusterModeCredentialsArgs
The Cluster API Credentials.
mode str
The global Schema Registry mode. Accepted values are: READWRITE, READONLY, READONLY_OVERRIDE, and IMPORT.
rest_endpoint Changes to this property will trigger replacement. str
The REST endpoint of the Schema Registry cluster, for example, https://psrc-00000.us-central1.gcp.confluent.cloud:443).
schema_registry_cluster Changes to this property will trigger replacement. SchemaRegistryClusterModeSchemaRegistryClusterArgs
credentials Property Map
The Cluster API Credentials.
mode String
The global Schema Registry mode. Accepted values are: READWRITE, READONLY, READONLY_OVERRIDE, and IMPORT.
restEndpoint Changes to this property will trigger replacement. String
The REST endpoint of the Schema Registry cluster, for example, https://psrc-00000.us-central1.gcp.confluent.cloud:443).
schemaRegistryCluster Changes to this property will trigger replacement. Property Map

Supporting Types

SchemaRegistryClusterModeCredentials
, SchemaRegistryClusterModeCredentialsArgs

Key This property is required. string
The Schema Registry API Key.
Secret This property is required. string
The Cluster API Secret for your Confluent Cloud cluster.
Key This property is required. string
The Schema Registry API Key.
Secret This property is required. string
The Cluster API Secret for your Confluent Cloud cluster.
key This property is required. String
The Schema Registry API Key.
secret This property is required. String
The Cluster API Secret for your Confluent Cloud cluster.
key This property is required. string
The Schema Registry API Key.
secret This property is required. string
The Cluster API Secret for your Confluent Cloud cluster.
key This property is required. str
The Schema Registry API Key.
secret This property is required. str
The Cluster API Secret for your Confluent Cloud cluster.
key This property is required. String
The Schema Registry API Key.
secret This property is required. String
The Cluster API Secret for your Confluent Cloud cluster.

SchemaRegistryClusterModeSchemaRegistryCluster
, SchemaRegistryClusterModeSchemaRegistryClusterArgs

Id
This property is required.
Changes to this property will trigger replacement.
string
The ID of the Schema Registry cluster, for example, lsrc-abc123.
Id
This property is required.
Changes to this property will trigger replacement.
string
The ID of the Schema Registry cluster, for example, lsrc-abc123.
id
This property is required.
Changes to this property will trigger replacement.
String
The ID of the Schema Registry cluster, for example, lsrc-abc123.
id
This property is required.
Changes to this property will trigger replacement.
string
The ID of the Schema Registry cluster, for example, lsrc-abc123.
id
This property is required.
Changes to this property will trigger replacement.
str
The ID of the Schema Registry cluster, for example, lsrc-abc123.
id
This property is required.
Changes to this property will trigger replacement.
String
The ID of the Schema Registry cluster, for example, lsrc-abc123.

Import

You can import a Mode by using the Schema Registry cluster ID, Subject name in the format <Schema Registry cluster ID>, for example:

$ export IMPORT_SCHEMA_REGISTRY_API_KEY="<schema_registry_api_key>"

$ export IMPORT_SCHEMA_REGISTRY_API_SECRET="<schema_registry_api_secret>"

$ export IMPORT_SCHEMA_REGISTRY_REST_ENDPOINT="<schema_registry_rest_endpoint>"

$ pulumi import confluentcloud:index/schemaRegistryClusterMode:SchemaRegistryClusterMode example lsrc-abc123
Copy

!> Warning: Do not forget to delete terminal command history afterwards for security purposes.

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

Package Details

Repository
Confluent Cloud pulumi/pulumi-confluentcloud
License
Apache-2.0
Notes
This Pulumi package is based on the confluent Terraform Provider.