Open Patricol opened 2 years ago
Hi! We could add a last_modified
timestamp to the remote_file
resource (at least the remote_file
data source). That would solve your problem, right? But I wonder why something else would change the file. Is terraform not considered the owner and sole editor of the file?
Another thought, could you use a remote_file
data source to read the current file content, and trigger the provisioner only if the current and desired content differ?
Hello! Thanks for the provider.
Currently,
id
is deterministic, and I don't see any other attributes that can be used to reliably trigger, for example, anull_resource
wheneverremote_file
is applied.A more specific example:
If something else changes the contents of the file; applying again will change the file back, but will not rerun
restoreconfig
.remote_file
doesn't currently have any documented attributes that can solve this problem.