1

I want to generate only one time that cdk.tf.json file using cdktf synth and each time i want to deploy i want to use that cdk.tf.json generated when cdktf synth is executed.

So the workflow will look like very similar to:

terraform plan -out tfplan 
terraform apply tfplan  
FlorianLudwig
  • 325
  • 2
  • 9
Ramzi
  • 13
  • 2
  • did you find a solution? If so it would be great to post it here :) – FlorianLudwig Jun 17 '23 at 11:42
  • Why would you want to re-use it? – Daniel Schmidt Jun 23 '23 at 14:36
  • @DanielSchmidt i think it will be useless to regenerate the json file at synth phase and at deployment phase, also for programming languages other than typescript, generating the json takes a lot of time. thank you – Ramzi Jun 24 '23 at 17:30
  • @FlorianLudwig well did'nt find solution yet , but i think you can generate the json file using cdktf synth then you navigate to cdktf.out folder where the JSON file exists then run Terrafrom Apply instead of CDKTF Deploy. – Ramzi Jun 24 '23 at 17:34
  • Does sth like this solve your problem? https://github.com/hashicorp/terraform-cdk/pull/2993 – Daniel Schmidt Jul 06 '23 at 13:29
  • @DanielSchmidt Adding it as an option in cdtkf deploy command would be a great idea, thanks. – Ramzi Jul 06 '23 at 21:41

0 Answers0