-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add new resources for Kafka user, topic, and ACL (#7)
* feat: add new resources for Kafka user, topic, and ACL * chore: update go.mod and go.sum with new terraform-plugin-framework-validators version * feat: add resources for Kafka user, topic, and ACL * chore: update Kafka topic resource field name to `topic_id` * feat: update resource example * feat: update Kafka topic resource field name to `topic_id`
- Loading branch information
Showing
15 changed files
with
1,000 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
--- | ||
# generated by https://github.com/hashicorp/terraform-plugin-docs | ||
page_title: "automq_integration Resource - automq" | ||
subcategory: "" | ||
description: |- | ||
Integration resource | ||
--- | ||
|
||
# automq_integration (Resource) | ||
|
||
Integration resource | ||
|
||
|
||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Required | ||
|
||
- `endpoint` (String) Endpoint of the integration | ||
- `environment_id` (String) Target environment ID | ||
- `name` (String) Name of the integration | ||
- `type` (String) Type of the integration | ||
|
||
### Optional | ||
|
||
- `kafka_config` (Attributes) Kafka configuration (see [below for nested schema](#nestedatt--kafka_config)) | ||
- `prometheus_config` (Attributes) Prometheus (see [below for nested schema](#nestedatt--prometheus_config)) | ||
|
||
### Read-Only | ||
|
||
- `id` (String) Integration identifier | ||
|
||
<a id="nestedatt--kafka_config"></a> | ||
### Nested Schema for `kafka_config` | ||
|
||
Required: | ||
|
||
- `sasl_mechanism` (String) SASL mechanism for Kafka | ||
- `sasl_password` (String) SASL password for Kafka | ||
- `sasl_username` (String) SASL username for Kafka | ||
- `security_protocol` (String) Security protocol for Kafka | ||
|
||
|
||
<a id="nestedatt--prometheus_config"></a> | ||
### Nested Schema for `prometheus_config` | ||
|
||
Optional: | ||
|
||
- `bearer_token` (String) Bearer token | ||
- `password` (String) Password | ||
- `username` (String) Username |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
--- | ||
# generated by https://github.com/hashicorp/terraform-plugin-docs | ||
page_title: "automq_kafka_acl Resource - automq" | ||
subcategory: "" | ||
description: |- | ||
Kafka ACL resource | ||
--- | ||
|
||
# automq_kafka_acl (Resource) | ||
|
||
Kafka ACL resource | ||
|
||
|
||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Required | ||
|
||
- `environment_id` (String) Target Kafka environment | ||
- `id` (String) Kafka instance ID | ||
- `kafka_instance` (String) Target Kafka instance ID | ||
- `operation_group` (String) Operation group for ACL | ||
- `pattern_type` (String) Pattern type for resource | ||
- `principal` (String) Principal for ACL | ||
- `resource_name` (String) Name of the resource for ACL | ||
- `resource_type` (String) Resource type for ACL | ||
|
||
### Optional | ||
|
||
- `permission` (String) Permission type for ACL |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
--- | ||
# generated by https://github.com/hashicorp/terraform-plugin-docs | ||
page_title: "automq_kafka_topic Resource - automq" | ||
subcategory: "" | ||
description: |- | ||
Kafka Topic resource | ||
--- | ||
|
||
# automq_kafka_topic (Resource) | ||
|
||
Kafka Topic resource | ||
|
||
|
||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Required | ||
|
||
- `compact_strategy` (String) Compaction strategy for the Kafka topic | ||
- `environment_id` (String) Target Kafka environment | ||
- `kafka_instance` (String) Target Kafka instance ID | ||
- `name` (String) Name of the Kafka topic | ||
|
||
### Optional | ||
|
||
- `configs` (Map of String) Additional configuration for the Kafka topic | ||
- `partition` (Number) Number of partitions for the Kafka topic | ||
|
||
### Read-Only | ||
|
||
- `topic_id` (String) Kafka topic identifier |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
--- | ||
# generated by https://github.com/hashicorp/terraform-plugin-docs | ||
page_title: "automq_kafka_user Resource - automq" | ||
subcategory: "" | ||
description: |- | ||
Kafka User resource | ||
--- | ||
|
||
# automq_kafka_user (Resource) | ||
|
||
Kafka User resource | ||
|
||
|
||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Required | ||
|
||
- `environment_id` (String) Target environment ID | ||
- `kafka_instance_id` (String) Target Kafka instance ID | ||
- `password` (String) Password for the Kafka user | ||
- `username` (String) Username for the Kafka user | ||
|
||
### Read-Only | ||
|
||
- `id` (String) Kafka user identifier |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
terraform { | ||
required_providers { | ||
automq = { | ||
source = "hashicorp.com/edu/automq" | ||
} | ||
} | ||
required_version = ">= 0.1" | ||
} | ||
|
||
provider "automq" { | ||
byoc_host = "http://localhost:8081" | ||
token = "123456" | ||
} | ||
|
||
resource "automq_intergation" "example" { | ||
environment_id = "example123" | ||
name = "example" | ||
type = "Prometheus" | ||
endpoint = "http://localhost:8081" | ||
prometheus_config = { | ||
"username" = "admin" | ||
"password" = "admin" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
terraform { | ||
required_providers { | ||
automq = { | ||
source = "hashicorp.com/edu/automq" | ||
} | ||
} | ||
required_version = ">= 0.1" | ||
} | ||
|
||
provider "automq" { | ||
byoc_host = "http://localhost:8081" | ||
token = "123456" | ||
} | ||
|
||
resource "automq_kafka_acl" "example" { | ||
environment_id = "example123" | ||
kafka_instance = "kf-rrn5s50fzpr23urd" | ||
resource_type = "TOPIC" | ||
resource_name = "example-" | ||
pattern_type = "PREFIXED" | ||
principal = "automq_kafka_user" | ||
operation_group = "ALL" | ||
permission = "ALLOW" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
terraform { | ||
required_providers { | ||
automq = { | ||
source = "hashicorp.com/edu/automq" | ||
} | ||
} | ||
required_version = ">= 0.1" | ||
} | ||
|
||
provider "automq" { | ||
byoc_host = "http://localhost:8081" | ||
token = "123456" | ||
} | ||
|
||
resource "automq_kafka_topic" "example" { | ||
environment_id = "example123" | ||
kafka_instance = "kf-rrn5s50fzpr23urd" | ||
name = "example" | ||
partitions = 16 | ||
compact_strategy = "DELETE" | ||
config = { | ||
"retention.ms" = "86400000" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
terraform { | ||
required_providers { | ||
automq = { | ||
source = "hashicorp.com/edu/automq" | ||
} | ||
} | ||
required_version = ">= 0.1" | ||
} | ||
|
||
provider "automq" { | ||
byoc_host = "http://localhost:8081" | ||
token = "123456" | ||
} | ||
|
||
resource "automq_kafka_user" "example" { | ||
evnironment_id = "example123" | ||
kafka_instance = "kf-rrn5s50fzpr23urd" | ||
username = "automq_kafka_user" | ||
password = "example" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.