[Bug]: Unable to successfully create MSK cluster with explicit default values for vpc connectivity #33204
Labels
bug
Addresses a defect in current functionality.
service/kafka
Issues and PRs that pertain to the kafka service.
Terraform Core Version
1.4.6
AWS Provider Version
5.14.0
Affected Resource(s)
Expected Behavior
When applying, cluster should be created without error
Actual Behavior
Apply fails and subsequent applies report tainted cluster resource
Relevant Error/Panic Output Snippet
Terraform Configuration Files
Steps to Reproduce
When creating an MSK cluster, the aws provider intentionally creates the vpc connectivity info with default values:
https://github.com/hashicorp/terraform-provider-aws/blob/main/internal/service/kafka/cluster.go#L545
But if the explicitly given values in your terraform resource are actually equal to the default values, the provider will try to update them anyway without checking here:
https://github.com/hashicorp/terraform-provider-aws/blob/main/internal/service/kafka/cluster.go#L593
This is not allowed and results in a 400 (https://docs.aws.amazon.com/msk/1.0/apireference/clusters-clusterarn-connectivity.html).
Debug Output
No response
Panic Output
No response
Important Factoids
No response
References
No response
Would you like to implement a fix?
No
The text was updated successfully, but these errors were encountered: