5 ms·
> Getting Started with Python. Prerequisites: Terraform >= v0.12, Node.js >= v12.16 What? :(
by StavrosK 6y ago
> Getting Started with Python. Prerequisites: Terraform >= v0.12, Node.js >= v12.16
What? :(
- flurie 6y agoI believe both the aws cdk and this use code generation to create the libraries for languages other than typescript, and you're reliant on the typescript package for updates to those libraries.
- StavrosK 6y agoHmm, how do you mean? Doesn't the Python code generate JSON that Terraform then reads?
- chucky_z 6y agocdktf the cli is all js iirc, this is because the underlying library (jsii) is all js.
- cmclaughlin 6y agoIndeed... technically you don't have to use the cdktf CLI. For instance, I typically run "python main.py" to synthesize from Python to Terraform. From an end-user perspective, once you have your cdktf environment setup you don't really ever have to deal with node.js at all. I've never had a reason to dig into this very deep, but my understanding is the cdktf Python libraries use JSII Python libraries which interact with the main JSII implementation which runs under node.js. That's where the conversion from Python to HCL compatible JSON happens. Or in the case of the main AWS CDK, from your favorite programming language to CloudFormation. More info on JSII here: https://aws.github.io/jsii/overview/runtime-architecture/ https://aws.github.io/jsii/overview/runtime-architecture/