-
Notifications
You must be signed in to change notification settings - Fork 286
docs: Add Managed Kafka Connect terraform sample for Clusters #876
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
Changes from 3 commits
16d7b2f
163059e
0c1763e
dec3c5a
0886c4e
315b503
5e76619
612a5ac
56482a1
77d90a5
627f6cb
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,59 @@ | ||
| /** | ||
| * Copyright 2025 Google LLC | ||
| * | ||
| * Licensed under the Apache License, Version 2.0 (the "License"); | ||
| * you may not use this file except in compliance with the License. | ||
| * You may obtain a copy of the License at | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, software | ||
| * distributed under the License is distributed on an "AS IS" BASIS, | ||
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| * See the License for the specific language governing permissions and | ||
| * limitations under the License. | ||
| */ | ||
|
|
||
| # [START managedkafka_create_connect_cluster_parent] | ||
| resource "google_managed_kafka_cluster" "example-kafka-cluster" { | ||
salmany marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| project = data.google_project.default.project_id | ||
| cluster_id = "my-cluster-id" | ||
| location = "us-central1" | ||
| capacity_config { | ||
| vcpu_count = 3 | ||
| memory_bytes = 3221225472 | ||
salmany marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| } | ||
| gcp_config { | ||
| access_config { | ||
| network_configs { | ||
| subnet = "projects/${data.google_project.default.number}/regions/us-central1/subnetworks/default" | ||
|
||
| } | ||
| } | ||
| } | ||
| } | ||
|
|
||
| # [START managedkafka_create_connect_cluster] | ||
| resource "google_managed_kafka_connect_cluster" "example-kafka-connect-cluster" { | ||
| provider = google-beta | ||
| project = data.google_project.default.project_id # Replace this with your project ID in quotes | ||
salmany marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| connect_cluster_id = "my-connect-cluster-id" | ||
| location = "us-central1" | ||
| kafka_cluster = google_managed_kafka_cluster.example-kafka-cluster.id # Replace this with the ID of the primary Managed Service for Apache Kafka cluster associated with your Connect cluster in quotes | ||
| capacity_config { | ||
| vcpu_count = 3 | ||
salmany marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| memory_bytes = 3221225472 | ||
| } | ||
| gcp_config { | ||
| access_config { | ||
| network_configs { | ||
| primary_subnet = "projects/${data.google_project.default.number}/regions/us-central1/subnetworks/default" | ||
| } | ||
| } | ||
| } | ||
| } | ||
| # [END managedkafka_create_connect_cluster] | ||
|
|
||
| data "google_project" "default" { | ||
| provider = google-beta | ||
salmany marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| } | ||
| # [END managedkafka_create_connect_cluster_parent] | ||
Uh oh!
There was an error while loading. Please reload this page.