I am trying CDKTF for the first time and I want to create a pipeline that produces a valid plan file so that I can terraform apply plan. The documentation is very vague here and it does not say which commands exactly I should run and in what order
I cannot use cdktf deploy because I want the option to manually review the changes/diff/plan in some cases, and that requires the plan and apply to be in separate pipeline steps
Thank you for raising that! Running cdktf synth will be enough from the CDKTF side of things. For the required Terraform commands that would be following Terraform best practices – here is a related link from the Terraform docs that we should’ve linked: Running Terraform in Automation | Terraform | HashiCorp Developer
You would also need to run these Terraform CLI commands for the output directory of every stack (if you have multiple stacks).
Are there any plans in cdktf to provid a more “cdktf native” approach? e.g have something like a --plan option to the cdktf deploy cli? Or will using the terraform internals be the solution to use for the time being?