-
-
Notifications
You must be signed in to change notification settings - Fork 102
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Broker node EBS provisioned throughput settings #101
base: main
Are you sure you want to change the base?
Broker node EBS provisioned throughput settings #101
Conversation
ea0fc1a
to
385f1f8
Compare
@@ -145,6 +145,15 @@ resource "aws_msk_cluster" "default" { | |||
storage_info { | |||
ebs_storage_info { | |||
volume_size = var.broker_volume_size | |||
|
|||
dynamic "provisioned_throughput" { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In case we want to explicitly disable provisioned throughput, to produce for example:
provisioned_throughput {
enabled = false
}
the module with the change you suggested would try to set volume_throughput to the default value (250).
this would cover that case, and fix this bug:
dynamic "provisioned_throughput" {
for_each = var.broker_ebs_provisioned_throughput_enabled && var.broker_ebs_provisioned_throughput_state ? [1] : []
content {
enabled = true
volume_throughput = var.broker_ebs_provisioned_throughput_value
}
}
dynamic "provisioned_throughput" {
for_each = var.broker_ebs_provisioned_throughput_enabled && !var.broker_ebs_provisioned_throughput_state ? [1] : []
content {
enabled = false
}
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@angryhamsterx would you mind if we pull your PR changes into a seperate PR from us, with cloudposse'isms covered, and drive the PR forwards?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@angryhamsterx can you update the pr (see also the failing readme check) |
Thanks @angryhamsterx for creating this pull request! A maintainer will review your changes shortly. Please don't be discouraged if it takes a while. While you wait, make sure to review our contributor guidelines. Tip Need help or want to ask for a PR review to be expedited?Join us on Slack in the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, to fix #117 restore the
lifecycle {
ignore_changes = [
# Ignore changes to ebs_volume_size in favor of autoscaling policy
broker_node_group_info[0].storage_info[0].ebs_storage_info[0].volume_size,
]
}
We do NOT want to ignore changes to provisioned throughput, as that would make it impossible to update.
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 | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 "broker_ebs_provisioned_throughput" { | |
type = object({ | |
enabled = optional(bool, false) | |
volume_throughput = optional(number) | |
}) | |
description = "Enable broker node EBS provisioned throughput for broker type kafka.m5.4xlarge or larger" | |
default = {} | |
nullable = false | |
} | |
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 | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 | |
} | |
} | |
provisioned_throughput { | |
enabled = var.broker_ebs_provisioned_throughput.enabled | |
volume_throughput = var.broker_ebs_provisioned_throughput.volume_throughput | |
} |
what
Ability to enable EBS volume provisioned throughput for broker nodes kafka.m5.4xlarge or larger.
You can add configuration block for this by setting
broker_ebs_provisioned_throughput_enabled
, and then change enable/disable state bybroker_ebs_provisioned_throughput_state
.Caveat:
Once
provisioned_throughput
block edded, it can not be removed, so there is variablebroker_ebs_provisioned_throughput_state
to change state of provisioned throughput.why
references