page_title | subcategory | description |
---|---|---|
Conduktor : conduktor_kafka_connect_v2 |
console/v2 |
Resource for managing Conduktor Kafka Connect servers definition linked to an existing Kafka cluster definition inside Conduktor Console.
This resource allows you to create, read, update and delete Kafka Connect servers connections from Conduktor Console. |
Resource for managing Conduktor Kafka Connect servers definition linked to an existing Kafka cluster definition inside Conduktor Console. This resource allows you to create, read, update and delete Kafka Connect servers connections from Conduktor Console.
This example creates a simple Kafka Connect server connection without any authentication.
resource "conduktor_kafka_cluster_v2" "minimal" {
name = "mini-cluster"
spec {
display_name = "Minimal Cluster"
bootstrap_servers = "localhost:9092"
}
}
resource "conduktor_kafka_connect_v2" "simple" {
name = "simple-connect"
cluster = conduktor_kafka_cluster_v2.minimal.name
spec {
display_name = "Simple Connect Server"
urls = "http://localhost:8083"
}
}
This example creates a complex Kafka Connect server connection with basic authentication.
resource "conduktor_kafka_cluster_v2" "minimal" {
name = "mini-cluster"
spec {
display_name = "Minimal Cluster"
bootstrap_servers = "localhost:9092"
}
}
resource "conduktor_kafka_connect_v2" "basic" {
name = "basic-connect"
cluster = conduktor_kafka_cluster_v2.minimal.name
labels = {
description = "This is a complex connect using basic authentication"
documentation = "https://docs.mycompany.com/complex-connect"
env = "dev"
}
spec {
display_name = "Basic Connect server"
urls = "http://localhost:8083"
headers = {
X-PROJECT-HEADER = "value"
Cache-Control = "no-cache"
}
ignore_untrusted_certificate = false
security = {
type = "BasicAuth"
username = "user"
password = "password"
}
}
}
This example creates a complex Kafka Connect server connection with bearer token authentication.
resource "conduktor_kafka_cluster_v2" "minimal" {
name = "mini-cluster"
spec {
display_name = "Minimal Cluster"
bootstrap_servers = "localhost:9092"
}
}
resource "conduktor_kafka_connect_v2" "bearer" {
name = "bearer-connect"
cluster = conduktor_kafka_cluster_v2.minimal.name
labels = {
description = "This is a complex connect using bearer token authentication"
documentation = "https://docs.mycompany.com/complex-connect"
env = "dev"
}
spec {
display_name = "Bearer Connect server"
urls = "http://localhost:8083"
headers = {
X-PROJECT-HEADER = "value"
Cache-Control = "no-cache"
}
ignore_untrusted_certificate = false
security = {
type = "BearerToken"
token = "token"
}
}
}
This example creates a complex Kafka Connect server connection with mTLS authentication.
resource "conduktor_kafka_cluster_v2" "minimal" {
name = "mini-cluster"
spec {
display_name = "Minimal Cluster"
bootstrap_servers = "localhost:9092"
}
}
resource "conduktor_kafka_connect_v2" "mtls" {
name = "mtls-connect"
cluster = conduktor_kafka_cluster_v2.minimal.name
labels = {
description = "This is a complex connect using mTLS authentication"
documentation = "https://docs.mycompany.com/complex-connect"
env = "dev"
}
spec {
display_name = "mTLS Connect server"
urls = "http://localhost:8083"
headers = {
X-PROJECT-HEADER = "value"
Cache-Control = "no-cache"
}
ignore_untrusted_certificate = false
security = {
type = "SSLAuth"
key = <<EOT
-----BEGIN PRIVATE KEY-----
MIIOXzCCDUegAwIBAgIRAPRytMVYJNUgCbhnA+eYumgwDQYJKoZIhvcNAQELBQAw
...
IFyCs+xkcgvHFtBjjel4pnIET0agtbGJbGDEQBNxX+i4MDA=
-----END PRIVATE KEY-----
EOT
certificate_chain = <<EOT
-----BEGIN CERTIFICATE-----
MIIOXzCCDUegAwIBAgIRAPRytMVYJNUgCbhnA+eYumgwDQYJKoZIhvcNAQELBQAw
...
IFyCs+xkcgvHFtBjjel4pnIET0agtbGJbGDEQBNxX+i4MDA=
-----END CERTIFICATE-----
EOT
}
}
}
cluster
(String) Kafka cluster name linked with Kafka current connect server. Must exist in Conduktor Consolename
(String) Kafka connect server name, must be unique, act as ID for import
labels
(Map of String) Kafka connect server labelsspec
(Block, Optional) (see below for nested schema)
Required:
display_name
(String) Kafka connect server display nameurls
(String) URL of a Kafka Connect cluster. Multiple URLs are not supported for now
Optional:
headers
(Map of String) Key-Value HTTP headers to add to requestsignore_untrusted_certificate
(Boolean) Ignore untrusted certificate for Kafka connect server requestssecurity
(Attributes) Kafka connect server security configuration. One ofBasicAuth
,BearerToken
,SSLAuth
(see below for nested schema)
Required:
type
(String) Kafka connect server security type. EitherBasicAuth
,BearerToken
,SSLAuth
More detail on our documentation
Optional:
certificate_chain
(String) Kafka connect server mTLS auth certificate chain PEM. Required if security type isSSLAuth
key
(String, Sensitive) Kafka connect server mTLS auth private key PEM. Required if security type isSSLAuth
password
(String, Sensitive) Kafka connect server basic auth password. Required if security type isBasicAuth
token
(String, Sensitive) Kafka connect server bearer token. Required if security type isBearerToken
username
(String) Kafka connect server basic auth username. Required if security type isBasicAuth
In order to import a Kafka Connect server connection into Conduktor, you need to know the Kafka cluster ID and the Kafka Connect server ID.
The import ID is constructed as follows: < cluster_id >/< connect_id >
.
For example, using an import
block :
import {
to = conduktor_kafka_connect_v2.example
id = "mini-cluster/import-connect" # Import "import-connect" Connect server for "mini-cluster" Kafka cluster
}
Using the terraform import
command:
terraform import conduktor_kafka_connect_v2.example mini-cluster/import-connect