作者:mobiledu2502871947 | 来源:互联网 | 2023-07-22 07:41
TheresaprettybadRoute53buginhttps://github.com/terraform-providers/terraform-pr
There's a pretty bad Route 53 bug in https://github.com/terraform-providers/terraform-provider-aws/pull/3119, which was released in 1.8.0.
When Terraform refreshes a Route 53 record where the alias string starts with
, the rewriting code from the above pull also pulls off the first character of the alias.
1 2 3 4 5 6 7
| ~ aws_route53_record.foo
alias.2916566629.evaluate_target_health: "false" => "false"
alias.2916566629.name: "istenapi-[elided].us-west-2.elb.amazonaws.com" => ""
alias.2916566629.zone_id: "Z1H1FL5HABSF5" => ""
alias.3046168853.evaluate_target_health: "" => "false"
alias.3046168853.name: "" => "listenapi-[elided].us-west-2.elb.amazonaws.com"
alias.3046168853.zone_id: "" => "Z1H1FL5HABSF5" |
This looks to be because of using
(which works on sets of characters rather than a static string prefix, as one might expect from the name and other languages...) instead of
, which doesn't even need the conditional here: https://github.com/terraform-providers/terraform-provider-aws/blob/cb610a5953cd2a2ce552c7b414b9f61193b1f8e6/aws/resource_aws_route53_record.go#L905
https://stackoverflow.com/questions/29187086/why-trimleft-doesnt-work-as-expected
cc as author. IMO, this is worth doing an immediate patch release for, it's pretty painful if you hit it, I had to hand-edit my state file back into correctness after I did a refresh...
该提问来源于开源项目:hashicorp/terraform-provider-aws
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks!