I have a aws stack that creates vpc, subnets, ec2 using cdktf java library. I would like to package this code into a Jar file and run this from another java application using the
ProcessBuilder, something like this
ProcessBuilder processBuilder = new ProcessBuilder(
"cdk",
"deploy",
"aws-stack.jar",
"--var-file aws.tfvars"
);
Process process;
try {
process = processBuilder.start();
} catch (IOException e) {
throw new RuntimeException("Cannot start cdk process!", e);
}