-
Notifications
You must be signed in to change notification settings - Fork 286
docs: Add MKC Samples for Creating Connectors #878
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
Conversation
for Clusters * Add sample code for creating a Kafka Connect cluster
Corrected tags.
for Connectors Adds Terraform samples for Managed Kafka Connect to create connectors for BigQuery, Cloud Storage, MirrorMaker, Pub/Sub Sink, and Pub/Sub Source.
glasnt
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this a replacement for #876? It conflicts with that sample.
managedkafka/managedkafka_create_connector_bigquery_sink/main.tf
Outdated
Show resolved
Hide resolved
|
#876 has been merged, which conflicts with this branch. Please rebase, and apply suggested comments around local-exec and test skips ✨ |
|
Rebased and applied mitigation for subnet resource destruction issue. |
managedkafka/managedkafka_create_connector_mirrormaker_source/main.tf
Outdated
Show resolved
Hide resolved
managedkafka/managedkafka_create_connector_mirrormaker_source/main.tf
Outdated
Show resolved
Hide resolved
managedkafka/managedkafka_create_connector_mirrormaker2_source/main.tf
Outdated
Show resolved
Hide resolved
| "name" = "my-bigquery-sink-connector" | ||
| "project" = "GCP_PROJECT_ID" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These look like repeated values from the main resource args. If that's the case, you can use the dynamic project ID rather than hardcoding it here.
| "name" = "my-bigquery-sink-connector" | |
| "project" = "GCP_PROJECT_ID" | |
| "name" = "my-bigquery-sink-connector" | |
| "project" = data.google_project.default.project_id |
| "tasks.max" = "3" | ||
| "kafka.topic" = "GMK_TOPIC_ID" | ||
| "cps.subscription" = "CPS_SUBSCRIPTION_ID" | ||
| "cps.project" = "GCP_PROJECT_ID" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same again here
| "cps.project" = "GCP_PROJECT_ID" | |
| "cps.project" = data.google_project.default.project_id |
glasnt
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One small best practice addition, and these are okay to merge.
Follow up to #878, minor fix for hardcoded project IDs.
…es#878) * docs: Add Managed Kafka Connect terraform sample for Clusters * Add sample code for creating a Kafka Connect cluster * Update tags in main.tf Corrected tags. * Addressed PR comments. * Add comment to clarify memory_bytes value. * Fix incorrect Kafka cluster reference. * docs: Add Managed Kafka Connect terraform sample for Connectors Adds Terraform samples for Managed Kafka Connect to create connectors for BigQuery, Cloud Storage, MirrorMaker, Pub/Sub Sink, and Pub/Sub Source. * Fix typo in memory_bytes for connectors * Fixed formatting. * Fix formatting * Fix snippet tags. * Fix tags * Adding workaround for subnet resource deletion. * Fixed errors and formatting. * Disable tests and modify subnet resources. * Updated connector sample configs. * Fix formatting. * Add comment for MM connector target cluster. * Change MM2 example to include 2 GMK clusters. * Fix connector name to match id. * Fix connector bootstrap server addresses. * Fix bootstrap server addresses and add comment. * Fix whitespaces and formatting. * Add newline. * Add comments for access to MM2 clusters and other fixes. * Formatting fix. * Applying suggestions. --------- Co-authored-by: Katie McLaughlin <[email protected]>
…le-modules#887) Follow up to terraform-google-modules#878, minor fix for hardcoded project IDs.
Adds Terraform samples for Managed Kafka Connect
to create connectors for BigQuery, Cloud Storage, MirrorMaker,
Pub/Sub Sink, and Pub/Sub Source.
Builds upon #876 and requires a fix for subnet resource (see here).
Description
Fixes https://b.corp.google.com/issues/430087669
Note: If you are not associated with Google, open an issue for discussion before submitting a pull request.
Checklist
Readiness
Style
guide
Testing
I have performed tests described in the Contributing guide:
terraform applyterraform fmtcheckIntended location
Location(s):
Reason:
API enablement
Review