Decouple the

Hi, I was wondering if there is a way to decouple the config file ? I have a pretty long configurations so I was looking for a way to split them into different parts (or maybe files) for better maintenance. But I couldn’t find any documentation about this.

Also, if there is a way to add a for loop to , like I have 1000 lambda functions, and name them as name-0 - name-999 . I’m filling the name manually 1 by 1 in the configurations, if there is a better way to fill their names with for loop? is not a filename with special meaning to Terraform.

Terraform just loads all of the files named in a directory, and treats them all the same.

(OK, the above isn’t totally true… there is a special case for files named or But apart from that one special case, Terraform doesn’t care what you name your .tf files.)

Have you read about count and for_each in the Terraform documentation?

If you give an example of 2 or 3 of your repeated definitions, so we can see in more detail what you’re dealing with, it would be easier to advise correctly.