Template Files as User Data don't seem to render the same from plan to apply/from one apply to another #1998
Labels
bug
provider/template
waiting-response
An issue/pull request is waiting for a response from the community
I was testing using the new template resource with creating a user-data script for AWS, when I noticed that even when I don't change the template/vars from one run to the next, Terraform still wants to reprovision any instances I defined because the user_data hash/checksum appears to be different.
Here is my
example.tf
:and my
template.txt
:Here is the results of running plan, apply, and then another plan:
I haven't dug into the code too much, but I am thinking the plan command should render the templates just as the apply command does, which may be difficult if the template uses data from other resources that haven't been built yet. Perhaps when things are refreshed/read from the state file, that could be used, if it's not already?
The text was updated successfully, but these errors were encountered: