published on Monday, Mar 9, 2026 by Pulumi
published on Monday, Mar 9, 2026 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 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/v5/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 * 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>",
});
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>")
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
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,
acl_id: 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",
AclId = "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"),
AclId: pulumi.String("string"),
})
var kafkaAclResource = new KafkaAcl("kafkaAclResource", KafkaAclArgs.builder()
.permission("string")
.project("string")
.serviceName("string")
.topic("string")
.username("string")
.aclId("string")
.build());
kafka_acl_resource = aiven.KafkaAcl("kafkaAclResource",
permission="string",
project="string",
service_name="string",
topic="string",
username="string",
acl_id="string")
const kafkaAclResource = new aiven.KafkaAcl("kafkaAclResource", {
permission: "string",
project: "string",
serviceName: "string",
topic: "string",
username: "string",
aclId: "string",
});
type: aiven:KafkaAcl
properties:
aclId: string
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
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The KafkaAcl resource accepts the following input properties:
- Permission string
- Kafka permission to grant. The possible values are
admin,read,readwriteandwrite. 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.
- Service
Name 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 string - Kafka ACL ID
- Permission string
- Kafka permission to grant. The possible values are
admin,read,readwriteandwrite. 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.
- Service
Name 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 string - Kafka ACL ID
- permission String
- Kafka permission to grant. The possible values are
admin,read,readwriteandwrite. 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.
- service
Name 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 String - Kafka ACL ID
- permission string
- Kafka permission to grant. The possible values are
admin,read,readwriteandwrite. 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.
- service
Name 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 string - Kafka ACL ID
- permission str
- Kafka permission to grant. The possible values are
admin,read,readwriteandwrite. 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.
- acl_
id str - Kafka ACL ID
- permission String
- Kafka permission to grant. The possible values are
admin,read,readwriteandwrite. 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.
- service
Name 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 String - Kafka ACL ID
Outputs
All input properties are implicitly available as output properties. Additionally, the KafkaAcl resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- 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) -> KafkaAclfunc 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)resources: _: type: aiven:KafkaAcl get: 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.
- Acl
Id string - Kafka ACL ID
- Permission string
- Kafka permission to grant. The possible values are
admin,read,readwriteandwrite. 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.
- Service
Name 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 string - Kafka ACL ID
- Permission string
- Kafka permission to grant. The possible values are
admin,read,readwriteandwrite. 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.
- Service
Name 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 String - Kafka ACL ID
- permission String
- Kafka permission to grant. The possible values are
admin,read,readwriteandwrite. 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.
- service
Name 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 string - Kafka ACL ID
- permission string
- Kafka permission to grant. The possible values are
admin,read,readwriteandwrite. 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.
- service
Name 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,readwriteandwrite. 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.
- acl
Id String - Kafka ACL ID
- permission String
- Kafka permission to grant. The possible values are
admin,read,readwriteandwrite. 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.
- service
Name 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
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
aivenTerraform Provider.
published on Monday, Mar 9, 2026 by Pulumi
