You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I change name on aws_route53_record.test to test2.domain.com, but template_file.tpl fails detect change on first apply. It detects change on next apply.
Using aws_route53_record.test.fqdn instead of name solves the problem in this case. It seems that name reads value from previous state since it is not a computed attribute, and fqdn works well since it is computed attribute and defers evaluation until apply.
Is this behavior intended? Even if this behavior is intended, I think enhancing documentation about this case may help everyone a lot.
The text was updated successfully, but these errors were encountered:
Thanks for the excellent bug report.
I think the issue might be that name forces a new resource, so the existing resource referenced when the datasource is refreshed is technically unchanged, and hasn't yet been marked as deposed. You might be able to work around this for now by using depends_on in the template_file, which forces a datasource to be refreshed after its dependencies, which should pick up the new resource.
This issue seems to be covering the same problem or request as #17034, so we're going to close it just to consolidate the discussion over there. Thanks!
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 have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
ghost
locked and limited conversation to collaborators
Sep 29, 2019
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I made small terraform file to reproduce this issue.
When I change
name
onaws_route53_record.test
totest2.domain.com
, buttemplate_file.tpl
fails detect change on first apply. It detects change on next apply.Using
aws_route53_record.test.fqdn
instead ofname
solves the problem in this case. It seems thatname
reads value from previous state since it is not a computed attribute, andfqdn
works well since it is computed attribute and defers evaluation until apply.Is this behavior intended? Even if this behavior is intended, I think enhancing documentation about this case may help everyone a lot.
The text was updated successfully, but these errors were encountered: