Load terraform modules from local in blueprints

We have a terraform module to create a VPC inside git repository, we need to load this module for all other terraform code in the same git repository. Like below,

While creating blueprints for terraform, the ‘working path’ field has an option to pass the directory path to access the terraform code, say ‘EC2’ from the image shown above, doing this loads only the code related to EC2, the ‘VPC’ code inside modules folder code cannot be loaded(Note : Path of the VPC module is give in EC2 terraform code as ‘source=…/modules/vpc’)

Is there any possible option to pass multiple working paths or any other way to load this ‘VPC’ module during terraform init?

based on the tree you provided it looks like your module directory is one directory up from your working path assuming EC2 is the working directory. Can you try “source=../modules/vpc” This would specify one directory up from TF.

Tried that but the problem is passing the working path as ‘AWS/EC2’ as below,

This loads the files only related to EC2 folder
main.tf
outputs.tf
variables.tf
The tf files inside module folder also need to be loaded like,
main.tf
outputs.tf
variables.tf
modules/vpc/main.tf
modules/vpc/outputs.tf
modules/vpc/variables.tf

Passing as source=…/modules/vpc will not load modules.
Is there a way to add this module folder in the working path?

This is what I see with a setup similar to what you provided. My module directory is one up from my working directory. Can you provide your TF code somewhere with the full structure that I can test against? You wont see all the files but you should see the module reference.

image

My module reference in my main.tf in the working directory looks like this.

image