1. Packages
  2. Aiven
  3. API Docs
  4. KafkaAcl
Aiven v6.7.2 published on Tuesday, Oct 31, 2023 by Pulumi

aiven.KafkaAcl

Explore with Pulumi AI

aiven logo
Aiven v6.7.2 published on Tuesday, Oct 31, 2023 by Pulumi

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

    Example Usage

    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 = aiven_project.Myproject.Project,
            ServiceName = aiven_kafka.Myservice.Service_name,
            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(aiven_project.Myproject.Project),
    			ServiceName: pulumi.Any(aiven_kafka.Myservice.Service_name),
    			Topic:       pulumi.String("<TOPIC_NAME_PATTERN>"),
    			Permission:  pulumi.String("admin"),
    			Username:    pulumi.String("<USERNAME_PATTERN>"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    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(aiven_project.myproject().project())
                .serviceName(aiven_kafka.myservice().service_name())
                .topic("<TOPIC_NAME_PATTERN>")
                .permission("admin")
                .username("<USERNAME_PATTERN>")
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_aiven as aiven
    
    mytestacl = aiven.KafkaAcl("mytestacl",
        project=aiven_project["myproject"]["project"],
        service_name=aiven_kafka["myservice"]["service_name"],
        topic="<TOPIC_NAME_PATTERN>",
        permission="admin",
        username="<USERNAME_PATTERN>")
    
    import * as pulumi from "@pulumi/pulumi";
    import * as aiven from "@pulumi/aiven";
    
    const mytestacl = new aiven.KafkaAcl("mytestacl", {
        project: aiven_project.myproject.project,
        serviceName: aiven_kafka.myservice.service_name,
        topic: "<TOPIC_NAME_PATTERN>",
        permission: "admin",
        username: "<USERNAME_PATTERN>",
    });
    
    resources:
      mytestacl:
        type: aiven:KafkaAcl
        properties:
          project: ${aiven_project.myproject.project}
          serviceName: ${aiven_kafka.myservice.service_name}
          topic: <TOPIC_NAME_PATTERN>
          permission: admin
          username: <USERNAME_PATTERN>
    

    Create KafkaAcl Resource

    new KafkaAcl(name: string, args: KafkaAclArgs, opts?: CustomResourceOptions);
    @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)
    @overload
    def KafkaAcl(resource_name: str,
                 args: KafkaAclArgs,
                 opts: Optional[ResourceOptions] = 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.
    
    
    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.

    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. This property cannot be changed, doing so forces recreation of the resource.

    Project string

    Identifies the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.

    ServiceName string

    Specifies the name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.

    Topic string

    Topic name pattern for the ACL entry. This property cannot be changed, doing so forces recreation of the resource.

    Username string

    Username pattern for the ACL entry. This property cannot be changed, doing so forces recreation of the resource.

    Permission string

    Kafka permission to grant. The possible values are admin, read, readwrite and write. This property cannot be changed, doing so forces recreation of the resource.

    Project string

    Identifies the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.

    ServiceName string

    Specifies the name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.

    Topic string

    Topic name pattern for the ACL entry. This property cannot be changed, doing so forces recreation of the resource.

    Username string

    Username pattern for the ACL entry. This property cannot be changed, doing so forces recreation of the resource.

    permission String

    Kafka permission to grant. The possible values are admin, read, readwrite and write. This property cannot be changed, doing so forces recreation of the resource.

    project String

    Identifies the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.

    serviceName String

    Specifies the name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.

    topic String

    Topic name pattern for the ACL entry. This property cannot be changed, doing so forces recreation of the resource.

    username String

    Username pattern for the ACL entry. This property cannot be changed, doing so forces recreation of the resource.

    permission string

    Kafka permission to grant. The possible values are admin, read, readwrite and write. This property cannot be changed, doing so forces recreation of the resource.

    project string

    Identifies the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.

    serviceName string

    Specifies the name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.

    topic string

    Topic name pattern for the ACL entry. This property cannot be changed, doing so forces recreation of the resource.

    username string

    Username pattern for the ACL entry. This property cannot be changed, doing so forces recreation of the resource.

    permission str

    Kafka permission to grant. The possible values are admin, read, readwrite and write. This property cannot be changed, doing so forces recreation of the resource.

    project str

    Identifies the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.

    service_name str

    Specifies the name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.

    topic str

    Topic name pattern for the ACL entry. This property cannot be changed, doing so forces recreation of the resource.

    username str

    Username pattern for the ACL entry. This property cannot be changed, doing so forces recreation of the resource.

    permission String

    Kafka permission to grant. The possible values are admin, read, readwrite and write. This property cannot be changed, doing so forces recreation of the resource.

    project String

    Identifies the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.

    serviceName String

    Specifies the name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.

    topic String

    Topic name pattern for the ACL entry. This property cannot be changed, doing so forces recreation of the resource.

    username String

    Username pattern for the ACL entry. This property cannot be changed, doing so 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. This property cannot be changed, doing so forces recreation of the resource.

    Project string

    Identifies the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.

    ServiceName string

    Specifies the name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.

    Topic string

    Topic name pattern for the ACL entry. This property cannot be changed, doing so forces recreation of the resource.

    Username string

    Username pattern for the ACL entry. This property cannot be changed, doing so 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. This property cannot be changed, doing so forces recreation of the resource.

    Project string

    Identifies the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.

    ServiceName string

    Specifies the name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.

    Topic string

    Topic name pattern for the ACL entry. This property cannot be changed, doing so forces recreation of the resource.

    Username string

    Username pattern for the ACL entry. This property cannot be changed, doing so 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. This property cannot be changed, doing so forces recreation of the resource.

    project String

    Identifies the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.

    serviceName String

    Specifies the name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.

    topic String

    Topic name pattern for the ACL entry. This property cannot be changed, doing so forces recreation of the resource.

    username String

    Username pattern for the ACL entry. This property cannot be changed, doing so 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. This property cannot be changed, doing so forces recreation of the resource.

    project string

    Identifies the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.

    serviceName string

    Specifies the name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.

    topic string

    Topic name pattern for the ACL entry. This property cannot be changed, doing so forces recreation of the resource.

    username string

    Username pattern for the ACL entry. This property cannot be changed, doing so 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. This property cannot be changed, doing so forces recreation of the resource.

    project str

    Identifies the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.

    service_name str

    Specifies the name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.

    topic str

    Topic name pattern for the ACL entry. This property cannot be changed, doing so forces recreation of the resource.

    username str

    Username pattern for the ACL entry. This property cannot be changed, doing so 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. This property cannot be changed, doing so forces recreation of the resource.

    project String

    Identifies the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.

    serviceName String

    Specifies the name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.

    topic String

    Topic name pattern for the ACL entry. This property cannot be changed, doing so forces recreation of the resource.

    username String

    Username pattern for the ACL entry. This property cannot be changed, doing so forces recreation of the resource.

    Import

     $ pulumi import aiven:index/kafkaAcl:KafkaAcl mytestacl project/service_name/id
    

    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.7.2 published on Tuesday, Oct 31, 2023 by Pulumi