hashicorp / terraform-provider-aws

The AWS Provider enables Terraform to manage AWS resources.
https://registry.terraform.io/providers/hashicorp/aws
Mozilla Public License 2.0
9.84k stars 9.19k forks source link

MSK - Bug when updating existing cluster configuration #15405

Open throwaway8787 opened 4 years ago

throwaway8787 commented 4 years ago
When expanding the plan for module.msk.aws_msk_cluster.msk to include new
values learned so far during apply, provider
"registry.terraform.io/hashicorp/aws" produced an invalid new value for
.configuration_info[0].revision: was cty.NumberIntVal(2), but now
cty.NumberIntVal(3).
resource "aws_msk_configuration" "config" {
  name           = "${var.name}-${var.environment}"
  kafka_versions = [var.kafka_version]

  server_properties = <<CONFIG
num.partitions = 100
auto.create.topics.enable = true
delete.topic.enable = true
log.cleanup.policy = delete
message.max.bytes = 1048588
default.replication.factor = 3
log.retention.hours = 720
log.retention.bytes = 107374187500
CONFIG
}
gneveu commented 4 years ago

We're also hitting this issue, this seems to happen when applying a plan where an aws_msk_configuration has already been created previously

patjones commented 4 years ago

👍 We are also seeing this.

dacreify commented 4 years ago

As are we. I created this separate issue for the general updating issue: #15795

ber-next commented 4 years ago

For me the first attempt always fail. But usually the second or the third attempts are successful.

dlp1154 commented 3 years ago

We are also observing the same issue

AlbertoPeon commented 3 years ago

we can also reproduce it

HackerTheMonkey commented 3 years ago

Same here, using Terraform ~>0.14.0 and AWS Provider version ~>3.0. Though it seems that the 2nd attempt is fine.

aidan-melen commented 2 years ago

Same here, using Terraform ~>0.14.0 and AWS Provider version ~>3.0. Though it seems that the 2nd attempt is fine.

We also saw that a 2nd attempt ran without errors.

rogermbr commented 1 year ago

Hey folks, here, using Terraform ~>1.4.0 and AWS Provider version ~>4.58.0 have same problem with first attempt to change msk configuration, any subsequent attempt finished in successfully state.

guidorugo commented 1 year ago

Terraform v1.5.5 and AWS Provider version 5.5.0 still with this issue.

twcurrie commented 6 months ago

Terraform v1.6.6 and AWS Provider version 5.46.0 and still has this issue.

altingjonbalajj commented 3 weeks ago

For anyone who is experiencing this issue. On my side this fixed the issue.

Just add tonumber() on configuration revision and it should solve the problem.

configuration_info {
    arn      = aws_msk_configuration.kafka_configurations.arn
    revision = tonumber(aws_msk_configuration.kafka_configurations.latest_revision)
  }