Skip to content

Commit

Permalink
Broker node EBS provisioned throughput settings
Browse files Browse the repository at this point in the history
  • Loading branch information
dyurchenko-whoosh committed Dec 24, 2023
1 parent 1b0169e commit ea0fc1a
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
9 changes: 9 additions & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,15 @@ resource "aws_msk_cluster" "default" {
storage_info {
ebs_storage_info {
volume_size = var.broker_volume_size

dynamic "provisioned_throughput" {
for_each = var.broker_ebs_provisioned_throughput_enabled ? [1] : []

content {
enabled = var.broker_ebs_provisioned_throughput_state
volume_throughput = var.broker_ebs_provisioned_throughput_value
}
}
}
}

Expand Down
25 changes: 25 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,31 @@ variable "broker_volume_size" {
nullable = false
}

variable "broker_ebs_provisioned_throughput_enabled" {
type = bool
default = false
description = "Enable broker node EBS provisioned throughput for broker type kafka.m5.4xlarge or larger"
nullable = false
}

variable "broker_ebs_provisioned_throughput_state" {
type = bool
default = false
description = "Enable or disable provisioned throughput of the EBS volumes for the data drive on kafka broker nodes"
nullable = false
}

variable "broker_ebs_provisioned_throughput_value" {
type = number
default = 250
description = "Provisioned throughput value of the EBS volumes for the data drive on kafka broker nodes in MiB per second"
validation {
condition = var.broker_ebs_provisioned_throughput_value >= 250
error_message = "broker_ebs_provisioned_throughput_value must be minimum 250."
}
nullable = false
}

variable "subnet_ids" {
type = list(string)
description = "Subnet IDs for Client Broker"
Expand Down

0 comments on commit ea0fc1a

Please sign in to comment.