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

chore: DENA-424 - add config for kafka connect #741

Merged
merged 5 commits into from
Dec 20, 2024
Merged

Conversation

fillyD
Copy link
Contributor

@fillyD fillyD commented Dec 20, 2024

Using kafka connect to consume from particular topics

  • customer-proposition.service-status.events.v3 - for account to service(s) mapping
  • account-identity.legacy.account.events - for denormalising the account model

Copy link

linear bot commented Dec 20, 2024

@fillyD fillyD marked this pull request as ready for review December 20, 2024 10:20
@fillyD fillyD requested review from a team as code owners December 20, 2024 10:20
@uw-infra
Copy link

uw-infra commented Dec 20, 2024

Terraform run output for

Cluster: dev-aws
Module: pubsub/kafka-shared-msk-dev-enablement
Path: dev-aws/kafka-shared-msk/dev-enablement
Commit ID: bf655b52c7dfba598f5e8f5995186fe7a5feb9ec
✅ Run Status: Ok, Run Summary: Plan: 7 to add, 0 to change, 0 to destroy.
Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
  + create

Terraform will perform the following actions:

  # kafka_topic.connect_configs will be created
  + resource "kafka_topic" "connect_configs" {
      + config             = {
          + "cleanup.policy"   = "compact"
          + "compression.type" = "zstd"
        }
      + id                 = (known after apply)
      + name               = "dev-enablement.connect-configs"
      + partitions         = 1
      + replication_factor = 3
    }

  # kafka_topic.connect_offsets will be created
  + resource "kafka_topic" "connect_offsets" {
      + config             = {
          + "cleanup.policy"   = "compact"
          + "compression.type" = "zstd"
        }
      + id                 = (known after apply)
      + name               = "dev-enablement.connect-offsets"
      + partitions         = 25
      + replication_factor = 3
    }

  # kafka_topic.connect_status will be created
  + resource "kafka_topic" "connect_status" {
      + config             = {
          + "cleanup.policy"   = "compact"
          + "compression.type" = "zstd"
        }
      + id                 = (known after apply)
      + name               = "dev-enablement.connect-status"
      + partitions         = 5
      + replication_factor = 3
    }

  # module.kafka_connect_full_internal_topics.kafka_acl.group_acl["dev-enablement.kafka-connect-group"] will be created
  + resource "kafka_acl" "group_acl" {
      + acl_host                     = "*"
      + acl_operation                = "Read"
      + acl_permission_type          = "Allow"
      + acl_principal                = "User:CN=dev-enablement/kafka-connect"
      + id                           = (known after apply)
      + resource_name                = "dev-enablement.kafka-connect-group"
      + resource_pattern_type_filter = "Literal"
      + resource_type                = "Group"
    }

  # module.kafka_connect_full_internal_topics.kafka_acl.topic_acl["dev-enablement.connect-configs"] will be created
  + resource "kafka_acl" "topic_acl" {
      + acl_host                     = "*"
      + acl_operation                = "Read"
      + acl_permission_type          = "Allow"
      + acl_principal                = "User:CN=dev-enablement/kafka-connect"
      + id                           = (known after apply)
      + resource_name                = "dev-enablement.connect-configs"
      + resource_pattern_type_filter = "Literal"
      + resource_type                = "Topic"
    }

  # module.kafka_connect_full_internal_topics.kafka_acl.topic_acl["dev-enablement.connect-offsets"] will be created
  + resource "kafka_acl" "topic_acl" {
      + acl_host                     = "*"
      + acl_operation                = "Read"
      + acl_permission_type          = "Allow"
      + acl_principal                = "User:CN=dev-enablement/kafka-connect"
      + id                           = (known after apply)
      + resource_name                = "dev-enablement.connect-offsets"
      + resource_pattern_type_filter = "Literal"
      + resource_type                = "Topic"
    }

  # module.kafka_connect_full_internal_topics.kafka_acl.topic_acl["dev-enablement.connect-status"] will be created
  + resource "kafka_acl" "topic_acl" {
      + acl_host                     = "*"
      + acl_operation                = "Read"
      + acl_permission_type          = "Allow"
      + acl_principal                = "User:CN=dev-enablement/kafka-connect"
      + id                           = (known after apply)
      + resource_name                = "dev-enablement.connect-status"
      + resource_pattern_type_filter = "Literal"
      + resource_type                = "Topic"
    }

Plan: 7 to add, 0 to change, 0 to destroy.

To manually trigger plan again please post @terraform-applier plan dev-aws/kafka-shared-msk/dev-enablement as comment.

@uw-infra
Copy link

uw-infra commented Dec 20, 2024

Terraform run output for

Cluster: dev-aws
Module: pubsub/kafka-shared-msk-account-identity
Path: dev-aws/kafka-shared-msk/account-identity
Commit ID: bf655b52c7dfba598f5e8f5995186fe7a5feb9ec
✅ Run Status: Ok, Run Summary: Plan: 2 to add, 0 to change, 0 to destroy.
Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
  + create

Terraform will perform the following actions:

  # module.kafka_connect_read_legacy_account_events.kafka_acl.group_acl["dev-enablement.kafka-connect-group"] will be created
  + resource "kafka_acl" "group_acl" {
      + acl_host                     = "*"
      + acl_operation                = "Read"
      + acl_permission_type          = "Allow"
      + acl_principal                = "User:CN=dev-enablement/kafka-connect"
      + id                           = (known after apply)
      + resource_name                = "dev-enablement.kafka-connect-group"
      + resource_pattern_type_filter = "Literal"
      + resource_type                = "Group"
    }

  # module.kafka_connect_read_legacy_account_events.kafka_acl.topic_acl["account-identity.legacy.account.events"] will be created
  + resource "kafka_acl" "topic_acl" {
      + acl_host                     = "*"
      + acl_operation                = "Read"
      + acl_permission_type          = "Allow"
      + acl_principal                = "User:CN=dev-enablement/kafka-connect"
      + id                           = (known after apply)
      + resource_name                = "account-identity.legacy.account.events"
      + resource_pattern_type_filter = "Literal"
      + resource_type                = "Topic"
    }

Plan: 2 to add, 0 to change, 0 to destroy.

To manually trigger plan again please post @terraform-applier plan dev-aws/kafka-shared-msk/account-identity as comment.

@uw-infra
Copy link

uw-infra commented Dec 20, 2024

Terraform run output for

Cluster: dev-aws
Module: pubsub/kafka-shared-msk-customer-proposition
Path: dev-aws/kafka-shared-msk/customer-proposition
Commit ID: bf655b52c7dfba598f5e8f5995186fe7a5feb9ec
✅ Run Status: Ok, Run Summary: Plan: 2 to add, 0 to change, 0 to destroy.
Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
  + create

Terraform will perform the following actions:

  # module.kafka_connect_read_service_status_events.kafka_acl.group_acl["dev-enablement.kafka-connect-group"] will be created
  + resource "kafka_acl" "group_acl" {
      + acl_host                     = "*"
      + acl_operation                = "Read"
      + acl_permission_type          = "Allow"
      + acl_principal                = "User:CN=dev-enablement/kafka-connect"
      + id                           = (known after apply)
      + resource_name                = "dev-enablement.kafka-connect-group"
      + resource_pattern_type_filter = "Literal"
      + resource_type                = "Group"
    }

  # module.kafka_connect_read_service_status_events.kafka_acl.topic_acl["customer-proposition.service-status.events.v3"] will be created
  + resource "kafka_acl" "topic_acl" {
      + acl_host                     = "*"
      + acl_operation                = "Read"
      + acl_permission_type          = "Allow"
      + acl_principal                = "User:CN=dev-enablement/kafka-connect"
      + id                           = (known after apply)
      + resource_name                = "customer-proposition.service-status.events.v3"
      + resource_pattern_type_filter = "Literal"
      + resource_type                = "Topic"
    }

Plan: 2 to add, 0 to change, 0 to destroy.

To manually trigger plan again please post @terraform-applier plan dev-aws/kafka-shared-msk/customer-proposition as comment.

@fillyD fillyD merged commit 78a283d into main Dec 20, 2024
2 checks passed
@fillyD fillyD deleted the chore/try-kafka-connect branch December 20, 2024 11:18
@uw-infra
Copy link

Terraform run output for

Cluster: dev-aws
Module: pubsub/kafka-shared-msk-dev-enablement
Path: dev-aws/kafka-shared-msk/dev-enablement
Commit ID: 78a283de12ac653e06dba4f8891ac3f340f8ad7f
✅ Run Status: Ok, Run Summary: Apply complete! Resources: 7 added, 0 changed, 0 destroyed
Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
  + create

Terraform will perform the following actions:

  # kafka_topic.connect_configs will be created
  + resource "kafka_topic" "connect_configs" {
      + config             = {
          + "cleanup.policy"   = "compact"
          + "compression.type" = "zstd"
        }
      + id                 = (known after apply)
      + name               = "dev-enablement.connect-configs"
      + partitions         = 1
      + replication_factor = 3
    }

  # kafka_topic.connect_offsets will be created
  + resource "kafka_topic" "connect_offsets" {
      + config             = {
          + "cleanup.policy"   = "compact"
          + "compression.type" = "zstd"
        }
      + id                 = (known after apply)
      + name               = "dev-enablement.connect-offsets"
      + partitions         = 25
      + replication_factor = 3
    }

  # kafka_topic.connect_status will be created
  + resource "kafka_topic" "connect_status" {
      + config             = {
          + "cleanup.policy"   = "compact"
          + "compression.type" = "zstd"
        }
      + id                 = (known after apply)
      + name               = "dev-enablement.connect-status"
      + partitions         = 5
      + replication_factor = 3
    }

  # module.kafka_connect_full_internal_topics.kafka_acl.group_acl["dev-enablement.kafka-connect-group"] will be created
  + resource "kafka_acl" "group_acl" {
      + acl_host                     = "*"
      + acl_operation                = "Read"
      + acl_permission_type          = "Allow"
      + acl_principal                = "User:CN=dev-enablement/kafka-connect"
      + id                           = (known after apply)
      + resource_name                = "dev-enablement.kafka-connect-group"
      + resource_pattern_type_filter = "Literal"
      + resource_type                = "Group"
    }

  # module.kafka_connect_full_internal_topics.kafka_acl.topic_acl["dev-enablement.connect-configs"] will be created
  + resource "kafka_acl" "topic_acl" {
      + acl_host                     = "*"
      + acl_operation                = "Read"
      + acl_permission_type          = "Allow"
      + acl_principal                = "User:CN=dev-enablement/kafka-connect"
      + id                           = (known after apply)
      + resource_name                = "dev-enablement.connect-configs"
      + resource_pattern_type_filter = "Literal"
      + resource_type                = "Topic"
    }

  # module.kafka_connect_full_internal_topics.kafka_acl.topic_acl["dev-enablement.connect-offsets"] will be created
  + resource "kafka_acl" "topic_acl" {
      + acl_host                     = "*"
      + acl_operation                = "Read"
      + acl_permission_type          = "Allow"
      + acl_principal                = "User:CN=dev-enablement/kafka-connect"
      + id                           = (known after apply)
      + resource_name                = "dev-enablement.connect-offsets"
      + resource_pattern_type_filter = "Literal"
      + resource_type                = "Topic"
    }

  # module.kafka_connect_full_internal_topics.kafka_acl.topic_acl["dev-enablement.connect-status"] will be created
  + resource "kafka_acl" "topic_acl" {
      + acl_host                     = "*"
      + acl_operation                = "Read"
      + acl_permission_type          = "Allow"
      + acl_principal                = "User:CN=dev-enablement/kafka-connect"
      + id                           = (known after apply)
      + resource_name                = "dev-enablement.connect-status"
      + resource_pattern_type_filter = "Literal"
      + resource_type                = "Topic"
    }

Plan: 7 to add, 0 to change, 0 to destroy.
module.kafka_connect_full_internal_topics.kafka_acl.topic_acl["dev-enablement.connect-offsets"]: Creating...
module.kafka_connect_full_internal_topics.kafka_acl.topic_acl["dev-enablement.connect-status"]: Creating...
kafka_topic.connect_offsets: Creating...
kafka_topic.connect_status: Creating...
kafka_topic.connect_configs: Creating...
module.kafka_connect_full_internal_topics.kafka_acl.group_acl["dev-enablement.kafka-connect-group"]: Creating...
module.kafka_connect_full_internal_topics.kafka_acl.topic_acl["dev-enablement.connect-configs"]: Creating...
module.kafka_connect_full_internal_topics.kafka_acl.topic_acl["dev-enablement.connect-status"]: Creation complete after 0s [id=User:CN=dev-enablement/kafka-connect|*|Read|Allow|Topic|dev-enablement.connect-status|Literal]
module.kafka_connect_full_internal_topics.kafka_acl.group_acl["dev-enablement.kafka-connect-group"]: Creation complete after 0s [id=User:CN=dev-enablement/kafka-connect|*|Read|Allow|Group|dev-enablement.kafka-connect-group|Literal]
module.kafka_connect_full_internal_topics.kafka_acl.topic_acl["dev-enablement.connect-configs"]: Creation complete after 0s [id=User:CN=dev-enablement/kafka-connect|*|Read|Allow|Topic|dev-enablement.connect-configs|Literal]
module.kafka_connect_full_internal_topics.kafka_acl.topic_acl["dev-enablement.connect-offsets"]: Creation complete after 0s [id=User:CN=dev-enablement/kafka-connect|*|Read|Allow|Topic|dev-enablement.connect-offsets|Literal]
kafka_topic.connect_status: Creation complete after 1s [id=dev-enablement.connect-status]
kafka_topic.connect_offsets: Creation complete after 1s [id=dev-enablement.connect-offsets]
kafka_topic.connect_configs: Creation complete after 1s [id=dev-enablement.connect-configs]

Warning: Argument is deprecated

  with provider["registry.terraform.io/mongey/kafka"],
  on __env.tf line 12, in provider "kafka":
  12: provider "kafka" {

This parameter is now deprecated and will be removed in a later release,
please use `client_key` instead.

(and one more similar warning elsewhere)

Apply complete! Resources: 7 added, 0 changed, 0 destroyed.

To manually trigger plan again please post @terraform-applier plan dev-aws/kafka-shared-msk/dev-enablement as comment.

@uw-infra
Copy link

Terraform run output for

Cluster: dev-aws
Module: pubsub/kafka-shared-msk-customer-proposition
Path: dev-aws/kafka-shared-msk/customer-proposition
Commit ID: 78a283de12ac653e06dba4f8891ac3f340f8ad7f
✅ Run Status: Ok, Run Summary: Apply complete! Resources: 2 added, 0 changed, 0 destroyed
Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
  + create

Terraform will perform the following actions:

  # module.kafka_connect_read_service_status_events.kafka_acl.group_acl["dev-enablement.kafka-connect-group"] will be created
  + resource "kafka_acl" "group_acl" {
      + acl_host                     = "*"
      + acl_operation                = "Read"
      + acl_permission_type          = "Allow"
      + acl_principal                = "User:CN=dev-enablement/kafka-connect"
      + id                           = (known after apply)
      + resource_name                = "dev-enablement.kafka-connect-group"
      + resource_pattern_type_filter = "Literal"
      + resource_type                = "Group"
    }

  # module.kafka_connect_read_service_status_events.kafka_acl.topic_acl["customer-proposition.service-status.events.v3"] will be created
  + resource "kafka_acl" "topic_acl" {
      + acl_host                     = "*"
      + acl_operation                = "Read"
      + acl_permission_type          = "Allow"
      + acl_principal                = "User:CN=dev-enablement/kafka-connect"
      + id                           = (known after apply)
      + resource_name                = "customer-proposition.service-status.events.v3"
      + resource_pattern_type_filter = "Literal"
      + resource_type                = "Topic"
    }

Plan: 2 to add, 0 to change, 0 to destroy.
module.kafka_connect_read_service_status_events.kafka_acl.topic_acl["customer-proposition.service-status.events.v3"]: Creating...
module.kafka_connect_read_service_status_events.kafka_acl.group_acl["dev-enablement.kafka-connect-group"]: Creating...
module.kafka_connect_read_service_status_events.kafka_acl.group_acl["dev-enablement.kafka-connect-group"]: Creation complete after 1s [id=User:CN=dev-enablement/kafka-connect|*|Read|Allow|Group|dev-enablement.kafka-connect-group|Literal]
module.kafka_connect_read_service_status_events.kafka_acl.topic_acl["customer-proposition.service-status.events.v3"]: Creation complete after 1s [id=User:CN=dev-enablement/kafka-connect|*|Read|Allow|Topic|customer-proposition.service-status.events.v3|Literal]

Warning: Argument is deprecated

  with provider["registry.terraform.io/mongey/kafka"],
  on __env.tf line 12, in provider "kafka":
  12: provider "kafka" {

This parameter is now deprecated and will be removed in a later release,
please use `client_cert` instead.

(and one more similar warning elsewhere)

Apply complete! Resources: 2 added, 0 changed, 0 destroyed.

To manually trigger plan again please post @terraform-applier plan dev-aws/kafka-shared-msk/customer-proposition as comment.

@uw-infra
Copy link

Terraform run output for

Cluster: dev-aws
Module: pubsub/kafka-shared-msk-account-identity
Path: dev-aws/kafka-shared-msk/account-identity
Commit ID: 78a283de12ac653e06dba4f8891ac3f340f8ad7f
✅ Run Status: Ok, Run Summary: Apply complete! Resources: 2 added, 0 changed, 0 destroyed
Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
  + create

Terraform will perform the following actions:

  # module.kafka_connect_read_legacy_account_events.kafka_acl.group_acl["dev-enablement.kafka-connect-group"] will be created
  + resource "kafka_acl" "group_acl" {
      + acl_host                     = "*"
      + acl_operation                = "Read"
      + acl_permission_type          = "Allow"
      + acl_principal                = "User:CN=dev-enablement/kafka-connect"
      + id                           = (known after apply)
      + resource_name                = "dev-enablement.kafka-connect-group"
      + resource_pattern_type_filter = "Literal"
      + resource_type                = "Group"
    }

  # module.kafka_connect_read_legacy_account_events.kafka_acl.topic_acl["account-identity.legacy.account.events"] will be created
  + resource "kafka_acl" "topic_acl" {
      + acl_host                     = "*"
      + acl_operation                = "Read"
      + acl_permission_type          = "Allow"
      + acl_principal                = "User:CN=dev-enablement/kafka-connect"
      + id                           = (known after apply)
      + resource_name                = "account-identity.legacy.account.events"
      + resource_pattern_type_filter = "Literal"
      + resource_type                = "Topic"
    }

Plan: 2 to add, 0 to change, 0 to destroy.
module.kafka_connect_read_legacy_account_events.kafka_acl.topic_acl["account-identity.legacy.account.events"]: Creating...
module.kafka_connect_read_legacy_account_events.kafka_acl.group_acl["dev-enablement.kafka-connect-group"]: Creating...
module.kafka_connect_read_legacy_account_events.kafka_acl.topic_acl["account-identity.legacy.account.events"]: Creation complete after 0s [id=User:CN=dev-enablement/kafka-connect|*|Read|Allow|Topic|account-identity.legacy.account.events|Literal]
module.kafka_connect_read_legacy_account_events.kafka_acl.group_acl["dev-enablement.kafka-connect-group"]: Creation complete after 0s [id=User:CN=dev-enablement/kafka-connect|*|Read|Allow|Group|dev-enablement.kafka-connect-group|Literal]

Warning: Argument is deprecated

  with provider["registry.terraform.io/mongey/kafka"],
  on __env.tf line 12, in provider "kafka":
  12: provider "kafka" {

This parameter is now deprecated and will be removed in a later release,
please use `client_key` instead.

(and one more similar warning elsewhere)

Apply complete! Resources: 2 added, 0 changed, 0 destroyed.

To manually trigger plan again please post @terraform-applier plan dev-aws/kafka-shared-msk/account-identity as comment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants