published on Wednesday, Jun 3, 2026 by redpanda-data
published on Wednesday, Jun 3, 2026 by redpanda-data
Import
$ pulumi import redpanda:index/secret:Secret example secretName,clusterId
Where secretName is the secret’s identifier (uppercase, matching ^[A-Z][A-Z0-9_]*$) and clusterId is the ID of the cluster in Redpanda Cloud. After import, secret_data is unset until the next apply provides a value.
Create Secret Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Secret(name: string, args: SecretArgs, opts?: CustomResourceOptions);@overload
def Secret(resource_name: str,
args: SecretArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Secret(resource_name: str,
opts: Optional[ResourceOptions] = None,
cluster_api_url: Optional[str] = None,
scopes: Optional[Sequence[str]] = None,
secret_data: Optional[str] = None,
allow_deletion: Optional[bool] = None,
labels: Optional[Mapping[str, str]] = None,
name: Optional[str] = None,
secret_data_version: Optional[float] = None)func NewSecret(ctx *Context, name string, args SecretArgs, opts ...ResourceOption) (*Secret, error)public Secret(string name, SecretArgs args, CustomResourceOptions? opts = null)
public Secret(String name, SecretArgs args)
public Secret(String name, SecretArgs args, CustomResourceOptions options)
type: redpanda:Secret
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
resource "redpanda_secret" "name" {
# resource properties
}Parameters
- name string
- The unique name of the resource.
- args SecretArgs
- 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 SecretArgs
- 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 SecretArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args SecretArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args SecretArgs
- 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 secretResource = new Redpanda.Secret("secretResource", new()
{
ClusterApiUrl = "string",
Scopes = new[]
{
"string",
},
SecretData = "string",
AllowDeletion = false,
Labels =
{
{ "string", "string" },
},
Name = "string",
SecretDataVersion = 0,
});
example, err := redpanda.NewSecret(ctx, "secretResource", &redpanda.SecretArgs{
ClusterApiUrl: pulumi.String("string"),
Scopes: pulumi.StringArray{
pulumi.String("string"),
},
SecretData: pulumi.String("string"),
AllowDeletion: pulumi.Bool(false),
Labels: pulumi.StringMap{
"string": pulumi.String("string"),
},
Name: pulumi.String("string"),
SecretDataVersion: pulumi.Float64(0),
})
resource "redpanda_secret" "secretResource" {
cluster_api_url = "string"
scopes = ["string"]
secret_data = "string"
allow_deletion = false
labels = {
"string" = "string"
}
name = "string"
secret_data_version = 0
}
var secretResource = new Secret("secretResource", SecretArgs.builder()
.clusterApiUrl("string")
.scopes("string")
.secretData("string")
.allowDeletion(false)
.labels(Map.of("string", "string"))
.name("string")
.secretDataVersion(0.0)
.build());
secret_resource = redpanda.Secret("secretResource",
cluster_api_url="string",
scopes=["string"],
secret_data="string",
allow_deletion=False,
labels={
"string": "string",
},
name="string",
secret_data_version=float(0))
const secretResource = new redpanda.Secret("secretResource", {
clusterApiUrl: "string",
scopes: ["string"],
secretData: "string",
allowDeletion: false,
labels: {
string: "string",
},
name: "string",
secretDataVersion: 0,
});
type: redpanda:Secret
properties:
allowDeletion: false
clusterApiUrl: string
labels:
string: string
name: string
scopes:
- string
secretData: string
secretDataVersion: 0
Secret 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 Secret resource accepts the following input properties:
- Cluster
Api stringUrl - Dataplane API URL of the cluster that owns this secret (
redpanda_cluster.<name>.cluster_api_url). Immutable; changing this prevents deletion of the existing secret. Generally easier to recreate the resource than to change this. - Scopes List<string>
- Secret scopes. Order does not matter — the server may return scopes in a different order than you supplied; the set semantics make plan-twice stable regardless.
- Secret
Data string - The secret data. Must be Base64-encoded.
- Allow
Deletion bool - Allows deletion of the secret. Defaults to false.
- Labels Dictionary<string, string>
- Secret labels.
- Name string
- Secret identifier.
- Secret
Data doubleVersion
- Cluster
Api stringUrl - Dataplane API URL of the cluster that owns this secret (
redpanda_cluster.<name>.cluster_api_url). Immutable; changing this prevents deletion of the existing secret. Generally easier to recreate the resource than to change this. - Scopes []string
- Secret scopes. Order does not matter — the server may return scopes in a different order than you supplied; the set semantics make plan-twice stable regardless.
- Secret
Data string - The secret data. Must be Base64-encoded.
- Allow
Deletion bool - Allows deletion of the secret. Defaults to false.
- Labels map[string]string
- Secret labels.
- Name string
- Secret identifier.
- Secret
Data float64Version
- cluster_
api_ stringurl - Dataplane API URL of the cluster that owns this secret (
redpanda_cluster.<name>.cluster_api_url). Immutable; changing this prevents deletion of the existing secret. Generally easier to recreate the resource than to change this. - scopes list(string)
- Secret scopes. Order does not matter — the server may return scopes in a different order than you supplied; the set semantics make plan-twice stable regardless.
- secret_
data string - The secret data. Must be Base64-encoded.
- allow_
deletion bool - Allows deletion of the secret. Defaults to false.
- labels map(string)
- Secret labels.
- name string
- Secret identifier.
- secret_
data_ numberversion
- cluster
Api StringUrl - Dataplane API URL of the cluster that owns this secret (
redpanda_cluster.<name>.cluster_api_url). Immutable; changing this prevents deletion of the existing secret. Generally easier to recreate the resource than to change this. - scopes List<String>
- Secret scopes. Order does not matter — the server may return scopes in a different order than you supplied; the set semantics make plan-twice stable regardless.
- secret
Data String - The secret data. Must be Base64-encoded.
- allow
Deletion Boolean - Allows deletion of the secret. Defaults to false.
- labels Map<String,String>
- Secret labels.
- name String
- Secret identifier.
- secret
Data DoubleVersion
- cluster
Api stringUrl - Dataplane API URL of the cluster that owns this secret (
redpanda_cluster.<name>.cluster_api_url). Immutable; changing this prevents deletion of the existing secret. Generally easier to recreate the resource than to change this. - scopes string[]
- Secret scopes. Order does not matter — the server may return scopes in a different order than you supplied; the set semantics make plan-twice stable regardless.
- secret
Data string - The secret data. Must be Base64-encoded.
- allow
Deletion boolean - Allows deletion of the secret. Defaults to false.
- labels {[key: string]: string}
- Secret labels.
- name string
- Secret identifier.
- secret
Data numberVersion
- cluster_
api_ strurl - Dataplane API URL of the cluster that owns this secret (
redpanda_cluster.<name>.cluster_api_url). Immutable; changing this prevents deletion of the existing secret. Generally easier to recreate the resource than to change this. - scopes Sequence[str]
- Secret scopes. Order does not matter — the server may return scopes in a different order than you supplied; the set semantics make plan-twice stable regardless.
- secret_
data str - The secret data. Must be Base64-encoded.
- allow_
deletion bool - Allows deletion of the secret. Defaults to false.
- labels Mapping[str, str]
- Secret labels.
- name str
- Secret identifier.
- secret_
data_ floatversion
- cluster
Api StringUrl - Dataplane API URL of the cluster that owns this secret (
redpanda_cluster.<name>.cluster_api_url). Immutable; changing this prevents deletion of the existing secret. Generally easier to recreate the resource than to change this. - scopes List<String>
- Secret scopes. Order does not matter — the server may return scopes in a different order than you supplied; the set semantics make plan-twice stable regardless.
- secret
Data String - The secret data. Must be Base64-encoded.
- allow
Deletion Boolean - Allows deletion of the secret. Defaults to false.
- labels Map<String>
- Secret labels.
- name String
- Secret identifier.
- secret
Data NumberVersion
Outputs
All input properties are implicitly available as output properties. Additionally, the Secret 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 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 Secret Resource
Get an existing Secret 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?: SecretState, opts?: CustomResourceOptions): Secret@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
allow_deletion: Optional[bool] = None,
cluster_api_url: Optional[str] = None,
labels: Optional[Mapping[str, str]] = None,
name: Optional[str] = None,
scopes: Optional[Sequence[str]] = None,
secret_data: Optional[str] = None,
secret_data_version: Optional[float] = None) -> Secretfunc GetSecret(ctx *Context, name string, id IDInput, state *SecretState, opts ...ResourceOption) (*Secret, error)public static Secret Get(string name, Input<string> id, SecretState? state, CustomResourceOptions? opts = null)public static Secret get(String name, Output<String> id, SecretState state, CustomResourceOptions options)resources: _: type: redpanda:Secret get: id: ${id}import {
to = redpanda_secret.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 - Allows deletion of the secret. Defaults to false.
- Cluster
Api stringUrl - Dataplane API URL of the cluster that owns this secret (
redpanda_cluster.<name>.cluster_api_url). Immutable; changing this prevents deletion of the existing secret. Generally easier to recreate the resource than to change this. - Labels Dictionary<string, string>
- Secret labels.
- Name string
- Secret identifier.
- Scopes List<string>
- Secret scopes. Order does not matter — the server may return scopes in a different order than you supplied; the set semantics make plan-twice stable regardless.
- Secret
Data string - The secret data. Must be Base64-encoded.
- Secret
Data doubleVersion
- Allow
Deletion bool - Allows deletion of the secret. Defaults to false.
- Cluster
Api stringUrl - Dataplane API URL of the cluster that owns this secret (
redpanda_cluster.<name>.cluster_api_url). Immutable; changing this prevents deletion of the existing secret. Generally easier to recreate the resource than to change this. - Labels map[string]string
- Secret labels.
- Name string
- Secret identifier.
- Scopes []string
- Secret scopes. Order does not matter — the server may return scopes in a different order than you supplied; the set semantics make plan-twice stable regardless.
- Secret
Data string - The secret data. Must be Base64-encoded.
- Secret
Data float64Version
- allow_
deletion bool - Allows deletion of the secret. Defaults to false.
- cluster_
api_ stringurl - Dataplane API URL of the cluster that owns this secret (
redpanda_cluster.<name>.cluster_api_url). Immutable; changing this prevents deletion of the existing secret. Generally easier to recreate the resource than to change this. - labels map(string)
- Secret labels.
- name string
- Secret identifier.
- scopes list(string)
- Secret scopes. Order does not matter — the server may return scopes in a different order than you supplied; the set semantics make plan-twice stable regardless.
- secret_
data string - The secret data. Must be Base64-encoded.
- secret_
data_ numberversion
- allow
Deletion Boolean - Allows deletion of the secret. Defaults to false.
- cluster
Api StringUrl - Dataplane API URL of the cluster that owns this secret (
redpanda_cluster.<name>.cluster_api_url). Immutable; changing this prevents deletion of the existing secret. Generally easier to recreate the resource than to change this. - labels Map<String,String>
- Secret labels.
- name String
- Secret identifier.
- scopes List<String>
- Secret scopes. Order does not matter — the server may return scopes in a different order than you supplied; the set semantics make plan-twice stable regardless.
- secret
Data String - The secret data. Must be Base64-encoded.
- secret
Data DoubleVersion
- allow
Deletion boolean - Allows deletion of the secret. Defaults to false.
- cluster
Api stringUrl - Dataplane API URL of the cluster that owns this secret (
redpanda_cluster.<name>.cluster_api_url). Immutable; changing this prevents deletion of the existing secret. Generally easier to recreate the resource than to change this. - labels {[key: string]: string}
- Secret labels.
- name string
- Secret identifier.
- scopes string[]
- Secret scopes. Order does not matter — the server may return scopes in a different order than you supplied; the set semantics make plan-twice stable regardless.
- secret
Data string - The secret data. Must be Base64-encoded.
- secret
Data numberVersion
- allow_
deletion bool - Allows deletion of the secret. Defaults to false.
- cluster_
api_ strurl - Dataplane API URL of the cluster that owns this secret (
redpanda_cluster.<name>.cluster_api_url). Immutable; changing this prevents deletion of the existing secret. Generally easier to recreate the resource than to change this. - labels Mapping[str, str]
- Secret labels.
- name str
- Secret identifier.
- scopes Sequence[str]
- Secret scopes. Order does not matter — the server may return scopes in a different order than you supplied; the set semantics make plan-twice stable regardless.
- secret_
data str - The secret data. Must be Base64-encoded.
- secret_
data_ floatversion
- allow
Deletion Boolean - Allows deletion of the secret. Defaults to false.
- cluster
Api StringUrl - Dataplane API URL of the cluster that owns this secret (
redpanda_cluster.<name>.cluster_api_url). Immutable; changing this prevents deletion of the existing secret. Generally easier to recreate the resource than to change this. - labels Map<String>
- Secret labels.
- name String
- Secret identifier.
- scopes List<String>
- Secret scopes. Order does not matter — the server may return scopes in a different order than you supplied; the set semantics make plan-twice stable regardless.
- secret
Data String - The secret data. Must be Base64-encoded.
- secret
Data NumberVersion
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