1. Packages
  2. Packages
  3. Redpanda Provider
  4. API Docs
  5. ServiceAccount
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

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as redpanda from "@pulumi/redpanda";
    
    const example = new redpanda.ServiceAccount("example", {
        name: "ci-bot",
        description: "Service account used by CI workloads.",
    });
    export const clientId = example.auth0ClientCredentials.apply(auth0ClientCredentials => auth0ClientCredentials.clientId);
    export const clientSecret = example.auth0ClientCredentials.apply(auth0ClientCredentials => auth0ClientCredentials.clientSecret);
    
    import pulumi
    import pulumi_redpanda as redpanda
    
    example = redpanda.ServiceAccount("example",
        name="ci-bot",
        description="Service account used by CI workloads.")
    pulumi.export("clientId", example.auth0_client_credentials.client_id)
    pulumi.export("clientSecret", example.auth0_client_credentials.client_secret)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/redpanda/v2/redpanda"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		example, err := redpanda.NewServiceAccount(ctx, "example", &redpanda.ServiceAccountArgs{
    			Name:        pulumi.String("ci-bot"),
    			Description: pulumi.String("Service account used by CI workloads."),
    		})
    		if err != nil {
    			return err
    		}
    		ctx.Export("clientId", example.Auth0ClientCredentials.ApplyT(func(auth0ClientCredentials redpanda.ServiceAccountAuth0ClientCredentials) (*string, error) {
    			return &auth0ClientCredentials.ClientId, nil
    		}).(pulumi.StringPtrOutput))
    		ctx.Export("clientSecret", example.Auth0ClientCredentials.ApplyT(func(auth0ClientCredentials redpanda.ServiceAccountAuth0ClientCredentials) (*string, error) {
    			return &auth0ClientCredentials.ClientSecret, nil
    		}).(pulumi.StringPtrOutput))
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Redpanda = Pulumi.Redpanda;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Redpanda.ServiceAccount("example", new()
        {
            Name = "ci-bot",
            Description = "Service account used by CI workloads.",
        });
    
        return new Dictionary<string, object?>
        {
            ["clientId"] = example.Auth0ClientCredentials.Apply(auth0ClientCredentials => auth0ClientCredentials.ClientId),
            ["clientSecret"] = example.Auth0ClientCredentials.Apply(auth0ClientCredentials => auth0ClientCredentials.ClientSecret),
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.redpanda.ServiceAccount;
    import com.pulumi.redpanda.ServiceAccountArgs;
    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 ServiceAccount("example", ServiceAccountArgs.builder()
                .name("ci-bot")
                .description("Service account used by CI workloads.")
                .build());
    
            ctx.export("clientId", example.auth0ClientCredentials().applyValue(_auth0ClientCredentials -> _auth0ClientCredentials.clientId()));
            ctx.export("clientSecret", example.auth0ClientCredentials().applyValue(_auth0ClientCredentials -> _auth0ClientCredentials.clientSecret()));
        }
    }
    
    resources:
      example:
        type: redpanda:ServiceAccount
        properties:
          name: ci-bot
          description: Service account used by CI workloads.
    outputs:
      clientId: ${example.auth0ClientCredentials.clientId}
      clientSecret: ${example.auth0ClientCredentials.clientSecret}
    
    Example coming soon!
    

    API Reference

    For more information, see the Redpanda Cloud Control Plane API documentation.

    Create ServiceAccount Resource

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

    Constructor syntax

    new ServiceAccount(name: string, args: ServiceAccountArgs, opts?: CustomResourceOptions);
    @overload
    def ServiceAccount(resource_name: str,
                       args: ServiceAccountArgs,
                       opts: Optional[ResourceOptions] = None)
    
    @overload
    def ServiceAccount(resource_name: str,
                       opts: Optional[ResourceOptions] = None,
                       description: Optional[str] = None,
                       name: Optional[str] = None,
                       timeouts: Optional[ServiceAccountTimeoutsArgs] = None)
    func NewServiceAccount(ctx *Context, name string, args ServiceAccountArgs, opts ...ResourceOption) (*ServiceAccount, error)
    public ServiceAccount(string name, ServiceAccountArgs args, CustomResourceOptions? opts = null)
    public ServiceAccount(String name, ServiceAccountArgs args)
    public ServiceAccount(String name, ServiceAccountArgs args, CustomResourceOptions options)
    
    type: redpanda:ServiceAccount
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    resource "redpanda_serviceaccount" "name" {
        # resource properties
    }

    Parameters

    name string
    The unique name of the resource.
    args ServiceAccountArgs
    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 ServiceAccountArgs
    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 ServiceAccountArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ServiceAccountArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ServiceAccountArgs
    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 serviceAccountResource = new Redpanda.ServiceAccount("serviceAccountResource", new()
    {
        Description = "string",
        Name = "string",
        Timeouts = new Redpanda.Inputs.ServiceAccountTimeoutsArgs
        {
            Create = "string",
            Delete = "string",
            Update = "string",
        },
    });
    
    example, err := redpanda.NewServiceAccount(ctx, "serviceAccountResource", &redpanda.ServiceAccountArgs{
    	Description: pulumi.String("string"),
    	Name:        pulumi.String("string"),
    	Timeouts: &redpanda.ServiceAccountTimeoutsArgs{
    		Create: pulumi.String("string"),
    		Delete: pulumi.String("string"),
    		Update: pulumi.String("string"),
    	},
    })
    
    resource "redpanda_serviceaccount" "serviceAccountResource" {
      description = "string"
      name        = "string"
      timeouts = {
        create = "string"
        delete = "string"
        update = "string"
      }
    }
    
    var serviceAccountResource = new ServiceAccount("serviceAccountResource", ServiceAccountArgs.builder()
        .description("string")
        .name("string")
        .timeouts(ServiceAccountTimeoutsArgs.builder()
            .create("string")
            .delete("string")
            .update("string")
            .build())
        .build());
    
    service_account_resource = redpanda.ServiceAccount("serviceAccountResource",
        description="string",
        name="string",
        timeouts={
            "create": "string",
            "delete": "string",
            "update": "string",
        })
    
    const serviceAccountResource = new redpanda.ServiceAccount("serviceAccountResource", {
        description: "string",
        name: "string",
        timeouts: {
            create: "string",
            "delete": "string",
            update: "string",
        },
    });
    
    type: redpanda:ServiceAccount
    properties:
        description: string
        name: string
        timeouts:
            create: string
            delete: string
            update: string
    

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

    Description string
    The description of the service_account. Length must be at most 140.
    Name string
    The unique name of the service account. Length must be between 3 and 128. Must match pattern ^[^<>]+$.
    Timeouts ServiceAccountTimeouts
    Description string
    The description of the service_account. Length must be at most 140.
    Name string
    The unique name of the service account. Length must be between 3 and 128. Must match pattern ^[^<>]+$.
    Timeouts ServiceAccountTimeoutsArgs
    description string
    The description of the service_account. Length must be at most 140.
    name string
    The unique name of the service account. Length must be between 3 and 128. Must match pattern ^[^<>]+$.
    timeouts object
    description String
    The description of the service_account. Length must be at most 140.
    name String
    The unique name of the service account. Length must be between 3 and 128. Must match pattern ^[^<>]+$.
    timeouts ServiceAccountTimeouts
    description string
    The description of the service_account. Length must be at most 140.
    name string
    The unique name of the service account. Length must be between 3 and 128. Must match pattern ^[^<>]+$.
    timeouts ServiceAccountTimeouts
    description str
    The description of the service_account. Length must be at most 140.
    name str
    The unique name of the service account. Length must be between 3 and 128. Must match pattern ^[^<>]+$.
    timeouts ServiceAccountTimeoutsArgs
    description String
    The description of the service_account. Length must be at most 140.
    name String
    The unique name of the service account. Length must be between 3 and 128. Must match pattern ^[^<>]+$.
    timeouts Property Map

    Outputs

    All input properties are implicitly available as output properties. Additionally, the ServiceAccount resource produces the following output properties:

    Auth0ClientCredentials ServiceAccountAuth0ClientCredentials
    Auth0 Client Credentials configuration
    Id string
    The provider-assigned unique ID for this managed resource.
    Auth0ClientCredentials ServiceAccountAuth0ClientCredentials
    Auth0 Client Credentials configuration
    Id string
    The provider-assigned unique ID for this managed resource.
    auth0_client_credentials object
    Auth0 Client Credentials configuration
    id string
    The provider-assigned unique ID for this managed resource.
    auth0ClientCredentials ServiceAccountAuth0ClientCredentials
    Auth0 Client Credentials configuration
    id String
    The provider-assigned unique ID for this managed resource.
    auth0ClientCredentials ServiceAccountAuth0ClientCredentials
    Auth0 Client Credentials configuration
    id string
    The provider-assigned unique ID for this managed resource.
    auth0_client_credentials ServiceAccountAuth0ClientCredentials
    Auth0 Client Credentials configuration
    id str
    The provider-assigned unique ID for this managed resource.
    auth0ClientCredentials Property Map
    Auth0 Client Credentials configuration
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing ServiceAccount Resource

    Get an existing ServiceAccount 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?: ServiceAccountState, opts?: CustomResourceOptions): ServiceAccount
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            auth0_client_credentials: Optional[ServiceAccountAuth0ClientCredentialsArgs] = None,
            description: Optional[str] = None,
            name: Optional[str] = None,
            timeouts: Optional[ServiceAccountTimeoutsArgs] = None) -> ServiceAccount
    func GetServiceAccount(ctx *Context, name string, id IDInput, state *ServiceAccountState, opts ...ResourceOption) (*ServiceAccount, error)
    public static ServiceAccount Get(string name, Input<string> id, ServiceAccountState? state, CustomResourceOptions? opts = null)
    public static ServiceAccount get(String name, Output<String> id, ServiceAccountState state, CustomResourceOptions options)
    resources:  _:    type: redpanda:ServiceAccount    get:      id: ${id}
    import {
      to = redpanda_serviceaccount.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:
    Auth0ClientCredentials ServiceAccountAuth0ClientCredentials
    Auth0 Client Credentials configuration
    Description string
    The description of the service_account. Length must be at most 140.
    Name string
    The unique name of the service account. Length must be between 3 and 128. Must match pattern ^[^<>]+$.
    Timeouts ServiceAccountTimeouts
    Auth0ClientCredentials ServiceAccountAuth0ClientCredentialsArgs
    Auth0 Client Credentials configuration
    Description string
    The description of the service_account. Length must be at most 140.
    Name string
    The unique name of the service account. Length must be between 3 and 128. Must match pattern ^[^<>]+$.
    Timeouts ServiceAccountTimeoutsArgs
    auth0_client_credentials object
    Auth0 Client Credentials configuration
    description string
    The description of the service_account. Length must be at most 140.
    name string
    The unique name of the service account. Length must be between 3 and 128. Must match pattern ^[^<>]+$.
    timeouts object
    auth0ClientCredentials ServiceAccountAuth0ClientCredentials
    Auth0 Client Credentials configuration
    description String
    The description of the service_account. Length must be at most 140.
    name String
    The unique name of the service account. Length must be between 3 and 128. Must match pattern ^[^<>]+$.
    timeouts ServiceAccountTimeouts
    auth0ClientCredentials ServiceAccountAuth0ClientCredentials
    Auth0 Client Credentials configuration
    description string
    The description of the service_account. Length must be at most 140.
    name string
    The unique name of the service account. Length must be between 3 and 128. Must match pattern ^[^<>]+$.
    timeouts ServiceAccountTimeouts
    auth0_client_credentials ServiceAccountAuth0ClientCredentialsArgs
    Auth0 Client Credentials configuration
    description str
    The description of the service_account. Length must be at most 140.
    name str
    The unique name of the service account. Length must be between 3 and 128. Must match pattern ^[^<>]+$.
    timeouts ServiceAccountTimeoutsArgs
    auth0ClientCredentials Property Map
    Auth0 Client Credentials configuration
    description String
    The description of the service_account. Length must be at most 140.
    name String
    The unique name of the service account. Length must be between 3 and 128. Must match pattern ^[^<>]+$.
    timeouts Property Map

    Supporting Types

    ServiceAccountAuth0ClientCredentials, ServiceAccountAuth0ClientCredentialsArgs

    ClientId string
    The client ID of the credentials
    ClientSecret string
    The client secret
    ClientId string
    The client ID of the credentials
    ClientSecret string
    The client secret
    client_id string
    The client ID of the credentials
    client_secret string
    The client secret
    clientId String
    The client ID of the credentials
    clientSecret String
    The client secret
    clientId string
    The client ID of the credentials
    clientSecret string
    The client secret
    client_id str
    The client ID of the credentials
    client_secret str
    The client secret
    clientId String
    The client ID of the credentials
    clientSecret String
    The client secret

    ServiceAccountTimeouts, ServiceAccountTimeoutsArgs

    Create string
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    Delete string
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
    Update string
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    Create string
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    Delete string
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
    Update string
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    create string
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    delete string
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
    update string
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    create String
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    delete String
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
    update String
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    create string
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    delete string
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
    update string
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    create str
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    delete str
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
    update str
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    create String
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    delete String
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
    update String
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).

    Import

    $ pulumi import redpanda:index/serviceAccount:ServiceAccount example serviceAccountId
    

    Where serviceAccountId is the 20-character identifier assigned by Redpanda Cloud.

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

    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