# Cdktf 0.8.6 to 0.14.1 problem with tfstate

**URL:** <https://discuss.hashicorp.com/t/cdktf-0-8-6-to-0-14-1-problem-with-tfstate/47483>\
**Category:** CDK for Terraform\
**Created:** [November 30, 2022, 11:39pm UTC](https://discuss.hashicorp.com/t/cdktf-0-8-6-to-0-14-1-problem-with-tfstate/47483 "2022-11-30T23:39:09Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![tomislavbalabanov](https://sea2.discourse-cdn.com/hashicorp/user_avatar/discuss.hashicorp.com/tomislavbalabanov/32/32329_2.png) [@tomislavbalabanov](https://discuss.hashicorp.com/u/tomislavbalabanov)\
**Post date:** [November 30, 2022, 11:39pm UTC](https://discuss.hashicorp.com/t/cdktf-0-8-6-to-0-14-1-problem-with-tfstate/47483/1 "2022-11-30T23:39:10Z")

</div>

Hello,

When I upgraded from cdktf 0.8.6 to 0.14.1, the following error is happening during deploy:

```auto
 Error decoding "azurerm_function_app.devkdsamain-fa" from previous state:
│ unsupported attribute "client_affinity_enabled"

```

Does anyone has any idea why this is happening and how can I fix it?

Working version:

```auto
{
 "@cdktf/provider-azurerm": "^0.3.77",
    "@cdktf/provider-null": "^0.3.82",
    "cdktf": "^0.8.6",
    "constructs": "^10.1.42",
}

```

Current setup (not working):

```auto
{
 "@cdktf/provider-azurerm": "^2.0.20",
    "@cdktf/provider-null": "^2.0.74",
    "cdktf": "^0.12.3",
    "cdktf-cli": "^0.12.3",
    "constructs": "^10.1.175",
}

```

Any help is appreciated.

---

<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:** [December 6, 2022, 2:10am UTC](https://discuss.hashicorp.com/t/cdktf-0-8-6-to-0-14-1-problem-with-tfstate/47483/2 "2022-12-06T02:10:55Z")

</div>

Possibly a bug in the azurerm provider, though I haven’t found anything on the provider GitHub.  
May be related to `azurerm_function_app` being deprecated.  
Might need to resort to manually editing your `tfstate` to remove the attribute.
