# Backend configuration changed error

**URL:** <https://discuss.hashicorp.com/t/backend-configuration-changed-error/39696>\
**Category:** CDK for Terraform\
**Created:** [May 18, 2022, 11:06pm UTC](https://discuss.hashicorp.com/t/backend-configuration-changed-error/39696 "2022-05-18T23:06:23Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![venerari](https://sea2.discourse-cdn.com/hashicorp/user_avatar/discuss.hashicorp.com/venerari/32/28210_2.png) [@venerari](https://discuss.hashicorp.com/u/venerari)\
**Post date:** [May 18, 2022, 11:06pm UTC](https://discuss.hashicorp.com/t/backend-configuration-changed-error/39696/1 "2022-05-18T23:06:23Z")

</div>

Hi

If I init my cdktf, setup providers, codes and deploy it, destroy it as well, it’s fine and I didn’t configure backend at all. If I comeback after a couple of days, and run cdktf diff or deploy, it will get error on below,

```auto
$cdktf diff
test Initializing the backend...

⠦ Processing
[2022-05-18T23:01:03.374] [ERROR] default - ╷
│ 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".
╵
test ╷
      │ 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".
      ╵
      

⠦ Processing
External Error: Stack failed to plan: test. Please check the logs for more information.

```

What’s wrong?

Terraform=1.1.9  
CDKTF=1.10  
NPM=8.5.5  
azurerm~\>2.25  
aws~\>2.25

git azure=https://github.com/rv-terraform/cdktf-test.git(getting error on this)  
git aws=https://github.com/rv-aws/aws1 (I’m not sure yet, I just test this one today)

Also, if I clone the repo to another folder, it will work. So this is annoying to work on existing folder.

Thanks.

---

<div class="post-metadata">

**Author:** ![jsteinich](https://sea2.discourse-cdn.com/hashicorp/user_avatar/discuss.hashicorp.com/jsteinich/32/9502_2.png) [@jsteinich](https://discuss.hashicorp.com/u/jsteinich)\
**Post date:** [May 30, 2022, 4:31pm UTC](https://discuss.hashicorp.com/t/backend-configuration-changed-error/39696/2 "2022-05-30T16:31:03Z")

</div>

@venerari are you still encountering this issue?

Some things to check if you are:

- Are you running cdktf from the same directory?
- What does `cdktf.out/stacks/<stack>/cdktf.json` show for the backend configuration?

Using the local (unconfigured) backend is generally not recommended since the state of your infrastructure is only stored locally on your computer. Take a look [here](https://www.terraform.io/language/state/backends) for more information.
