-
Notifications
You must be signed in to change notification settings - Fork 458
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
Build Modules from Various Sources #584
Conversation
In general, this is ready for review. I'm gonna adda a few test cases around modules, fix the existing tests and perhaps extract a few classes into dedicated files. Conceptually it's going to stay like this for now. On a high level, this merged the module and provider schema generation. Both is now generated from a Terraform config, where the module schema is processed via The naming part for modules is a bit tricky. Since this supports various module sources now, a simple string source doesn't cut it anymore. Hence, this introduces an additional option to define modules - both options will be valid: {
terraformModules: [
"terraform-aws-modules/vpc/aws@2.39.0",
{
name: "AwsVpc",
source: "terraform-aws-modules",
version: "2.39.0"
}
]
} Furthermore, there's a breaking change regarding the generated module name. Given the following config: {
terraformModules: [
"terraform-aws-modules/vpc/aws@2.39.0",
]
} Before a class {
terraformModules: [
{
name: "Vpc",
source: "terraform-aws-modules",
version: "2.39.0"
}
]
} |
I'm going to lock this pull request 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 related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
This adds a new package,
@cdktf/hcl2json
which is being used to to convert HCL to JSON. This is required to get the inputs and outputs for a given module.This aims to fully resolve #522