Creation of "aws_appmesh_route" fails if one of the "weighted_targets" has "weight = 0" #13479
Labels
bug
Addresses a defect in current functionality.
service/appmesh
Issues and PRs that pertain to the appmesh service.
Milestone
Community Note
Terraform Version
0.12.20
Affected Resource(s)
aws_appmesh_route
Terraform Configuration Files
Terraform Plan Output
Debug Output
Panic Output
N/A
Expected Behavior
I'm deploying a new version of service and want the old one to have 100% traffic routed on Virtual Router, while the new one initially gets no traffic. I intend script traffic shifting for Canary Deployments and make it happen outside of terraform.
I checked that this configuration is possible, by manually created two routes (one with 100% weight, and the other with 0% weight) in AWS Console.
The output of
terraform plan
properly shows that it will set one of theweight
s to 100 and the other to 0.The expected behaviour in this case is that the resource gets updated accordingly.
Actual Behavior
The API Call (see the debug log) shows, that - were weight was intended to be 0 - the attribute is not sent to AWS at all. Instead Terraform attempts to send malformed message, lacking
weight
attribute in one of theWeightedTargets
, and AWS Rejects that request with an error message:Steps to Reproduce
aws_appmesh_route
with one of theweighted_target.weight
set to 0.terraform apply
Important Factoids
References
The text was updated successfully, but these errors were encountered: