Running terraform --reconfigure --upgrade through cdktf

Trying to understand how to work with cdktf when using a newer version of terraform. My current experience is that when doing the TF upgrade and running a cdktf deploy, I get this error:

          │ Error: Backend configuration changed
          │ 
          │ A change in the backend configuration has been detected, which may require
          │ migrating existing state.
          │ 
          │ If you wish to attempt automatic migration of the state, use "terraform init
          │ -migrate-state".
          │ If you wish to store the current configuration with no changes to the state,
          │ use "terraform init -reconfigure".

Is there some way to handle this without going to each cdktf.out folder and running terraform? That is very cumbersome to do and should be handled at the cdktf stack level. In the documentation I don’t see any information related to this.

1 Like