Terraform upgrade from 0.14.7 to 1.0.11 causes creation of optional values with empty strings


upgrading from Terraform 0.14.7 to 1.0.11 in my project causes me to print out changes in the planning stage that just add some random optional parameters whose values are empty strings, e.g:

  # module.logic-app.azurerm_logic_app_standard.main will be updated in-place

  ~ resource "azurerm_logic_app_standard" "main" {

      + client_certificate_mode        = ""

        id                             = "private_information"

        name                           = "private_information"

      # Warning: this attribute value will be marked as sensitive and will not

      # display in UI output after applying this change. The value is unchanged.

      ~ storage_account_access_key     = (sensitive value)

        tags                           = {}

        # (18 unchanged attributes hidden)

As you can see client_certificate_mode will be added also there has been no change in the whole base outside of the terraform version. Furthermore the access key gets changed?

As this is throughout multiple ressources I would like to avoid this behaviour. How can I fix this?

I am fairly sure there is no way to do that, and you’ll just need to accept this as a one-time cost of performing the upgrade.

No it doesn’t - Terraform says so:

Note the above ends with “The value is unchanged.”

As I did not perform any changes to the provider I wouldn’t expect it to perform changes in adding empty strings for some random optional parameters.

It would be really helpfull if this is a documented change. Otherwise it seems more like an error to me.

Certainly changes to how sensitive attributes are handled is a documented change in these versions.

As for the setting of client_certificate_mode, I don’t know. A lot of knowledge about 0.x versions of Terraform is fading from the community, as people have mostly moved on long ago to currently supported versions. You probably won’t get an answer to “Why?” unless a Terraform core developer with that specific knowledge just happens to view this post and decide to respond.

Even if you do get some additional background information, I very much doubt it lead to a different practical outcome than what I already suggested.