terraform-provider-rabbitmq
terraform-provider-rabbitmq copied to clipboard
Error: json: cannot unmarshal string into Go struct field ChannelDetails.consumer_details.channel_details.peer_port of type uint
Hi,
We are upgrading from 1.7.0 to 1.8.0, and we are encountering an issue with unmarshaling.
Terraform Version
Terraform v1.4.4
Affected Resource(s)
- rabbitmq_queue
Terraform Configuration Files
resource "rabbitmq_queue" "RNAME" {
name = "NAME"
vhost = "HOST"
settings {
durable = true
auto_delete = false
arguments_json = <<EOF
{
"x-queue-type": "quorum"
}
EOF
}
}
Debug Output
Error: json: cannot unmarshal string into Go struct field ChannelDetails.consumer_details.channel_details.peer_port of type unit
Expected Behavior
The unmarshaling should not crash.
Actual Behavior
See earlier error
Steps to Reproduce
-
terraform plan
Getting the same error when configuring a shovel
Related: https://github.com/michaelklishin/rabbit-hole/issues/279
Hey do you have any solution for this problem?
I got the downstream dependency updated in https://github.com/michaelklishin/rabbit-hole/issues/279 and it was released in michaelklishin/rabbit-hole/2.16.0.
But when I looked to upgrade the version in the provider it required a lot more work than I originally expected. And I wasn't able to find the time to get it work.
The problem is the changes will cause a schema change and therefore require handling state upgrades.
Reference: https://developer.hashicorp.com/terraform/plugin/framework/resources/state-upgrade.
This meant from a provider perspective we had to avoid upgrading to 1.8.0
and stick to using 1.7.0
.