1. Packages
  2. Aiven Provider
  3. API Docs
  4. KafkaUser
Aiven v6.25.0 published on Friday, Sep 27, 2024 by Pulumi

aiven.KafkaUser

Explore with Pulumi AI

aiven logo
Aiven v6.25.0 published on Friday, Sep 27, 2024 by Pulumi

    Creates and manages an Aiven for Apache Kafka® service user.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as aiven from "@pulumi/aiven";
    
    const exampleServiceUser = new aiven.KafkaUser("example_service_user", {
        serviceName: exampleKafka.serviceName,
        project: exampleProject.project,
        username: "example-kafka-user",
        password: serviceUserPw,
    });
    
    import pulumi
    import pulumi_aiven as aiven
    
    example_service_user = aiven.KafkaUser("example_service_user",
        service_name=example_kafka["serviceName"],
        project=example_project["project"],
        username="example-kafka-user",
        password=service_user_pw)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aiven/sdk/v6/go/aiven"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := aiven.NewKafkaUser(ctx, "example_service_user", &aiven.KafkaUserArgs{
    			ServiceName: pulumi.Any(exampleKafka.ServiceName),
    			Project:     pulumi.Any(exampleProject.Project),
    			Username:    pulumi.String("example-kafka-user"),
    			Password:    pulumi.Any(serviceUserPw),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aiven = Pulumi.Aiven;
    
    return await Deployment.RunAsync(() => 
    {
        var exampleServiceUser = new Aiven.KafkaUser("example_service_user", new()
        {
            ServiceName = exampleKafka.ServiceName,
            Project = exampleProject.Project,
            Username = "example-kafka-user",
            Password = serviceUserPw,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aiven.KafkaUser;
    import com.pulumi.aiven.KafkaUserArgs;
    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 exampleServiceUser = new KafkaUser("exampleServiceUser", KafkaUserArgs.builder()
                .serviceName(exampleKafka.serviceName())
                .project(exampleProject.project())
                .username("example-kafka-user")
                .password(serviceUserPw)
                .build());
    
        }
    }
    
    resources:
      exampleServiceUser:
        type: aiven:KafkaUser
        name: example_service_user
        properties:
          serviceName: ${exampleKafka.serviceName}
          project: ${exampleProject.project}
          username: example-kafka-user
          password: ${serviceUserPw}
    

    Create KafkaUser Resource

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

    Constructor syntax

    new KafkaUser(name: string, args: KafkaUserArgs, opts?: CustomResourceOptions);
    @overload
    def KafkaUser(resource_name: str,
                  args: KafkaUserArgs,
                  opts: Optional[ResourceOptions] = None)
    
    @overload
    def KafkaUser(resource_name: str,
                  opts: Optional[ResourceOptions] = None,
                  project: Optional[str] = None,
                  service_name: Optional[str] = None,
                  username: Optional[str] = None,
                  password: Optional[str] = None)
    func NewKafkaUser(ctx *Context, name string, args KafkaUserArgs, opts ...ResourceOption) (*KafkaUser, error)
    public KafkaUser(string name, KafkaUserArgs args, CustomResourceOptions? opts = null)
    public KafkaUser(String name, KafkaUserArgs args)
    public KafkaUser(String name, KafkaUserArgs args, CustomResourceOptions options)
    
    type: aiven:KafkaUser
    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 KafkaUserArgs
    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 KafkaUserArgs
    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 KafkaUserArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args KafkaUserArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args KafkaUserArgs
    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 kafkaUserResource = new Aiven.KafkaUser("kafkaUserResource", new()
    {
        Project = "string",
        ServiceName = "string",
        Username = "string",
        Password = "string",
    });
    
    example, err := aiven.NewKafkaUser(ctx, "kafkaUserResource", &aiven.KafkaUserArgs{
    	Project:     pulumi.String("string"),
    	ServiceName: pulumi.String("string"),
    	Username:    pulumi.String("string"),
    	Password:    pulumi.String("string"),
    })
    
    var kafkaUserResource = new KafkaUser("kafkaUserResource", KafkaUserArgs.builder()
        .project("string")
        .serviceName("string")
        .username("string")
        .password("string")
        .build());
    
    kafka_user_resource = aiven.KafkaUser("kafkaUserResource",
        project="string",
        service_name="string",
        username="string",
        password="string")
    
    const kafkaUserResource = new aiven.KafkaUser("kafkaUserResource", {
        project: "string",
        serviceName: "string",
        username: "string",
        password: "string",
    });
    
    type: aiven:KafkaUser
    properties:
        password: string
        project: string
        serviceName: string
        username: string
    

    KafkaUser Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The KafkaUser resource accepts the following input properties:

    Project string
    The name of the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
    ServiceName string
    The name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
    Username string
    Name of the Kafka service user. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
    Password string
    The Kafka service user's password.
    Project string
    The name of the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
    ServiceName string
    The name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
    Username string
    Name of the Kafka service user. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
    Password string
    The Kafka service user's password.
    project String
    The name of the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
    serviceName String
    The name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
    username String
    Name of the Kafka service user. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
    password String
    The Kafka service user's password.
    project string
    The name of the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
    serviceName string
    The name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
    username string
    Name of the Kafka service user. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
    password string
    The Kafka service user's password.
    project str
    The name of the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
    service_name str
    The name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
    username str
    Name of the Kafka service user. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
    password str
    The Kafka service user's password.
    project String
    The name of the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
    serviceName String
    The name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
    username String
    Name of the Kafka service user. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
    password String
    The Kafka service user's password.

    Outputs

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

    AccessCert string
    Access certificate for the user.
    AccessKey string
    Access certificate key for the user.
    Id string
    The provider-assigned unique ID for this managed resource.
    Type string
    User account type, such as primary or regular account.
    AccessCert string
    Access certificate for the user.
    AccessKey string
    Access certificate key for the user.
    Id string
    The provider-assigned unique ID for this managed resource.
    Type string
    User account type, such as primary or regular account.
    accessCert String
    Access certificate for the user.
    accessKey String
    Access certificate key for the user.
    id String
    The provider-assigned unique ID for this managed resource.
    type String
    User account type, such as primary or regular account.
    accessCert string
    Access certificate for the user.
    accessKey string
    Access certificate key for the user.
    id string
    The provider-assigned unique ID for this managed resource.
    type string
    User account type, such as primary or regular account.
    access_cert str
    Access certificate for the user.
    access_key str
    Access certificate key for the user.
    id str
    The provider-assigned unique ID for this managed resource.
    type str
    User account type, such as primary or regular account.
    accessCert String
    Access certificate for the user.
    accessKey String
    Access certificate key for the user.
    id String
    The provider-assigned unique ID for this managed resource.
    type String
    User account type, such as primary or regular account.

    Look up Existing KafkaUser Resource

    Get an existing KafkaUser 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?: KafkaUserState, opts?: CustomResourceOptions): KafkaUser
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            access_cert: Optional[str] = None,
            access_key: Optional[str] = None,
            password: Optional[str] = None,
            project: Optional[str] = None,
            service_name: Optional[str] = None,
            type: Optional[str] = None,
            username: Optional[str] = None) -> KafkaUser
    func GetKafkaUser(ctx *Context, name string, id IDInput, state *KafkaUserState, opts ...ResourceOption) (*KafkaUser, error)
    public static KafkaUser Get(string name, Input<string> id, KafkaUserState? state, CustomResourceOptions? opts = null)
    public static KafkaUser get(String name, Output<String> id, KafkaUserState 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:
    AccessCert string
    Access certificate for the user.
    AccessKey string
    Access certificate key for the user.
    Password string
    The Kafka service user's password.
    Project string
    The name of the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
    ServiceName string
    The name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
    Type string
    User account type, such as primary or regular account.
    Username string
    Name of the Kafka service user. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
    AccessCert string
    Access certificate for the user.
    AccessKey string
    Access certificate key for the user.
    Password string
    The Kafka service user's password.
    Project string
    The name of the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
    ServiceName string
    The name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
    Type string
    User account type, such as primary or regular account.
    Username string
    Name of the Kafka service user. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
    accessCert String
    Access certificate for the user.
    accessKey String
    Access certificate key for the user.
    password String
    The Kafka service user's password.
    project String
    The name of the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
    serviceName String
    The name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
    type String
    User account type, such as primary or regular account.
    username String
    Name of the Kafka service user. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
    accessCert string
    Access certificate for the user.
    accessKey string
    Access certificate key for the user.
    password string
    The Kafka service user's password.
    project string
    The name of the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
    serviceName string
    The name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
    type string
    User account type, such as primary or regular account.
    username string
    Name of the Kafka service user. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
    access_cert str
    Access certificate for the user.
    access_key str
    Access certificate key for the user.
    password str
    The Kafka service user's password.
    project str
    The name of the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
    service_name str
    The name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
    type str
    User account type, such as primary or regular account.
    username str
    Name of the Kafka service user. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
    accessCert String
    Access certificate for the user.
    accessKey String
    Access certificate key for the user.
    password String
    The Kafka service user's password.
    project String
    The name of the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
    serviceName String
    The name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
    type String
    User account type, such as primary or regular account.
    username String
    Name of the Kafka service user. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.

    Import

    $ pulumi import aiven:index/kafkaUser:KafkaUser example_user PROJECT/SERVICE_NAME/USERNAME
    

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

    Package Details

    Repository
    Aiven pulumi/pulumi-aiven
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the aiven Terraform Provider.
    aiven logo
    Aiven v6.25.0 published on Friday, Sep 27, 2024 by Pulumi