1. Packages
  2. Packages
  3. Redpanda Provider
  4. API Docs
  5. Secret
Viewing docs for redpanda 2.0.0
published on Wednesday, Jun 3, 2026 by redpanda-data
Viewing docs for redpanda 2.0.0
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:

    ClusterApiUrl string
    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.
    SecretData string
    The secret data. Must be Base64-encoded.
    AllowDeletion bool
    Allows deletion of the secret. Defaults to false.
    Labels Dictionary<string, string>
    Secret labels.
    Name string
    Secret identifier.
    SecretDataVersion double
    ClusterApiUrl string
    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.
    SecretData string
    The secret data. Must be Base64-encoded.
    AllowDeletion bool
    Allows deletion of the secret. Defaults to false.
    Labels map[string]string
    Secret labels.
    Name string
    Secret identifier.
    SecretDataVersion float64
    cluster_api_url string
    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_version number
    clusterApiUrl String
    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.
    secretData String
    The secret data. Must be Base64-encoded.
    allowDeletion Boolean
    Allows deletion of the secret. Defaults to false.
    labels Map<String,String>
    Secret labels.
    name String
    Secret identifier.
    secretDataVersion Double
    clusterApiUrl string
    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.
    secretData string
    The secret data. Must be Base64-encoded.
    allowDeletion boolean
    Allows deletion of the secret. Defaults to false.
    labels {[key: string]: string}
    Secret labels.
    name string
    Secret identifier.
    secretDataVersion number
    cluster_api_url str
    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_version float
    clusterApiUrl String
    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.
    secretData String
    The secret data. Must be Base64-encoded.
    allowDeletion Boolean
    Allows deletion of the secret. Defaults to false.
    labels Map<String>
    Secret labels.
    name String
    Secret identifier.
    secretDataVersion Number

    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) -> Secret
    func 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.
    The following state arguments are supported:
    AllowDeletion bool
    Allows deletion of the secret. Defaults to false.
    ClusterApiUrl string
    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.
    SecretData string
    The secret data. Must be Base64-encoded.
    SecretDataVersion double
    AllowDeletion bool
    Allows deletion of the secret. Defaults to false.
    ClusterApiUrl string
    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.
    SecretData string
    The secret data. Must be Base64-encoded.
    SecretDataVersion float64
    allow_deletion bool
    Allows deletion of the secret. Defaults to false.
    cluster_api_url string
    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_version number
    allowDeletion Boolean
    Allows deletion of the secret. Defaults to false.
    clusterApiUrl String
    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.
    secretData String
    The secret data. Must be Base64-encoded.
    secretDataVersion Double
    allowDeletion boolean
    Allows deletion of the secret. Defaults to false.
    clusterApiUrl string
    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.
    secretData string
    The secret data. Must be Base64-encoded.
    secretDataVersion number
    allow_deletion bool
    Allows deletion of the secret. Defaults to false.
    cluster_api_url str
    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_version float
    allowDeletion Boolean
    Allows deletion of the secret. Defaults to false.
    clusterApiUrl String
    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.
    secretData String
    The secret data. Must be Base64-encoded.
    secretDataVersion Number

    Package Details

    Repository
    redpanda redpanda-data/terraform-provider-redpanda
    License
    Notes
    This Pulumi package is based on the redpanda Terraform Provider.
    Viewing docs for redpanda 2.0.0
    published on Wednesday, Jun 3, 2026 by redpanda-data

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial