resource "flexibleengine_lb_listener_v2" "listener" {
count = var.deploy_trigger ? length(var.protocol_ports) : 0
protocol = var.protocol
protocol_port = var.protocol_ports[count.index]
loadbalancer_id = flexibleengine_lb_loadbalancer_v2.elb[0].id
tags = var.tags # works without this line
}
(note: there are no "name" or "description" here)
Debug Output
"error_msg":"Invalid request body: Empty body '{}' is meaningless.","error_code":"SYS.0400"
Panic Output
N/A
Expected Behavior
Tags should be manageable even when no changes are performed on the lb_listener_v2 resource itself.
Actual Behavior
Tags can't be managed through Terraform IF there is no change on the lb_listener_v2 resource itself (because the first request will fails due to empty body, before even starting to add/remove tags)
Terraform Version
Terraform v1.0.11 on linux_amd64
flexibleenginecloud/flexibleengine v1.26.0
Affected Resource(s)
Terraform Configuration Files
(note: there are no "name" or "description" here)
Debug Output
"error_msg":"Invalid request body: Empty body '{}' is meaningless.","error_code":"SYS.0400"
Panic Output
N/A
Expected Behavior
Tags should be manageable even when no changes are performed on the lb_listener_v2 resource itself.
Actual Behavior
Tags can't be managed through Terraform IF there is no change on the lb_listener_v2 resource itself (because the first request will fails due to empty body, before even starting to add/remove tags)
I think the current tests in https://github.com/FlexibleEngineCloud/terraform-provider-flexibleengine/blob/master/flexibleengine/resource_flexibleengine_lb_listener_v2_test.go worked because there always is at least a "name" change at the same time. So the body is not empty during the first request.
Steps to Reproduce
Trying to add the first tag on a given flexibleengine_lb_listener_v2 resource (plan-target):
Terraform.log , request on the resource itself:
If the code is changed to add a new field "description" for example:
The new 'plan' is:
Request on the resource itself:
Request to add the tag:
Important Factoids
Requests go through a proxy. Test on Orange Cloud for Business / Flexible Engine, region eu-west-0
References
N/A