This repository was archived by the owner on May 25, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 19
This repository was archived by the owner on May 25, 2022. It is now read-only.
API Key Resource: How to create a cluster & topic? #25
Copy link
Copy link
Closed
Labels
duplicateThis issue or pull request already existsThis issue or pull request already existsnew-feature-requesta request to add a new feature/resourcea request to add a new feature/resourcequestionFurther information is requestedFurther information is requested
Description
I have the following terraform file based on the examples:
variable "env" {
default = "test"
}
provider "confluentcloud" {
api_key = var.confluentcloud_api_key
api_secret = var.confluentcloud_api_secret
}
variable "confluentcloud_api_key" {}
variable "confluentcloud_api_secret" {}
resource "confluentcloud_environment" "environment" {
display_name = var.env
}
resource "confluentcloud_kafka_cluster" "basic-cluster" {
display_name = var.env
availability = "SINGLE_ZONE"
cloud = "AZURE"
region = var.region
basic {
}
environment {
id = confluentcloud_environment.environment.id
}
}
resource "confluentcloud_kafka_topic" "transit-alert-trip-patches" {
kafka_cluster = confluentcloud_kafka_cluster.basic-cluster.id
topic_name = "transit-alert.trip-patches"
partitions_count = 4
http_endpoint = confluentcloud_kafka_cluster.basic-cluster.http_endpoint
config = {
# "cleanup.policy" = "compact"
# "max.message.bytes" = "12345"
# "retention.ms" = "67890"
}
credentials {
key = "<Kafka API Key for confluentcloud_kafka_cluster.basic-cluster>"
secret = "<Kafka API Secret for confluentcloud_kafka_cluster.basic-cluster>"
}
}What should I put to the confluentcloud_kafka_topic.transit-alert-trip-patches.credentials block? With the value of the var.confluentcloud_api_key & var.confluentcloud_api_secret the terraform apply failes. I see no related output from the confluentcloud_kafka_cluster.basic-cluster block.
Is there a way to:
- create an environment
- create the cluster
- and create the topics in one
terraform apply?
Regards,
Metadata
Metadata
Assignees
Labels
duplicateThis issue or pull request already existsThis issue or pull request already existsnew-feature-requesta request to add a new feature/resourcea request to add a new feature/resourcequestionFurther information is requestedFurther information is requested