Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: update mirrormaker documentation #2020

Merged
merged 1 commit into from
Jan 28, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions docs/data-sources/kafka_mirrormaker.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,19 @@
page_title: "aiven_kafka_mirrormaker Data Source - terraform-provider-aiven"
subcategory: ""
description: |-
The Kafka MirrorMaker data source provides information about the existing Aiven Kafka MirrorMaker 2 service.
Gets information about an Aiven for Apache Kafka® MirrorMaker 2 service.
---

# aiven_kafka_mirrormaker (Data Source)

The Kafka MirrorMaker data source provides information about the existing Aiven Kafka MirrorMaker 2 service.
Gets information about an Aiven for Apache Kafka® MirrorMaker 2 service.

## Example Usage

```terraform
data "aiven_kafka_mirrormaker" "mm1" {
project = data.aiven_project.pr1.project
service_name = "my-mm1"
data "aiven_kafka_mirrormaker" "example_mirrormaker" {
project = data.aiven_project.example_project.project
service_name = "example-mirrormaker-service"
}
```

Expand Down
24 changes: 12 additions & 12 deletions docs/data-sources/mirrormaker_replication_flow.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,19 @@
page_title: "aiven_mirrormaker_replication_flow Data Source - terraform-provider-aiven"
subcategory: ""
description: |-
The MirrorMaker 2 Replication Flow data source provides information about the existing MirrorMaker 2 Replication Flow on Aiven Cloud.
Gets information about an Aiven for Apache Kafka® MirrorMaker 2 https://aiven.io/docs/products/kafka/kafka-mirrormaker replication flow.
---

# aiven_mirrormaker_replication_flow (Data Source)

The MirrorMaker 2 Replication Flow data source provides information about the existing MirrorMaker 2 Replication Flow on Aiven Cloud.
Gets information about an [Aiven for Apache Kafka® MirrorMaker 2](https://aiven.io/docs/products/kafka/kafka-mirrormaker) replication flow.

## Example Usage

```terraform
data "aiven_mirrormaker_replication_flow" "f1" {
project = aiven_project.kafka-mm-project1.project
service_name = aiven_kafka.mm.service_name
data "aiven_mirrormaker_replication_flow" "example_replication_flow" {
project = data.aiven_project.example_project.project
service_name = aiven_kafka.example_kafka.service_name
source_cluster = aiven_kafka.source.service_name
target_cluster = aiven_kafka.target.service_name
}
Expand All @@ -33,16 +33,16 @@ data "aiven_mirrormaker_replication_flow" "f1" {

### Read-Only

- `config_properties_exclude` (Set of String) List of topic configuration properties and/or regular expressions to not replicate. The properties that are not replicated by default are: `follower.replication.throttled.replicas`, `leader.replication.throttled.replicas`, `message.timestamp.difference.max.ms`, `message.timestamp.type`, `unclean.leader.election.enable`, and `min.insync.replicas`. Setting this overrides the defaults. For example, to enable replication for 'min.insync.replicas' and 'unclean.leader.election.enable' set this to: ["follower\\\\.replication\\\\.throttled\\\\.replicas", "leader\\\\.replication\\\\.throttled\\\\.replicas", "message\\\\.timestamp\\\\.difference\\\\.max\\\\.ms", "message\\\\.timestamp\\\\.type"]
- `emit_backward_heartbeats_enabled` (Boolean) Whether to emit heartbeats to the direction opposite to the flow, i.e. to the source cluster. The default value is `false`.
- `emit_heartbeats_enabled` (Boolean) Whether to emit heartbeats to the target cluster. The default value is `false`.
- `enable` (Boolean) Enable of disable replication flows for a service.
- `exactly_once_delivery_enabled` (Boolean) Whether to enable exactly-once message delivery. We recommend you set this to `enabled` for new replications. The default value is `false`.
- `config_properties_exclude` (Set of String) List of topic configuration properties and regular expressions to not replicate. The properties that are not replicated by default are: `follower.replication.throttled.replicas`, `leader.replication.throttled.replicas`, `message.timestamp.difference.max.ms`, `message.timestamp.type`, `unclean.leader.election.enable`, and `min.insync.replicas`. Setting this overrides the defaults. For example, to enable replication for 'min.insync.replicas' and 'unclean.leader.election.enable' set this to: ["follower\\\\.replication\\\\.throttled\\\\.replicas", "leader\\\\.replication\\\\.throttled\\\\.replicas", "message\\\\.timestamp\\\\.difference\\\\.max\\\\.ms", "message\\\\.timestamp\\\\.type"]
- `emit_backward_heartbeats_enabled` (Boolean) Enables emitting heartbeats to the direction opposite to the flow, i.e. to the source cluster. The default value is `false`.
- `emit_heartbeats_enabled` (Boolean) Enables emitting heartbeats to the target cluster. The default value is `false`.
- `enable` (Boolean) Enables replication flow for a service.
- `exactly_once_delivery_enabled` (Boolean) Enables exactly-once message delivery. Set this to `enabled` for new replications. The default value is `false`.
- `id` (String) The ID of this resource.
- `offset_syncs_topic_location` (String) Offset syncs topic location. The possible values are `source` and `target`.
- `replication_factor` (Number) Replication factor, `>= 1`.
- `replication_policy_class` (String) Replication policy class. The possible values are `org.apache.kafka.connect.mirror.DefaultReplicationPolicy` and `org.apache.kafka.connect.mirror.IdentityReplicationPolicy`. The default value is `org.apache.kafka.connect.mirror.DefaultReplicationPolicy`.
- `sync_group_offsets_enabled` (Boolean) Sync consumer group offsets. The default value is `false`.
- `sync_group_offsets_interval_seconds` (Number) Frequency of consumer group offset sync. The default value is `1`.
- `topics` (List of String) List of topics and/or regular expressions to replicate
- `topics_blacklist` (List of String) List of topics and/or regular expressions to not replicate.
- `topics` (List of String) The topics to include in the replica defined by a [list of regular expressions in Java format](https://aiven.io/docs/products/kafka/kafka-mirrormaker/concepts/replication-flow-topics-regex).
- `topics_blacklist` (List of String) The topics to exclude from the replica defined by a [list of regular expressions in Java format](https://aiven.io/docs/products/kafka/kafka-mirrormaker/concepts/replication-flow-topics-regex).
12 changes: 6 additions & 6 deletions docs/resources/kafka_mirrormaker.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,21 @@
page_title: "aiven_kafka_mirrormaker Resource - terraform-provider-aiven"
subcategory: ""
description: |-
The Kafka MirrorMaker resource allows the creation and management of Aiven Kafka MirrorMaker 2 services.
Creates and manages an Aiven for Apache Kafka® MirrorMaker 2 https://aiven.io/docs/products/kafka/kafka-mirrormaker service.
---

# aiven_kafka_mirrormaker (Resource)

The Kafka MirrorMaker resource allows the creation and management of Aiven Kafka MirrorMaker 2 services.
Creates and manages an [Aiven for Apache Kafka® MirrorMaker 2](https://aiven.io/docs/products/kafka/kafka-mirrormaker) service.

## Example Usage

```terraform
resource "aiven_kafka_mirrormaker" "mm1" {
project = data.aiven_project.pr1.project
resource "aiven_kafka_mirrormaker" "example_mirrormaker" {
project = data.aiven_project.example_project.project
cloud_name = "google-europe-west1"
plan = "startup-4"
service_name = "my-mm1"
service_name = "example-mirrormaker-service"

kafka_mirrormaker_user_config {
ip_filter = ["0.0.0.0/0"]
Expand Down Expand Up @@ -176,5 +176,5 @@ Read-Only:
Import is supported using the following syntax:

```shell
terraform import aiven_kafka_mirrormaker.mm1 project/service_name
terraform import aiven_kafka_mirrormaker.example_mirrormaker PROJECT/SERVICE_NAME
```
26 changes: 13 additions & 13 deletions docs/resources/mirrormaker_replication_flow.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,19 @@
page_title: "aiven_mirrormaker_replication_flow Resource - terraform-provider-aiven"
subcategory: ""
description: |-
The MirrorMaker 2 Replication Flow resource allows the creation and management of MirrorMaker 2 Replication Flows on Aiven Cloud.
Creates and manages an Aiven for Apache Kafka® MirrorMaker 2 https://aiven.io/docs/products/kafka/kafka-mirrormaker replication flow.
---

# aiven_mirrormaker_replication_flow (Resource)

The MirrorMaker 2 Replication Flow resource allows the creation and management of MirrorMaker 2 Replication Flows on Aiven Cloud.
Creates and manages an [Aiven for Apache Kafka® MirrorMaker 2](https://aiven.io/docs/products/kafka/kafka-mirrormaker) replication flow.

## Example Usage

```terraform
resource "aiven_mirrormaker_replication_flow" "f1" {
project = aiven_project.kafka-mm-project1.project
service_name = aiven_kafka.mm.service_name
resource "aiven_mirrormaker_replication_flow" "example_replication_flow" {
project = data.aiven_project.example_project.project
service_name = aiven_kafka.example_kafka.service_name
source_cluster = aiven_kafka.source.service_name
target_cluster = aiven_kafka.target.service_name
enable = true
Expand Down Expand Up @@ -46,7 +46,7 @@ resource "aiven_mirrormaker_replication_flow" "f1" {

### Required

- `enable` (Boolean) Enable of disable replication flows for a service.
- `enable` (Boolean) Enables replication flow for a service.
- `offset_syncs_topic_location` (String) Offset syncs topic location. The possible values are `source` and `target`.
- `project` (String) The name of the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
- `replication_policy_class` (String) Replication policy class. The possible values are `org.apache.kafka.connect.mirror.DefaultReplicationPolicy` and `org.apache.kafka.connect.mirror.IdentityReplicationPolicy`. The default value is `org.apache.kafka.connect.mirror.DefaultReplicationPolicy`.
Expand All @@ -56,16 +56,16 @@ resource "aiven_mirrormaker_replication_flow" "f1" {

### Optional

- `config_properties_exclude` (Set of String) List of topic configuration properties and/or regular expressions to not replicate. The properties that are not replicated by default are: `follower.replication.throttled.replicas`, `leader.replication.throttled.replicas`, `message.timestamp.difference.max.ms`, `message.timestamp.type`, `unclean.leader.election.enable`, and `min.insync.replicas`. Setting this overrides the defaults. For example, to enable replication for 'min.insync.replicas' and 'unclean.leader.election.enable' set this to: ["follower\\\\.replication\\\\.throttled\\\\.replicas", "leader\\\\.replication\\\\.throttled\\\\.replicas", "message\\\\.timestamp\\\\.difference\\\\.max\\\\.ms", "message\\\\.timestamp\\\\.type"]
- `emit_backward_heartbeats_enabled` (Boolean) Whether to emit heartbeats to the direction opposite to the flow, i.e. to the source cluster. The default value is `false`.
- `emit_heartbeats_enabled` (Boolean) Whether to emit heartbeats to the target cluster. The default value is `false`.
- `exactly_once_delivery_enabled` (Boolean) Whether to enable exactly-once message delivery. We recommend you set this to `enabled` for new replications. The default value is `false`.
- `config_properties_exclude` (Set of String) List of topic configuration properties and regular expressions to not replicate. The properties that are not replicated by default are: `follower.replication.throttled.replicas`, `leader.replication.throttled.replicas`, `message.timestamp.difference.max.ms`, `message.timestamp.type`, `unclean.leader.election.enable`, and `min.insync.replicas`. Setting this overrides the defaults. For example, to enable replication for 'min.insync.replicas' and 'unclean.leader.election.enable' set this to: ["follower\\\\.replication\\\\.throttled\\\\.replicas", "leader\\\\.replication\\\\.throttled\\\\.replicas", "message\\\\.timestamp\\\\.difference\\\\.max\\\\.ms", "message\\\\.timestamp\\\\.type"]
- `emit_backward_heartbeats_enabled` (Boolean) Enables emitting heartbeats to the direction opposite to the flow, i.e. to the source cluster. The default value is `false`.
- `emit_heartbeats_enabled` (Boolean) Enables emitting heartbeats to the target cluster. The default value is `false`.
- `exactly_once_delivery_enabled` (Boolean) Enables exactly-once message delivery. Set this to `enabled` for new replications. The default value is `false`.
- `replication_factor` (Number) Replication factor, `>= 1`.
- `sync_group_offsets_enabled` (Boolean) Sync consumer group offsets. The default value is `false`.
- `sync_group_offsets_interval_seconds` (Number) Frequency of consumer group offset sync. The default value is `1`.
- `timeouts` (Block, Optional) (see [below for nested schema](#nestedblock--timeouts))
- `topics` (List of String) List of topics and/or regular expressions to replicate
- `topics_blacklist` (List of String) List of topics and/or regular expressions to not replicate.
- `topics` (List of String) The topics to include in the replica defined by a [list of regular expressions in Java format](https://aiven.io/docs/products/kafka/kafka-mirrormaker/concepts/replication-flow-topics-regex).
- `topics_blacklist` (List of String) The topics to exclude from the replica defined by a [list of regular expressions in Java format](https://aiven.io/docs/products/kafka/kafka-mirrormaker/concepts/replication-flow-topics-regex).

### Read-Only

Expand All @@ -87,5 +87,5 @@ Optional:
Import is supported using the following syntax:

```shell
terraform import aiven_mirrormaker_replication_flow.f1 project/service_name/source_cluster/target_cluster
terraform import aiven_mirrormaker_replication_flow.example_replication_flow PROJECT/SERVICE_NAME/SOURCE_CLUSTER/TARGET_CLUSTER
```
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
data "aiven_kafka_mirrormaker" "mm1" {
project = data.aiven_project.pr1.project
service_name = "my-mm1"
}

data "aiven_kafka_mirrormaker" "example_mirrormaker" {
project = data.aiven_project.example_project.project
service_name = "example-mirrormaker-service"
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
data "aiven_mirrormaker_replication_flow" "f1" {
project = aiven_project.kafka-mm-project1.project
service_name = aiven_kafka.mm.service_name
data "aiven_mirrormaker_replication_flow" "example_replication_flow" {
project = data.aiven_project.example_project.project
service_name = aiven_kafka.example_kafka.service_name
source_cluster = aiven_kafka.source.service_name
target_cluster = aiven_kafka.target.service_name
}
Expand Down
2 changes: 1 addition & 1 deletion examples/resources/aiven_kafka_mirrormaker/import.sh
Original file line number Diff line number Diff line change
@@ -1 +1 @@
terraform import aiven_kafka_mirrormaker.mm1 project/service_name
terraform import aiven_kafka_mirrormaker.example_mirrormaker PROJECT/SERVICE_NAME
6 changes: 3 additions & 3 deletions examples/resources/aiven_kafka_mirrormaker/resource.tf
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
resource "aiven_kafka_mirrormaker" "mm1" {
project = data.aiven_project.pr1.project
resource "aiven_kafka_mirrormaker" "example_mirrormaker" {
project = data.aiven_project.example_project.project
cloud_name = "google-europe-west1"
plan = "startup-4"
service_name = "my-mm1"
service_name = "example-mirrormaker-service"

kafka_mirrormaker_user_config {
ip_filter = ["0.0.0.0/0"]
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
terraform import aiven_mirrormaker_replication_flow.f1 project/service_name/source_cluster/target_cluster
terraform import aiven_mirrormaker_replication_flow.example_replication_flow PROJECT/SERVICE_NAME/SOURCE_CLUSTER/TARGET_CLUSTER
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
resource "aiven_mirrormaker_replication_flow" "f1" {
project = aiven_project.kafka-mm-project1.project
service_name = aiven_kafka.mm.service_name
resource "aiven_mirrormaker_replication_flow" "example_replication_flow" {
project = data.aiven_project.example_project.project
service_name = aiven_kafka.example_kafka.service_name
source_cluster = aiven_kafka.source.service_name
target_cluster = aiven_kafka.target.service_name
enable = true
Expand Down
2 changes: 1 addition & 1 deletion internal/sdkprovider/service/kafka/kafka_mirrormaker.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ func aivenKafkaMirrormakerSchema() map[string]*schema.Schema {
}
func ResourceKafkaMirrormaker() *schema.Resource {
return &schema.Resource{
Description: "The Kafka MirrorMaker resource allows the creation and management of Aiven Kafka MirrorMaker 2 services.",
Description: "Creates and manages an [Aiven for Apache Kafka® MirrorMaker 2](https://aiven.io/docs/products/kafka/kafka-mirrormaker) service.",
CreateContext: schemautil.ResourceServiceCreateWrapper(schemautil.ServiceTypeKafkaMirrormaker),
ReadContext: schemautil.ResourceServiceRead,
UpdateContext: schemautil.ResourceServiceUpdate,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
func DatasourceKafkaMirrormaker() *schema.Resource {
return &schema.Resource{
ReadContext: schemautil.DatasourceServiceRead,
Description: "The Kafka MirrorMaker data source provides information about the existing Aiven Kafka MirrorMaker 2 service.",
Description: "Gets information about an Aiven for Apache Kafka® MirrorMaker 2 service.",
Schema: schemautil.ResourceSchemaAsDatasourceSchema(aivenKafkaMirrormakerSchema(), "project", "service_name"),
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
func DatasourceMirrorMakerReplicationFlowTopic() *schema.Resource {
return &schema.Resource{
ReadContext: common.WithGenClient(datasourceMirrorMakerReplicationFlowRead),
Description: "The MirrorMaker 2 Replication Flow data source provides information about the existing MirrorMaker 2 Replication Flow on Aiven Cloud.",
Description: "Gets information about an [Aiven for Apache Kafka® MirrorMaker 2](https://aiven.io/docs/products/kafka/kafka-mirrormaker) replication flow.",
Schema: schemautil.ResourceSchemaAsDatasourceSchema(
aivenMirrorMakerReplicationFlowSchema,
"project", "service_name", "source_cluster", "target_cluster"),
Expand Down
Loading
Loading