Skip to content
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

[Bug]: aws_msk_cluster error out updating ebs_volume_info though there is no change #37043

Closed
mr92752 opened this issue Apr 22, 2024 · 6 comments · Fixed by #40910
Closed

[Bug]: aws_msk_cluster error out updating ebs_volume_info though there is no change #37043

mr92752 opened this issue Apr 22, 2024 · 6 comments · Fixed by #40910
Assignees
Labels
bug Addresses a defect in current functionality. service/kafka Issues and PRs that pertain to the kafka service.
Milestone

Comments

@mr92752
Copy link

mr92752 commented Apr 22, 2024

Terraform Core Version

1.5.3

AWS Provider Version

5.46.0

Affected Resource(s)

aws_msk_cluster

Expected Behavior

aws_msk_cluster broker_node_group_info storage_info ebs_storage_info should not be updated if there is no change

Actual Behavior

terraform is adding provisioned_throughput to eb_storage_info though it is null and eventually error out

Relevant Error/Panic Output Snippet

broker storage: operation error Kafka: UpdateBrokerStorage, https response error StatusCode: 400, RequestID: a58ed9fd-5102-462c-a77e-d5972fc821cf, BadRequestException: The request does not include any updates to the EBS volumes of the cluster. Verify the request, then try again.

If voulme_storage variable value is increased and reapplied, this error doesn't occur

Terraform Configuration Files

resource "aws_msk_cluster" "this" {
  count = var.create ? 1 : 0

  cluster_name           = var.cluster_name
  kafka_version          = var.kafka_version
  number_of_broker_nodes = var.number_of_broker_nodes
  broker_node_group_info {
    az_distribution = var.broker_node_az_distribution
    client_subnets  = var.broker_node_client_subnets
    instance_type   = var.broker_node_instance_type
    security_groups = var.broker_node_security_groups
   
   dynamic "storage_info" {
      for_each = length(var.broker_node_storage_info) > 0 ? [var.broker_node_storage_info] : []
      content {
        dynamic "ebs_storage_info" {
          for_each = try([storage_info.value.ebs_storage_info], [])

          content {
            dynamic "provisioned_throughput" {
              for_each = try([ebs_storage_info.value.provisioned_throughput], [])

              content {
                enabled           = try(provisioned_throughput.value.enabled, null)
                volume_throughput = try(provisioned_throughput.value.volume_throughput, null)
              }
            }
            volume_size = try(ebs_storage_info.value.volume_size, 100)
          }
        }
      }
    }
}
# variable definition
# --------------------
variable "broker_node_storage_info" {
  description = "A block that contains information about storage volumes attached to MSK broker nodes"
  type = object({
    ebs_storage_info = optional(object({
      provisioned_throughput = object({
        enabled           = optional(bool, false)
        volume_throughput = optional(number,250)
      })
      volume_size = optional(number, 100)
    }))
  })
  default = {}
  nullable = false
}

Steps to Reproduce

  1. pass the varibles to the configuration
  2. terraform init
  3. terraform plan/apply
  4. Once the cluster is created, rerun the terraform
  5. terraform plan/apply
  6. input yes

Debug Output

No response

Panic Output

No response

Important Factoids

No response

References

No response

Would you like to implement a fix?

None

@mr92752 mr92752 added the bug Addresses a defect in current functionality. label Apr 22, 2024
Copy link

Community Note

Voting for Prioritization

  • Please vote on this issue by adding a 👍 reaction to the original post to help the community and maintainers prioritize this request.
  • Please see our prioritization guide for information on how we prioritize.
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.

Volunteering to Work on This Issue

  • If you are interested in working on this issue, please leave a comment.
  • If this would be your first contribution, please review the contribution guide.

@github-actions github-actions bot added the service/kafka Issues and PRs that pertain to the kafka service. label Apr 22, 2024
@terraform-aws-provider terraform-aws-provider bot added the needs-triage Waiting for first response or review from a maintainer. label Apr 22, 2024
@mr92752 mr92752 changed the title [Bug]: [Bug]: aws_msk_cluster error out updating ebs_volume_info though there is no change Apr 22, 2024
@justinretzolk
Copy link
Member

Maybe similar #20327

@justinretzolk justinretzolk removed the needs-triage Waiting for first response or review from a maintainer. label May 1, 2024
@afireinside09
Copy link

confirmed same problem while trying to upgrade from 4.20.1 -> 5.47.0 of the AWS provider.
this makes me nervous to update to any 5.xx.xx of the AWS provider now.

@ayoh1
Copy link

ayoh1 commented Jul 18, 2024

looks like this is related to #26031

@jar-b jar-b self-assigned this Jan 13, 2025
@github-actions github-actions bot added the prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. label Jan 13, 2025
@github-actions github-actions bot added this to the v5.84.0 milestone Jan 15, 2025
Copy link

Warning

This issue has been closed, meaning that any additional comments are hard for our team to see. Please assume that the maintainers will not see them.

Ongoing conversations amongst community members are welcome, however, the issue will be locked after 30 days. Moving conversations to another venue, such as the AWS Provider forum, is recommended. If you have additional concerns, please open a new issue, referencing this one where needed.

@github-actions github-actions bot removed the prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. label Jan 16, 2025
Copy link

This functionality has been released in v5.84.0 of the Terraform AWS Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Addresses a defect in current functionality. service/kafka Issues and PRs that pertain to the kafka service.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants