-
Notifications
You must be signed in to change notification settings - Fork 456
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
AppOptions: Define Outdir in the code raise a synth ERROR #3405
Comments
Hi @caparisi 👋 This is currently required and by design. The CDKTF CLI invokes the So at this point, you have three options to pass the outdir to the CLI:
Passing the I'm curious: What is your underlying use-case? I guess you are dynamically generating it and aren't using a static string there? |
Hi @ansgarm, Thanks for your answer, I didn't found this clearly explained in the documentation but maybe I didn't looking to the right place ^^ Initially, we had 1 git repository with 1 cdktf App. More we use it, more we had stacks and complexity so we split us infra in many different scripts (+ a kind of "common library" to do a lot of factorization/reusable code), each one call with the From your explanation, I understand that the "right" way to do the things will be to create a folder to each App script in which we will have to init a cdktf App, isn't? If this is the case, I guess that we will stay the '-o' param because else we will have 8 different PS: To give you a bit of context. I work for a big non-profit humanitarian (8K employee, 20M beneficiary). We use CDKTF to manage in IaaS all our infrastructure. |
Yes, that would be the recommended way based on the assumptions that the CDKTF CLI makes. However, I can see where you're coming from. So I wouldn't discourage your approach 👍 I added some more docs in #3463 for the I'm going to link that PR to close this issue, once it's merged. If there's anything else you run into, don't hesitate to create a new issue! |
…ing CDKTF CLI Related to #3405
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
With python, I want define the output dir directly in the code (without specify it in the command line) when I create the App object like :
Synth cmd is :
cdktf synth -a "pipenv run python ./environment-xxxxxxx.py"
Actual Behavior
When we execute the synth, we get the following error (error code 1):
The output itself is well generated, we could go in the stack generated file and execute terraform init/apply without any issue.
If we specify the ouput dir in the command line with
-o
, the issue don't happenSteps to Reproduce
output
param likeApp(outdir='out-environment-xxxxxxx.out')
-o
paramVersions
language: Python 3.10.13
cdktf-cli: 0.20.0
node: v20.9.0
Terraform: v1.6.6
OS: Linux x86_64
Python dependency:
Providers
Python dependency:
Gist
No response
Possible Solutions
No response
Workarounds
No response
Anything Else?
No response
References
#3334
Help Wanted
Community Note
The text was updated successfully, but these errors were encountered: