- Community Home
- >
- Software
- >
- HPE Morpheus Software
- >
- HPE Morpheus Enterprise
- >
- Load terraform modules from local in blueprints
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-17-2022 10:05 PM
07-17-2022 10:05 PM
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?
- Tags:
- Terraform

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-25-2022 11:43 PM
07-25-2022 11:43 PM
Re: Load terraform modules from local in blueprints
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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-26-2022 06:22 AM
07-26-2022 06:22 AM
Re: Load terraform modules from local in blueprints
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.
My module reference in my main.tf in the working directory looks like this.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-18-2022 07:24 AM
07-18-2022 07:24 AM
Re: Load terraform modules from local in blueprints
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.