# Terraform wants to replace many resources because it detects that null != ""

**URL:** <https://discuss.hashicorp.com/t/terraform-wants-to-replace-many-resources-because-it-detects-that-null/17845>\
**Category:** Terraform\
**Created:** [November 19, 2020, 12:11pm UTC](https://discuss.hashicorp.com/t/terraform-wants-to-replace-many-resources-because-it-detects-that-null/17845 "2020-11-19T12:11:00Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![apparentlymart](https://sea2.discourse-cdn.com/hashicorp/user_avatar/discuss.hashicorp.com/apparentlymart/32/702_2.png) [@apparentlymart](https://discuss.hashicorp.com/u/apparentlymart)\
**Post date:** [November 19, 2020, 11:48pm UTC](https://discuss.hashicorp.com/t/terraform-wants-to-replace-many-resources-because-it-detects-that-null/17845/2 "2020-11-19T23:48:56Z")

</div>

Hi @ecerulm,

This seems like something that was more likely to be caused by a provider upgrade rather than a Terraform upgrade. Did you happen to also upgrade the AWS provider at the same time?

It _is_ possible that this sort of change could result from a bug fix to Terraform Core, if something was not being compared correctly before, but AFAIK Terraform has been treating`""` as different to `null` since Terraform 0.12 (which is the release that introduced `null`), and so that’s why I’m suspecting that it may be a change of behavior in the provider or in the provider SDK.

If we can narrow down exactly what caused this change in behavior then I may have a better suggestion, but for now I think the only _general_ idea I have is to change the configuration to match the prior state, by writing out the empty string values of these arguments explicitly:

```auto
  gateway_id = ""
  # etc

```

Not ideal by any means, so I’m hoping we can find a better solution by narrowing down the cause.

---

_[View the full topic](https://discuss.hashicorp.com/t/terraform-wants-to-replace-many-resources-because-it-detects-that-null/17845)._
