published on Wednesday, Jun 3, 2026 by redpanda-data
published on Wednesday, Jun 3, 2026 by redpanda-data
Import
Schemas can be imported using a comma-separated string. Two forms are supported:
Bearer auth (default):
cluster_id,subject,version
Basic auth (optional, when explicit SASL credentials are needed):
cluster_id,subject,version,username,password
Example imports:
Import via Bearer auth (default) — no username or password required
$ pulumi import redpanda:index/schema:Schema example "cluster-123,user-value,1"
Import via Bearer auth with a complex subject name (colons are valid in subject names)
$ pulumi import redpanda:index/schema:Schema product "cluster-456,com.example:Product-v2,5"
Import via Basic auth with explicit SASL credentials
$ pulumi import redpanda:index/schema:Schema initial "cluster-789,test-subject,0,svc_account,p@ssw0rd"
For Basic auth, the password can also be supplied via the REDPANDA_IMPORT_PASSWORD environment variable instead of placing it in the import ID.
Create Schema Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Schema(name: string, args: SchemaArgs, opts?: CustomResourceOptions);@overload
def Schema(resource_name: str,
args: SchemaArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Schema(resource_name: str,
opts: Optional[ResourceOptions] = None,
cluster_id: Optional[str] = None,
schema: Optional[str] = None,
subject: Optional[str] = None,
allow_deletion: Optional[bool] = None,
compatibility: Optional[str] = None,
password: Optional[str] = None,
password_wo: Optional[str] = None,
password_wo_version: Optional[float] = None,
references: Optional[Sequence[SchemaReferenceArgs]] = None,
schema_type: Optional[str] = None,
username: Optional[str] = None)func NewSchema(ctx *Context, name string, args SchemaArgs, opts ...ResourceOption) (*Schema, error)public Schema(string name, SchemaArgs args, CustomResourceOptions? opts = null)
public Schema(String name, SchemaArgs args)
public Schema(String name, SchemaArgs args, CustomResourceOptions options)
type: redpanda:Schema
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
resource "redpanda_schema" "name" {
# resource properties
}Parameters
- name string
- The unique name of the resource.
- args SchemaArgs
- 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 SchemaArgs
- 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 SchemaArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args SchemaArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args SchemaArgs
- 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 schemaResource = new Redpanda.Schema("schemaResource", new()
{
ClusterId = "string",
Schema = "string",
Subject = "string",
AllowDeletion = false,
Compatibility = "string",
Password = "string",
References = new[]
{
new Redpanda.Inputs.SchemaReferenceArgs
{
Name = "string",
Subject = "string",
Version = 0,
},
},
SchemaType = "string",
Username = "string",
});
example, err := redpanda.NewSchema(ctx, "schemaResource", &redpanda.SchemaArgs{
ClusterId: pulumi.String("string"),
Schema: pulumi.String("string"),
Subject: pulumi.String("string"),
AllowDeletion: pulumi.Bool(false),
Compatibility: pulumi.String("string"),
Password: pulumi.String("string"),
References: redpanda.SchemaReferenceArray{
&redpanda.SchemaReferenceArgs{
Name: pulumi.String("string"),
Subject: pulumi.String("string"),
Version: pulumi.Float64(0),
},
},
SchemaType: pulumi.String("string"),
Username: pulumi.String("string"),
})
resource "redpanda_schema" "schemaResource" {
cluster_id = "string"
schema = "string"
subject = "string"
allow_deletion = false
compatibility = "string"
password = "string"
references {
name = "string"
subject = "string"
version = 0
}
schema_type = "string"
username = "string"
}
var schemaResource = new Schema("schemaResource", SchemaArgs.builder()
.clusterId("string")
.schema("string")
.subject("string")
.allowDeletion(false)
.compatibility("string")
.password("string")
.references(SchemaReferenceArgs.builder()
.name("string")
.subject("string")
.version(0.0)
.build())
.schemaType("string")
.username("string")
.build());
schema_resource = redpanda.Schema("schemaResource",
cluster_id="string",
schema="string",
subject="string",
allow_deletion=False,
compatibility="string",
password="string",
references=[{
"name": "string",
"subject": "string",
"version": float(0),
}],
schema_type="string",
username="string")
const schemaResource = new redpanda.Schema("schemaResource", {
clusterId: "string",
schema: "string",
subject: "string",
allowDeletion: false,
compatibility: "string",
password: "string",
references: [{
name: "string",
subject: "string",
version: 0,
}],
schemaType: "string",
username: "string",
});
type: redpanda:Schema
properties:
allowDeletion: false
clusterId: string
compatibility: string
password: string
references:
- name: string
subject: string
version: 0
schema: string
schemaType: string
subject: string
username: string
Schema 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 Schema resource accepts the following input properties:
- Cluster
Id string - The ID of the cluster where the schema is stored.
- Schema string
- The schema definition in JSON format.
- Subject string
- The subject name for the schema.
- Allow
Deletion bool - Compatibility string
- The compatibility level for schema evolution (BACKWARD, BACKWARD_TRANSITIVE, FORWARD, FORWARD_TRANSITIVE, FULL, FULL_TRANSITIVE, NONE). Defaults to BACKWARD.
- Password string
- Password
Wo string - Password
Wo doubleVersion - Deprecated. Version counter for password_wo, which is itself deprecated for this resource.
- References
List<Schema
Reference> - List of schema references.
- Schema
Type string - The type of schema (AVRO, JSON, PROTOBUF).
- Username string
- SASL username for Schema Registry HTTP Basic authentication. Optional: when omitted (together with password) the provider authenticates to Schema Registry using its cloud Bearer token. Supply username + password only when you need writes to be attributed to a specific SASL identity (e.g., audit / least-privilege).
- Cluster
Id string - The ID of the cluster where the schema is stored.
- Schema string
- The schema definition in JSON format.
- Subject string
- The subject name for the schema.
- Allow
Deletion bool - Compatibility string
- The compatibility level for schema evolution (BACKWARD, BACKWARD_TRANSITIVE, FORWARD, FORWARD_TRANSITIVE, FULL, FULL_TRANSITIVE, NONE). Defaults to BACKWARD.
- Password string
- Password
Wo string - Password
Wo float64Version - Deprecated. Version counter for password_wo, which is itself deprecated for this resource.
- References
[]Schema
Reference Args - List of schema references.
- Schema
Type string - The type of schema (AVRO, JSON, PROTOBUF).
- Username string
- SASL username for Schema Registry HTTP Basic authentication. Optional: when omitted (together with password) the provider authenticates to Schema Registry using its cloud Bearer token. Supply username + password only when you need writes to be attributed to a specific SASL identity (e.g., audit / least-privilege).
- cluster_
id string - The ID of the cluster where the schema is stored.
- schema string
- The schema definition in JSON format.
- subject string
- The subject name for the schema.
- allow_
deletion bool - compatibility string
- The compatibility level for schema evolution (BACKWARD, BACKWARD_TRANSITIVE, FORWARD, FORWARD_TRANSITIVE, FULL, FULL_TRANSITIVE, NONE). Defaults to BACKWARD.
- password string
- password_
wo string - password_
wo_ numberversion - Deprecated. Version counter for password_wo, which is itself deprecated for this resource.
- references list(object)
- List of schema references.
- schema_
type string - The type of schema (AVRO, JSON, PROTOBUF).
- username string
- SASL username for Schema Registry HTTP Basic authentication. Optional: when omitted (together with password) the provider authenticates to Schema Registry using its cloud Bearer token. Supply username + password only when you need writes to be attributed to a specific SASL identity (e.g., audit / least-privilege).
- cluster
Id String - The ID of the cluster where the schema is stored.
- schema String
- The schema definition in JSON format.
- subject String
- The subject name for the schema.
- allow
Deletion Boolean - compatibility String
- The compatibility level for schema evolution (BACKWARD, BACKWARD_TRANSITIVE, FORWARD, FORWARD_TRANSITIVE, FULL, FULL_TRANSITIVE, NONE). Defaults to BACKWARD.
- password String
- password
Wo String - password
Wo DoubleVersion - Deprecated. Version counter for password_wo, which is itself deprecated for this resource.
- references
List<Schema
Reference> - List of schema references.
- schema
Type String - The type of schema (AVRO, JSON, PROTOBUF).
- username String
- SASL username for Schema Registry HTTP Basic authentication. Optional: when omitted (together with password) the provider authenticates to Schema Registry using its cloud Bearer token. Supply username + password only when you need writes to be attributed to a specific SASL identity (e.g., audit / least-privilege).
- cluster
Id string - The ID of the cluster where the schema is stored.
- schema string
- The schema definition in JSON format.
- subject string
- The subject name for the schema.
- allow
Deletion boolean - compatibility string
- The compatibility level for schema evolution (BACKWARD, BACKWARD_TRANSITIVE, FORWARD, FORWARD_TRANSITIVE, FULL, FULL_TRANSITIVE, NONE). Defaults to BACKWARD.
- password string
- password
Wo string - password
Wo numberVersion - Deprecated. Version counter for password_wo, which is itself deprecated for this resource.
- references
Schema
Reference[] - List of schema references.
- schema
Type string - The type of schema (AVRO, JSON, PROTOBUF).
- username string
- SASL username for Schema Registry HTTP Basic authentication. Optional: when omitted (together with password) the provider authenticates to Schema Registry using its cloud Bearer token. Supply username + password only when you need writes to be attributed to a specific SASL identity (e.g., audit / least-privilege).
- cluster_
id str - The ID of the cluster where the schema is stored.
- schema str
- The schema definition in JSON format.
- subject str
- The subject name for the schema.
- allow_
deletion bool - compatibility str
- The compatibility level for schema evolution (BACKWARD, BACKWARD_TRANSITIVE, FORWARD, FORWARD_TRANSITIVE, FULL, FULL_TRANSITIVE, NONE). Defaults to BACKWARD.
- password str
- password_
wo str - password_
wo_ floatversion - Deprecated. Version counter for password_wo, which is itself deprecated for this resource.
- references
Sequence[Schema
Reference Args] - List of schema references.
- schema_
type str - The type of schema (AVRO, JSON, PROTOBUF).
- username str
- SASL username for Schema Registry HTTP Basic authentication. Optional: when omitted (together with password) the provider authenticates to Schema Registry using its cloud Bearer token. Supply username + password only when you need writes to be attributed to a specific SASL identity (e.g., audit / least-privilege).
- cluster
Id String - The ID of the cluster where the schema is stored.
- schema String
- The schema definition in JSON format.
- subject String
- The subject name for the schema.
- allow
Deletion Boolean - compatibility String
- The compatibility level for schema evolution (BACKWARD, BACKWARD_TRANSITIVE, FORWARD, FORWARD_TRANSITIVE, FULL, FULL_TRANSITIVE, NONE). Defaults to BACKWARD.
- password String
- password
Wo String - password
Wo NumberVersion - Deprecated. Version counter for password_wo, which is itself deprecated for this resource.
- references List<Property Map>
- List of schema references.
- schema
Type String - The type of schema (AVRO, JSON, PROTOBUF).
- username String
- SASL username for Schema Registry HTTP Basic authentication. Optional: when omitted (together with password) the provider authenticates to Schema Registry using its cloud Bearer token. Supply username + password only when you need writes to be attributed to a specific SASL identity (e.g., audit / least-privilege).
Outputs
All input properties are implicitly available as output properties. Additionally, the Schema resource produces the following output properties:
Look up Existing Schema Resource
Get an existing Schema 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?: SchemaState, opts?: CustomResourceOptions): Schema@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
allow_deletion: Optional[bool] = None,
cluster_id: Optional[str] = None,
compatibility: Optional[str] = None,
password: Optional[str] = None,
password_wo: Optional[str] = None,
password_wo_version: Optional[float] = None,
references: Optional[Sequence[SchemaReferenceArgs]] = None,
schema: Optional[str] = None,
schema_id: Optional[float] = None,
schema_type: Optional[str] = None,
subject: Optional[str] = None,
username: Optional[str] = None,
version: Optional[float] = None) -> Schemafunc GetSchema(ctx *Context, name string, id IDInput, state *SchemaState, opts ...ResourceOption) (*Schema, error)public static Schema Get(string name, Input<string> id, SchemaState? state, CustomResourceOptions? opts = null)public static Schema get(String name, Output<String> id, SchemaState state, CustomResourceOptions options)resources: _: type: redpanda:Schema get: id: ${id}import {
to = redpanda_schema.example
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.
- Allow
Deletion bool - Cluster
Id string - The ID of the cluster where the schema is stored.
- Compatibility string
- The compatibility level for schema evolution (BACKWARD, BACKWARD_TRANSITIVE, FORWARD, FORWARD_TRANSITIVE, FULL, FULL_TRANSITIVE, NONE). Defaults to BACKWARD.
- Password string
- Password
Wo string - Password
Wo doubleVersion - Deprecated. Version counter for password_wo, which is itself deprecated for this resource.
- References
List<Schema
Reference> - List of schema references.
- Schema string
- The schema definition in JSON format.
- Schema
Id double - The unique identifier for the schema.
- Schema
Type string - The type of schema (AVRO, JSON, PROTOBUF).
- Subject string
- The subject name for the schema.
- Username string
- SASL username for Schema Registry HTTP Basic authentication. Optional: when omitted (together with password) the provider authenticates to Schema Registry using its cloud Bearer token. Supply username + password only when you need writes to be attributed to a specific SASL identity (e.g., audit / least-privilege).
- Version double
- The version of the schema.
- Allow
Deletion bool - Cluster
Id string - The ID of the cluster where the schema is stored.
- Compatibility string
- The compatibility level for schema evolution (BACKWARD, BACKWARD_TRANSITIVE, FORWARD, FORWARD_TRANSITIVE, FULL, FULL_TRANSITIVE, NONE). Defaults to BACKWARD.
- Password string
- Password
Wo string - Password
Wo float64Version - Deprecated. Version counter for password_wo, which is itself deprecated for this resource.
- References
[]Schema
Reference Args - List of schema references.
- Schema string
- The schema definition in JSON format.
- Schema
Id float64 - The unique identifier for the schema.
- Schema
Type string - The type of schema (AVRO, JSON, PROTOBUF).
- Subject string
- The subject name for the schema.
- Username string
- SASL username for Schema Registry HTTP Basic authentication. Optional: when omitted (together with password) the provider authenticates to Schema Registry using its cloud Bearer token. Supply username + password only when you need writes to be attributed to a specific SASL identity (e.g., audit / least-privilege).
- Version float64
- The version of the schema.
- allow_
deletion bool - cluster_
id string - The ID of the cluster where the schema is stored.
- compatibility string
- The compatibility level for schema evolution (BACKWARD, BACKWARD_TRANSITIVE, FORWARD, FORWARD_TRANSITIVE, FULL, FULL_TRANSITIVE, NONE). Defaults to BACKWARD.
- password string
- password_
wo string - password_
wo_ numberversion - Deprecated. Version counter for password_wo, which is itself deprecated for this resource.
- references list(object)
- List of schema references.
- schema string
- The schema definition in JSON format.
- schema_
id number - The unique identifier for the schema.
- schema_
type string - The type of schema (AVRO, JSON, PROTOBUF).
- subject string
- The subject name for the schema.
- username string
- SASL username for Schema Registry HTTP Basic authentication. Optional: when omitted (together with password) the provider authenticates to Schema Registry using its cloud Bearer token. Supply username + password only when you need writes to be attributed to a specific SASL identity (e.g., audit / least-privilege).
- version number
- The version of the schema.
- allow
Deletion Boolean - cluster
Id String - The ID of the cluster where the schema is stored.
- compatibility String
- The compatibility level for schema evolution (BACKWARD, BACKWARD_TRANSITIVE, FORWARD, FORWARD_TRANSITIVE, FULL, FULL_TRANSITIVE, NONE). Defaults to BACKWARD.
- password String
- password
Wo String - password
Wo DoubleVersion - Deprecated. Version counter for password_wo, which is itself deprecated for this resource.
- references
List<Schema
Reference> - List of schema references.
- schema String
- The schema definition in JSON format.
- schema
Id Double - The unique identifier for the schema.
- schema
Type String - The type of schema (AVRO, JSON, PROTOBUF).
- subject String
- The subject name for the schema.
- username String
- SASL username for Schema Registry HTTP Basic authentication. Optional: when omitted (together with password) the provider authenticates to Schema Registry using its cloud Bearer token. Supply username + password only when you need writes to be attributed to a specific SASL identity (e.g., audit / least-privilege).
- version Double
- The version of the schema.
- allow
Deletion boolean - cluster
Id string - The ID of the cluster where the schema is stored.
- compatibility string
- The compatibility level for schema evolution (BACKWARD, BACKWARD_TRANSITIVE, FORWARD, FORWARD_TRANSITIVE, FULL, FULL_TRANSITIVE, NONE). Defaults to BACKWARD.
- password string
- password
Wo string - password
Wo numberVersion - Deprecated. Version counter for password_wo, which is itself deprecated for this resource.
- references
Schema
Reference[] - List of schema references.
- schema string
- The schema definition in JSON format.
- schema
Id number - The unique identifier for the schema.
- schema
Type string - The type of schema (AVRO, JSON, PROTOBUF).
- subject string
- The subject name for the schema.
- username string
- SASL username for Schema Registry HTTP Basic authentication. Optional: when omitted (together with password) the provider authenticates to Schema Registry using its cloud Bearer token. Supply username + password only when you need writes to be attributed to a specific SASL identity (e.g., audit / least-privilege).
- version number
- The version of the schema.
- allow_
deletion bool - cluster_
id str - The ID of the cluster where the schema is stored.
- compatibility str
- The compatibility level for schema evolution (BACKWARD, BACKWARD_TRANSITIVE, FORWARD, FORWARD_TRANSITIVE, FULL, FULL_TRANSITIVE, NONE). Defaults to BACKWARD.
- password str
- password_
wo str - password_
wo_ floatversion - Deprecated. Version counter for password_wo, which is itself deprecated for this resource.
- references
Sequence[Schema
Reference Args] - List of schema references.
- schema str
- The schema definition in JSON format.
- schema_
id float - The unique identifier for the schema.
- schema_
type str - The type of schema (AVRO, JSON, PROTOBUF).
- subject str
- The subject name for the schema.
- username str
- SASL username for Schema Registry HTTP Basic authentication. Optional: when omitted (together with password) the provider authenticates to Schema Registry using its cloud Bearer token. Supply username + password only when you need writes to be attributed to a specific SASL identity (e.g., audit / least-privilege).
- version float
- The version of the schema.
- allow
Deletion Boolean - cluster
Id String - The ID of the cluster where the schema is stored.
- compatibility String
- The compatibility level for schema evolution (BACKWARD, BACKWARD_TRANSITIVE, FORWARD, FORWARD_TRANSITIVE, FULL, FULL_TRANSITIVE, NONE). Defaults to BACKWARD.
- password String
- password
Wo String - password
Wo NumberVersion - Deprecated. Version counter for password_wo, which is itself deprecated for this resource.
- references List<Property Map>
- List of schema references.
- schema String
- The schema definition in JSON format.
- schema
Id Number - The unique identifier for the schema.
- schema
Type String - The type of schema (AVRO, JSON, PROTOBUF).
- subject String
- The subject name for the schema.
- username String
- SASL username for Schema Registry HTTP Basic authentication. Optional: when omitted (together with password) the provider authenticates to Schema Registry using its cloud Bearer token. Supply username + password only when you need writes to be attributed to a specific SASL identity (e.g., audit / least-privilege).
- version Number
- The version of the schema.
Supporting Types
SchemaReference, SchemaReferenceArgs
Package Details
- Repository
- redpanda redpanda-data/terraform-provider-redpanda
- License
- Notes
- This Pulumi package is based on the
redpandaTerraform Provider.
published on Wednesday, Jun 3, 2026 by redpanda-data