Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
GTRekter committed Jul 12, 2024
1 parent f75100a commit 5488af8
Show file tree
Hide file tree
Showing 4 changed files with 94 additions and 0 deletions.
Binary file added README.md
Binary file not shown.
10 changes: 10 additions & 0 deletions main.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
resource "ncloud_cdss_cluster" "cdss_cluster" {
name = var.name
kafka_version_code = var.kafka_version_code
config_group_no = var.config_group_no
vpc_no = var.vpc_no
os_image = var.os_image
cmak = var.cmak
manager_node = var.manager_node
broker_nodes = var.broker_nodes
}
20 changes: 20 additions & 0 deletions output.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
output "id" {
description = "Cluster id."
value = ncloud_cdss_cluster.cdss_cluster.id
}

output "endpoints" {
description = <<EOF
List of endpoints
-plaintext - List of broker nodes (Port 9092).
-tls - List of broker nodes (Port 9093).
-public_endpoint_plaintext - List of public endpoint of broker nodes.
-public_endpoint_plaintext_listener_port - List of listener port for public endpoint of broker nodes.
-public_endpoint_tls - List of public endpoint of broker nodes (TLS).
-public_endpoint_tls_listener_port - List of listener port for public endpoint of broker nodes (TLS).
-hosts_private_endpoint_tls - Editing details of the hosts file (Private IP hostname format).
-hosts_public_endpoint_tls - Editing details of the hosts file (Public IP hostname format).
-zookeeper - List of ZooKeeper nodes (Port 2181).
EOF
value = ncloud_cdss_cluster.cdss_cluster.endpoints
}
64 changes: 64 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
variable "name" {
description = "(Required) Cluster name."
type = string
}

variable "kafka_version_code" {
description = "(Required) Cloud Data Streaming Service version to be used."
type = string
}

variable "config_group_no" {
description = "(Required) ConfigGroup number to be used."
type = string
}

variable "vpc_no" {
description = "(Required) VPC number to be used."
type = string
}

variable "os_image" {
description = "(Required) OS type to be used."
type = string
}

variable "cmak" {
description = <<EOF
(Required) CMAK access information.
- user_name - (Required) CMAK access ID. Only lowercase alphanumeric characters and non-consecutive hyphens (-) allowed First character must be a letter, but the last character may be a letter or a number.
- user_password - (Required) CMAK access password. Must be at least 8 characters and contain at least one of each: English uppercase letter, lowercase letter, special character, and number.
EOF
type = object({
user_name = string
user_password = string
})
}

variable "manager_node" {
description = <<EOF
(Required) Manager node information.
- node_product_code - (Required) HW specifications of the manager node.
- subnet_no - (Required) Subnet number where the manager node is to be located.
EOF
type = object({
node_product_code = string
subnet_no = string
})
}

variable "broker_nodes" {
description = <<EOF
(Required) Broker node information.
- node_product_code - (Required) HW specifications of the broker node.
- subnet_no - (Required) Subnet number where the broker node is to be located.
- node_count - (Required) Number of broker nodes. At least 3 units, up to 10 units allowed.
- storage_size - (Required) Broker node storage capacity. At least 100 GB, up to 2000 GB. Must be in units of 10 GB.
EOF
type = object({
node_product_code = string
subnet_no = string
node_count = number
storage_size = number
})
}

0 comments on commit 5488af8

Please sign in to comment.