1. Packages
  2. Aiven
  3. API Docs
  4. KafkaAcl
Aiven v6.18.0 published on Thursday, Jun 27, 2024 by Pulumi

aiven.KafkaAcl

Explore with Pulumi AI

aiven logo
Aiven v6.18.0 published on Thursday, Jun 27, 2024 by Pulumi

    The Resource Kafka ACL resource allows the creation and management of ACLs for an Aiven Kafka service.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as aiven from "@pulumi/aiven";
    
    const mytestacl = new aiven.KafkaAcl("mytestacl", {
        project: myproject.project,
        serviceName: myservice.serviceName,
        topic: "<TOPIC_NAME_PATTERN>",
        permission: "admin",
        username: "<USERNAME_PATTERN>",
    });
    
    import pulumi
    import pulumi_aiven as aiven
    
    mytestacl = aiven.KafkaAcl("mytestacl",
        project=myproject["project"],
        service_name=myservice["serviceName"],
        topic="<TOPIC_NAME_PATTERN>",
        permission="admin",
        username="<USERNAME_PATTERN>")
    
    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.NewKafkaAcl(ctx, "mytestacl", &aiven.KafkaAclArgs{
    			Project:     pulumi.Any(myproject.Project),
    			ServiceName: pulumi.Any(myservice.ServiceName),
    			Topic:       pulumi.String("<TOPIC_NAME_PATTERN>"),
    			Permission:  pulumi.String("admin"),
    			Username:    pulumi.String("<USERNAME_PATTERN>"),
    		})
    		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 mytestacl = new Aiven.KafkaAcl("mytestacl", new()
        {
            Project = myproject.Project,
            ServiceName = myservice.ServiceName,
            Topic = "<TOPIC_NAME_PATTERN>",
            Permission = "admin",
            Username = "<USERNAME_PATTERN>",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aiven.KafkaAcl;
    import com.pulumi.aiven.KafkaAclArgs;
    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 mytestacl = new KafkaAcl("mytestacl", KafkaAclArgs.builder()
                .project(myproject.project())
                .serviceName(myservice.serviceName())
                .topic("<TOPIC_NAME_PATTERN>")
                .permission("admin")
                .username("<USERNAME_PATTERN>")
                .build());
    
        }
    }
    
    resources:
      mytestacl:
        type: aiven:KafkaAcl
        properties:
          project: ${myproject.project}
          serviceName: ${myservice.serviceName}
          topic: <TOPIC_NAME_PATTERN>
          permission: admin
          username: <USERNAME_PATTERN>
    

    Create KafkaAcl Resource

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

    Constructor syntax

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

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

    Permission string
    Kafka permission to grant. The possible values are admin, read, readwrite and write. Changing this property forces recreation of the resource.
    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.
    Topic string
    Topic name pattern for the ACL entry. Changing this property forces recreation of the resource.
    Username string
    Username pattern for the ACL entry. Changing this property forces recreation of the resource.
    Permission string
    Kafka permission to grant. The possible values are admin, read, readwrite and write. Changing this property forces recreation of the resource.
    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.
    Topic string
    Topic name pattern for the ACL entry. Changing this property forces recreation of the resource.
    Username string
    Username pattern for the ACL entry. Changing this property forces recreation of the resource.
    permission String
    Kafka permission to grant. The possible values are admin, read, readwrite and write. Changing this property forces recreation of the resource.
    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.
    topic String
    Topic name pattern for the ACL entry. Changing this property forces recreation of the resource.
    username String
    Username pattern for the ACL entry. Changing this property forces recreation of the resource.
    permission string
    Kafka permission to grant. The possible values are admin, read, readwrite and write. Changing this property forces recreation of the resource.
    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.
    topic string
    Topic name pattern for the ACL entry. Changing this property forces recreation of the resource.
    username string
    Username pattern for the ACL entry. Changing this property forces recreation of the resource.
    permission str
    Kafka permission to grant. The possible values are admin, read, readwrite and write. Changing this property forces recreation of the resource.
    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.
    topic str
    Topic name pattern for the ACL entry. Changing this property forces recreation of the resource.
    username str
    Username pattern for the ACL entry. Changing this property forces recreation of the resource.
    permission String
    Kafka permission to grant. The possible values are admin, read, readwrite and write. Changing this property forces recreation of the resource.
    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.
    topic String
    Topic name pattern for the ACL entry. Changing this property forces recreation of the resource.
    username String
    Username pattern for the ACL entry. Changing this property forces recreation of the resource.

    Outputs

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

    AclId string
    Kafka ACL ID
    Id string
    The provider-assigned unique ID for this managed resource.
    AclId string
    Kafka ACL ID
    Id string
    The provider-assigned unique ID for this managed resource.
    aclId String
    Kafka ACL ID
    id String
    The provider-assigned unique ID for this managed resource.
    aclId string
    Kafka ACL ID
    id string
    The provider-assigned unique ID for this managed resource.
    acl_id str
    Kafka ACL ID
    id str
    The provider-assigned unique ID for this managed resource.
    aclId String
    Kafka ACL ID
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing KafkaAcl Resource

    Get an existing KafkaAcl 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?: KafkaAclState, opts?: CustomResourceOptions): KafkaAcl
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            acl_id: Optional[str] = None,
            permission: Optional[str] = None,
            project: Optional[str] = None,
            service_name: Optional[str] = None,
            topic: Optional[str] = None,
            username: Optional[str] = None) -> KafkaAcl
    func GetKafkaAcl(ctx *Context, name string, id IDInput, state *KafkaAclState, opts ...ResourceOption) (*KafkaAcl, error)
    public static KafkaAcl Get(string name, Input<string> id, KafkaAclState? state, CustomResourceOptions? opts = null)
    public static KafkaAcl get(String name, Output<String> id, KafkaAclState 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:
    AclId string
    Kafka ACL ID
    Permission string
    Kafka permission to grant. The possible values are admin, read, readwrite and write. Changing this property forces recreation of the resource.
    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.
    Topic string
    Topic name pattern for the ACL entry. Changing this property forces recreation of the resource.
    Username string
    Username pattern for the ACL entry. Changing this property forces recreation of the resource.
    AclId string
    Kafka ACL ID
    Permission string
    Kafka permission to grant. The possible values are admin, read, readwrite and write. Changing this property forces recreation of the resource.
    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.
    Topic string
    Topic name pattern for the ACL entry. Changing this property forces recreation of the resource.
    Username string
    Username pattern for the ACL entry. Changing this property forces recreation of the resource.
    aclId String
    Kafka ACL ID
    permission String
    Kafka permission to grant. The possible values are admin, read, readwrite and write. Changing this property forces recreation of the resource.
    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.
    topic String
    Topic name pattern for the ACL entry. Changing this property forces recreation of the resource.
    username String
    Username pattern for the ACL entry. Changing this property forces recreation of the resource.
    aclId string
    Kafka ACL ID
    permission string
    Kafka permission to grant. The possible values are admin, read, readwrite and write. Changing this property forces recreation of the resource.
    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.
    topic string
    Topic name pattern for the ACL entry. Changing this property forces recreation of the resource.
    username string
    Username pattern for the ACL entry. Changing this property forces recreation of the resource.
    acl_id str
    Kafka ACL ID
    permission str
    Kafka permission to grant. The possible values are admin, read, readwrite and write. Changing this property forces recreation of the resource.
    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.
    topic str
    Topic name pattern for the ACL entry. Changing this property forces recreation of the resource.
    username str
    Username pattern for the ACL entry. Changing this property forces recreation of the resource.
    aclId String
    Kafka ACL ID
    permission String
    Kafka permission to grant. The possible values are admin, read, readwrite and write. Changing this property forces recreation of the resource.
    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.
    topic String
    Topic name pattern for the ACL entry. Changing this property forces recreation of the resource.
    username String
    Username pattern for the ACL entry. Changing this property forces recreation of the resource.

    Import

    $ pulumi import aiven:index/kafkaAcl:KafkaAcl mytestacl PROJECT/SERVICE_NAME/ID
    

    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.18.0 published on Thursday, Jun 27, 2024 by Pulumi