terraform-aws-modules / terraform-aws-msk-kafka-cluster

Terraform module to create AWS MSK (Managed Streaming for Kafka) resources 🇺🇦
https://registry.terraform.io/modules/terraform-aws-modules/msk-kafka-cluster/aws
Apache License 2.0
55 stars 53 forks source link

fix: Enable changing name of MSK configuration #12

Closed mvoitko closed 12 months ago

mvoitko commented 12 months ago

Description

Add lifecycle create before destroy rule for msk configuration

Motivation and Context

To enable changing name of MSK configuration AWS Terraform provider related issue

Breaking Changes

How Has This Been Tested?

bryantbiggs commented 12 months ago

I don't believe this solves the issue based on https://github.com/hashicorp/terraform-provider-aws/issues/15831#issuecomment-719161056

mvoitko commented 12 months ago

I don't believe this solves the issue based on hashicorp/terraform-provider-aws#15831 (comment)

Nice discussion from your side. I haven't said that this fix solves the issue, but without this fix the workaround doesn't work. The workaround is to add a random suffix to the configuration name which changes only when the content of the configuration file is changed. Then it's not possible to remove the configuration when the new one does not exist yet. And the fix I have done is needed exactly for that reason. You can find similar comments in the issue. Could you please explain why there is no sense in adding this lifecycle rule to the msk configuration?

bryantbiggs commented 12 months ago

you didn't provide any information, supporting evidence, etc. - you simply linked to a closed issue that states that it doesn't work. I do not see any discussion in the linked issue, a simple open and shut of "this unfortunately is not supported". without any supporting evidence, should we just simply take your word and freely accept any changes users sumbit?

mvoitko commented 12 months ago

@bryantbiggs what evidence do you need?

bryantbiggs commented 12 months ago
  1. A reproduction of the current issue (this is what's required in the issue template)
  2. A deployable example that demonstrates the change remediates the issue described
nawarajshahi commented 12 months ago

@mvoitko I agree with @bryantbiggs that evidence needs to be provided to support why this change is necessary. I had encountered the exact same issue with upgrading kafka cluster because it wanted to destroy existing configuration before it could even create it and also renaming didn't help either without the lifecycle policy of create_before_destroy set.

I think we both ended up following same pattern to get the fixes applied since just making cluster config unique alone wasn't enough. I'm happy to work with you to create new issue and PR going.

github-actions[bot] commented 11 months ago

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.