From 54b1948dad0210a87b36d4b2bb63080f8c684e17 Mon Sep 17 00:00:00 2001 From: Aleksander Zaruczewski Date: Thu, 28 Mar 2024 18:36:23 +0200 Subject: [PATCH] docs(kafka_schema_registry_acl): add example and import cmd --- docs/resources/kafka_schema_registry_acl.md | 20 ++++++++++++++++++- .../aiven_kafka_schema_registry_acl/import.sh | 1 + .../resource.tf | 7 +++++++ 3 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 examples/resources/aiven_kafka_schema_registry_acl/import.sh create mode 100644 examples/resources/aiven_kafka_schema_registry_acl/resource.tf diff --git a/docs/resources/kafka_schema_registry_acl.md b/docs/resources/kafka_schema_registry_acl.md index d3c5f7894..6f690c838 100644 --- a/docs/resources/kafka_schema_registry_acl.md +++ b/docs/resources/kafka_schema_registry_acl.md @@ -10,7 +10,17 @@ description: |- The Resource Kafka Schema Registry ACL resource allows the creation and management of Schema Registry ACLs for an Aiven Kafka service. - +## Example Usage + +```terraform +resource "aiven_kafka_schema_registry_acl" "foo" { + project = aiven_project.kafka-schemas-project1.project + service_name = aiven_kafka.kafka-service1.service_name + resource = "Subject:topic-1" + username = "group-user-*" + permission = "schema_registry_read" +} +``` ## Schema @@ -42,3 +52,11 @@ Optional: - `delete` (String) - `read` (String) - `update` (String) + +## Import + +Import is supported using the following syntax: + +```shell +terraform import aiven_kafka_schema_registry_acl.foo PROJECT/SERVICE_NAME +``` diff --git a/examples/resources/aiven_kafka_schema_registry_acl/import.sh b/examples/resources/aiven_kafka_schema_registry_acl/import.sh new file mode 100644 index 000000000..60a7de9fc --- /dev/null +++ b/examples/resources/aiven_kafka_schema_registry_acl/import.sh @@ -0,0 +1 @@ +terraform import aiven_kafka_schema_registry_acl.foo PROJECT/SERVICE_NAME \ No newline at end of file diff --git a/examples/resources/aiven_kafka_schema_registry_acl/resource.tf b/examples/resources/aiven_kafka_schema_registry_acl/resource.tf new file mode 100644 index 000000000..1b9a9a95f --- /dev/null +++ b/examples/resources/aiven_kafka_schema_registry_acl/resource.tf @@ -0,0 +1,7 @@ +resource "aiven_kafka_schema_registry_acl" "foo" { + project = aiven_project.kafka-schemas-project1.project + service_name = aiven_kafka.kafka-service1.service_name + resource = "Subject:topic-1" + username = "group-user-*" + permission = "schema_registry_read" +} \ No newline at end of file