-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Separate sensitive config to not display by terraform
Added `config_sensitive` map input for hide sensitive data by terraform `config` and `config_sensitive` maps are joined together before query Confluent cloud API
- Loading branch information
Showing
3 changed files
with
54 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
terraform { | ||
required_providers { | ||
kafka = { | ||
source = "Mongey/kafka" | ||
version = "0.2.11" | ||
} | ||
confluentcloud = { | ||
source = "Mongey/confluentcloud" | ||
} | ||
} | ||
} | ||
|
||
provider "confluentcloud" {} | ||
|
||
resource "confluentcloud_connector" "connector" { | ||
name = "pubsub-kafka-connector" | ||
environment_id = "env-ab123" | ||
cluster_id = "lkc-cd456" | ||
config = { | ||
"name" = "pubsub-kafka-connector" | ||
"connector.class" = "PubSubSource" | ||
"kafka.topic" = "kafka-topic1" | ||
"gcp.pubsub.project.id" = "project-1234" | ||
"gcp.pubsub.subscription.id" = "topic1-subscription1" | ||
"gcp.pubsub.topic.id" = "topic1" | ||
"gcp.pubsub.max.retry.time" = "5" | ||
"gcp.pubsub.message.max.count" = "1000" | ||
"errors.tolerance" = "all" | ||
"tasks.max" = "1" | ||
} | ||
config_sensitive = { | ||
"kafka.api.key" = <<kafka-api-key>> | ||
"kafka.api.secret" = <<kafka-api-secret>> | ||
"gcp.pubsub.credentials.json" = <<gcp-service-account-key> | ||
} | ||
} |