---
title: 'Ресурс selectel_dbaas_kafka_acl_v1'
sidebar_label: "selectel_dbaas_kafka_acl_v1"
description: 'Creates and manages an access control list (ACL) in a Kafka cluster using public API v1'
sidebar_position: 5
---

# Ресурс selectel\_dbaas\_kafka\_acl\_v1

:::info

Эта инструкция — копия документации Selectel Terraform-провайдера в [Terraform Registry](https://registry.terraform.io/providers/selectel/selectel/latest/docs).

:::

Creates and manages an access control list (ACL) in a Kafka cluster using public API v1. For more information about managing users in Kafka, see the [official Selectel documentation](/managed-databases/kafka/manage-users/).

## Example usage \{#example-usage}

```hcl
resource "selectel_dbaas_kafka_acl_v1" "acl_1" {
  project_id   = selectel_vpc_project_v2.project_1.id
  region       = "ru-3"
  datastore_id = selectel_dbaas_kafka_datastore_v1.cluster_1.id
  pattern      = "topic"
  pattern_type = "prefixed"
  allow_read   = true
  allow_write  = true
}
```

## Argument Reference \{#argument-reference}

* `pattern` - (Optional) Name or prefix of a topic to which you provide access. Changing this creates a new ACL. Must be skipped when `pattern_type` is `all`.

* `pattern_type` - (Required) ACL pattern type. Changing this creates a new ACL. Available ACL patterns are `prefixed`, `literal`, and  `all`. When `pattern_type` is `all`, skip `pattern`.

* `allow_read` - (Required) Allows to connect as a consumer.

* `allow_write` - (Required) Allows to connect as a producer.

* `project_id` - (Required) Unique identifier of the associated project. Changing this creates a new user. Retrieved from the [selectel\_vpc\_project\_v2](/terraform/selectel-provider-reference/resources/vpc_project_v2) resource. Learn more about [Projects](/access-control/projects/about-projects/).

* `region` - (Required) Pool where the database is located, for example, `ru-3`. Changing this creates a new ACL. Learn more about available pools in [Product availability by location](/infrastructure/product-availability-by-location/#managed-databases).

* `datastore_id` - (Required) Unique identifier of the associated cluster. Changing this creates a new ACL. Retrieved from the [selectel\_dbaas\_kafka\_datastore\_v1](/terraform/selectel-provider-reference/resources/dbaas_kafka_datastore_v1).

* `user_id` - (Required) Unique identifier of the associated user. Changing this creates a new ACL. Retrieved from the [selectel\_dbaas\_user\_v1](/terraform/selectel-provider-reference/resources/dbaas_user_v1) resource.

## Attributes Reference \{#attributes-reference}

* `status` - ACL status.
