I have my terraform infrastructure defined in many configuration files as below.
I wanted to organise them a bit by moving the configuration files starting with "glue_" into their own directory.
But when I applied the change it removed all of the resources that I moved into the glue directory.
Is there some trick that will allow me to move my configuration files into their own directory without terraform removing/ignoring them?
Note: I am using using terraform cloud.
I think this happen because Terraform ignore what you have in the subfolders, so the resources in the glue
directory will not be created.
Indeed, you can create a module glue
and recall it in the main module.
EDIT: I also found an really similar question What is the correct way to setup multiple logically organized sub folders in a terraform repo?
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.