1. Packages
  2. Confluent Provider
  3. API Docs
  4. ServiceAccount
Confluent v2.10.0 published on Wednesday, Nov 20, 2024 by Pulumi

confluentcloud.ServiceAccount

Explore with Pulumi AI

confluentcloud logo
Confluent v2.10.0 published on Wednesday, Nov 20, 2024 by Pulumi

    General Availability

    confluentcloud.ServiceAccount provides a Service Account resource that enables creating, editing, and deleting service accounts on Confluent Cloud.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as confluentcloud from "@pulumi/confluentcloud";
    
    const example_sa = new confluentcloud.ServiceAccount("example-sa", {
        displayName: "orders-app-sa",
        description: "Service Account for orders app",
    });
    
    import pulumi
    import pulumi_confluentcloud as confluentcloud
    
    example_sa = confluentcloud.ServiceAccount("example-sa",
        display_name="orders-app-sa",
        description="Service Account for orders app")
    
    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.NewServiceAccount(ctx, "example-sa", &confluentcloud.ServiceAccountArgs{
    			DisplayName: pulumi.String("orders-app-sa"),
    			Description: pulumi.String("Service Account for orders app"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using ConfluentCloud = Pulumi.ConfluentCloud;
    
    return await Deployment.RunAsync(() => 
    {
        var example_sa = new ConfluentCloud.ServiceAccount("example-sa", new()
        {
            DisplayName = "orders-app-sa",
            Description = "Service Account for orders app",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.confluentcloud.ServiceAccount;
    import com.pulumi.confluentcloud.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_sa = new ServiceAccount("example-sa", ServiceAccountArgs.builder()
                .displayName("orders-app-sa")
                .description("Service Account for orders app")
                .build());
    
        }
    }
    
    resources:
      example-sa:
        type: confluentcloud:ServiceAccount
        properties:
          displayName: orders-app-sa
          description: Service Account for orders app
    

    Getting Started

    The following end-to-end examples might help to get started with confluentcloud.ServiceAccount resource:

    • basic-kafka-acls: Basic Kafka cluster with authorization using ACLs
    • basic-kafka-acls-with-alias: Basic Kafka cluster with authorization using ACLs
    • standard-kafka-acls: Standard Kafka cluster with authorization using ACLs
    • standard-kafka-rbac: Standard Kafka cluster with authorization using RBAC
    • dedicated-public-kafka-acls: Dedicated Kafka cluster that is accessible over the public internet with authorization using ACLs
    • dedicated-public-kafka-rbac: Dedicated Kafka cluster that is accessible over the public internet with authorization using RBAC
    • dedicated-privatelink-aws-kafka-acls: Dedicated Kafka cluster on AWS that is accessible via PrivateLink connections with authorization using ACLs
    • dedicated-privatelink-aws-kafka-rbac: Dedicated Kafka cluster on AWS that is accessible via PrivateLink connections with authorization using RBAC
    • dedicated-privatelink-azure-kafka-rbac: Dedicated Kafka cluster on Azure that is accessible via PrivateLink connections with authorization using RBAC
    • dedicated-privatelink-azure-kafka-acls: Dedicated Kafka cluster on Azure that is accessible via PrivateLink connections with authorization using ACLs
    • dedicated-private-service-connect-gcp-kafka-acls: Dedicated Kafka cluster on GCP that is accessible via Private Service Connect connections with authorization using ACLs
    • dedicated-private-service-connect-gcp-kafka-rbac: Dedicated Kafka cluster on GCP that is accessible via Private Service Connect connections with authorization using RBAC
    • dedicated-vnet-peering-azure-kafka-acls: Dedicated Kafka cluster on Azure that is accessible via VPC Peering connections with authorization using ACLs
    • dedicated-vnet-peering-azure-kafka-rbac: Dedicated Kafka cluster on Azure that is accessible via VPC Peering connections with authorization using RBAC
    • dedicated-vpc-peering-aws-kafka-acls: Dedicated Kafka cluster on AWS that is accessible via VPC Peering connections with authorization using ACLs
    • dedicated-vpc-peering-aws-kafka-rbac: Dedicated Kafka cluster on AWS that is accessible via VPC Peering connections with authorization using RBAC
    • dedicated-vpc-peering-gcp-kafka-acls: Dedicated Kafka cluster on GCP that is accessible via VPC Peering connections with authorization using ACLs
    • dedicated-vpc-peering-gcp-kafka-rbac: Dedicated Kafka cluster on GCP that is accessible via VPC Peering connections with authorization using RBAC
    • dedicated-transit-gateway-attachment-aws-kafka-acls: Dedicated Kafka cluster on AWS that is accessible via Transit Gateway Endpoint with authorization using ACLs
    • dedicated-transit-gateway-attachment-aws-kafka-rbac: Dedicated Kafka cluster on AWS that is accessible via Transit Gateway Endpoint with authorization using RBAC
    • enterprise-privatelinkattachment-aws-kafka-acls: Enterprise Kafka cluster on AWS that is accessible via PrivateLink connections with authorization using ACLs

    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: Optional[ServiceAccountArgs] = None,
                       opts: Optional[ResourceOptions] = None)
    
    @overload
    def ServiceAccount(resource_name: str,
                       opts: Optional[ResourceOptions] = None,
                       description: Optional[str] = None,
                       display_name: Optional[str] = None)
    func NewServiceAccount(ctx *Context, name string, args *ServiceAccountArgs, opts ...ResourceOption) (*ServiceAccount, error)
    public ServiceAccount(string name, ServiceAccountArgs? args = null, CustomResourceOptions? opts = null)
    public ServiceAccount(String name, ServiceAccountArgs args)
    public ServiceAccount(String name, ServiceAccountArgs args, CustomResourceOptions options)
    
    type: confluentcloud:ServiceAccount
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    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 ConfluentCloud.ServiceAccount("serviceAccountResource", new()
    {
        Description = "string",
        DisplayName = "string",
    });
    
    example, err := confluentcloud.NewServiceAccount(ctx, "serviceAccountResource", &confluentcloud.ServiceAccountArgs{
    	Description: pulumi.String("string"),
    	DisplayName: pulumi.String("string"),
    })
    
    var serviceAccountResource = new ServiceAccount("serviceAccountResource", ServiceAccountArgs.builder()
        .description("string")
        .displayName("string")
        .build());
    
    service_account_resource = confluentcloud.ServiceAccount("serviceAccountResource",
        description="string",
        display_name="string")
    
    const serviceAccountResource = new confluentcloud.ServiceAccount("serviceAccountResource", {
        description: "string",
        displayName: "string",
    });
    
    type: confluentcloud:ServiceAccount
    properties:
        description: string
        displayName: 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
    A free-form description of the Service Account.
    DisplayName string
    A human-readable name for the Service Account.
    Description string
    A free-form description of the Service Account.
    DisplayName string
    A human-readable name for the Service Account.
    description String
    A free-form description of the Service Account.
    displayName String
    A human-readable name for the Service Account.
    description string
    A free-form description of the Service Account.
    displayName string
    A human-readable name for the Service Account.
    description str
    A free-form description of the Service Account.
    display_name str
    A human-readable name for the Service Account.
    description String
    A free-form description of the Service Account.
    displayName String
    A human-readable name for the Service Account.

    Outputs

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

    ApiVersion string
    (Required String) An API Version of the schema version of the Service Account, for example, iam/v2.
    Id string
    The provider-assigned unique ID for this managed resource.
    Kind string
    (Required String) A kind of the Service Account, for example, ServiceAccount.
    ApiVersion string
    (Required String) An API Version of the schema version of the Service Account, for example, iam/v2.
    Id string
    The provider-assigned unique ID for this managed resource.
    Kind string
    (Required String) A kind of the Service Account, for example, ServiceAccount.
    apiVersion String
    (Required String) An API Version of the schema version of the Service Account, for example, iam/v2.
    id String
    The provider-assigned unique ID for this managed resource.
    kind String
    (Required String) A kind of the Service Account, for example, ServiceAccount.
    apiVersion string
    (Required String) An API Version of the schema version of the Service Account, for example, iam/v2.
    id string
    The provider-assigned unique ID for this managed resource.
    kind string
    (Required String) A kind of the Service Account, for example, ServiceAccount.
    api_version str
    (Required String) An API Version of the schema version of the Service Account, for example, iam/v2.
    id str
    The provider-assigned unique ID for this managed resource.
    kind str
    (Required String) A kind of the Service Account, for example, ServiceAccount.
    apiVersion String
    (Required String) An API Version of the schema version of the Service Account, for example, iam/v2.
    id String
    The provider-assigned unique ID for this managed resource.
    kind String
    (Required String) A kind of the Service Account, for example, ServiceAccount.

    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,
            api_version: Optional[str] = None,
            description: Optional[str] = None,
            display_name: Optional[str] = None,
            kind: Optional[str] = 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)
    Resource lookup is not supported in YAML
    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:
    ApiVersion string
    (Required String) An API Version of the schema version of the Service Account, for example, iam/v2.
    Description string
    A free-form description of the Service Account.
    DisplayName string
    A human-readable name for the Service Account.
    Kind string
    (Required String) A kind of the Service Account, for example, ServiceAccount.
    ApiVersion string
    (Required String) An API Version of the schema version of the Service Account, for example, iam/v2.
    Description string
    A free-form description of the Service Account.
    DisplayName string
    A human-readable name for the Service Account.
    Kind string
    (Required String) A kind of the Service Account, for example, ServiceAccount.
    apiVersion String
    (Required String) An API Version of the schema version of the Service Account, for example, iam/v2.
    description String
    A free-form description of the Service Account.
    displayName String
    A human-readable name for the Service Account.
    kind String
    (Required String) A kind of the Service Account, for example, ServiceAccount.
    apiVersion string
    (Required String) An API Version of the schema version of the Service Account, for example, iam/v2.
    description string
    A free-form description of the Service Account.
    displayName string
    A human-readable name for the Service Account.
    kind string
    (Required String) A kind of the Service Account, for example, ServiceAccount.
    api_version str
    (Required String) An API Version of the schema version of the Service Account, for example, iam/v2.
    description str
    A free-form description of the Service Account.
    display_name str
    A human-readable name for the Service Account.
    kind str
    (Required String) A kind of the Service Account, for example, ServiceAccount.
    apiVersion String
    (Required String) An API Version of the schema version of the Service Account, for example, iam/v2.
    description String
    A free-form description of the Service Account.
    displayName String
    A human-readable name for the Service Account.
    kind String
    (Required String) A kind of the Service Account, for example, ServiceAccount.

    Import

    You can import a Service Account by using Service Account ID, for example:

    $ export CONFLUENT_CLOUD_API_KEY="<cloud_api_key>"

    $ export CONFLUENT_CLOUD_API_SECRET="<cloud_api_secret>"

    $ pulumi import confluentcloud:index/serviceAccount:ServiceAccount my_sa sa-abc123
    

    !> 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.
    confluentcloud logo
    Confluent v2.10.0 published on Wednesday, Nov 20, 2024 by Pulumi