I have a global variables file that i want to use in different subfolders. For that i put it in a folder called shared then i did a symlink in the other subfolders.
shared
.global_variables.tf
s3
.gloabl_variables -> shared/global_variables.tf
.main.tf
.output.tf
.variables.tf
I created the symlink using this command : ln -s shared/global_variables.tf s3/global_variables.tf
Now in the S3 folder if i run terraform init i'm getting this error :
Error: Failed to read file
The file "global_variables.tf" could not be read
It seems like terraform is not recognizing the symlink of the file.
How to solve that ?
Thanks