Hello,
i’m trying to use data resource to read local file, which exists.
And i need this data resource to detect changes, if there are, as later some resources will be recreated if file updated.
so i wrote this block:
data "local_file" "openbao_csr_bash" {
filename = "${path.module}/files/openbao.csr.bash"
}
and on first iteration all worked as expected, i’ve managed to get content_md5 and proceed with other resources.
But when i repeat terraform plan after first apply - it dropps error:
Planning failed. Terraform encountered an error while generating this plan.
Error: no change found for data.local_file.openbao_csr_bash in the root module
and yes, it is expected, that there are no changes.
and it is expected to get info about that file and that’s it.
do you know why it is like that? is it bug?
terraform version 1.10