-
Notifications
You must be signed in to change notification settings - Fork 450
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cdktf convert is not working with local modules in parent directories #3008
Comments
I think we don't support a |
Hi there! 👋 We haven't heard from you in 15 days and would like to know if the problem has been resolved or if you still need help. If we don't hear from you before then, I'll auto-close this issue in 30 days. |
Hi there! 👋 We haven't heard from you in 15 days and would like to know if the problem has been resolved or if you still need help. If we don't hear from you before then, I'll auto-close this issue in 30 days. |
I'm closing this issue because we haven't heard back in 45 days. ⌛️ If you still need help, feel free to comment or reopen the issue! |
I'm going to lock this issue because it has been closed for 30 days. This helps our maintainers find and focus on the active issues. If you've found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
Expected Behavior
I have a very complicated project written in HCL. Although our code is still messy, I'd like to attempt to convert it all to CDKTF. The directory structure is like this:
Conceptually, a customer has a helm chart and RDS instance. We should make nearly everything a module, but we haven't yet, so the helm chart is not yet a module. I have navigated to the
/project/aws-project/customers/customera/
folder, and I am trying to convert this entire (messy) structure to CDKTF.I have created a CDKTF like this:
My expectation is that when I run
$ cat *.tf | cdktf convert
from the/project/aws-project/customers/customera/
folder, that a python script is outputted to STDOUT.Actual Behavior
Instead of getting the expected output, I instead get an error
that has been baffling to fix. It seems as if the interpret is trying to generate code like
import * as rds from "./.gen/modules/rds/"
, but that for some reason the line is blank.I have verified that my module seems to be downloaded to the correct location:
See The Full Stacktrace Error Below:
Steps to Reproduce
/modules/rds
directory./projects/subdir/subdir/
directory. Make sure it uses/modules/rds
in the HCL configuration.../../../modules/rds
directory.cdktf get
cat *.tf | cdktf convert
Versions
Providers
Gist
No response
Possible Solutions
This could be a simple misconfiguration on my end. I have investigated if there are any open-source projects doing something similar to what I am trying to do, and I have not found any examples. As a result, I wonder if anyone has tried to do what I am doing.
This search yeilds no results for similar effort:
Workarounds
No, still investigating a possible fix, and I will update this issue if I find one.
Anything Else?
The
cdktf.json
I believe needs to have the namemodules/rds
instead of justrds
. Otherwise,cdktf get
will not download therds
module into the correct location. This leads me to believe that the documentation needs to be updated to handle my use-case, and possibly needs more specification.References
The following document suggests what I am trying to do should be possible, but I due to the error I am receiving and incorrect download location, I am unsure of what I am doing wrong.
Help Wanted
Community Note
The text was updated successfully, but these errors were encountered: