aiven / terraform-provider-aiven

Aiven Terraform Provider
https://registry.terraform.io/providers/aiven/aiven/latest/docs
MIT License
126 stars 69 forks source link

Rsyslog max_message_size being read as 0 instead of 8192 #1621

Closed eversC closed 6 months ago

eversC commented 6 months ago

What happened?

We have a strange issue when bumping versions from v4.9.2 to v4.14.0 whereby the Terraform diff suggests we're going to change the Rsyslog max_message_size on a service integration endpoint from 0 to 8192

  # module.aiven.aiven_service_integration_endpoint.rsyslog["kafka-test"] will be updated in-place
  ~ resource "aiven_service_integration_endpoint" "rsyslog" {
        id              = "test/d75669d0-ed18-48bc-b9e8-89ce439e6101"
        # (4 unchanged attributes hidden)

      ~ rsyslog_user_config {
          ~ max_message_size = 0 -> 8192
            # (5 unchanged attributes hidden)
        }
    }

..the Aiven console, however, shows the max_message_size to already be set to 8192 (which is our desired value).

If we bump back down to version v4.9.2 then Terraform shows no diff.

What did you expect to happen?

On version v4.14.0 there should be no Terraform diff.

What else do we need to know?

I've taken a cursory glance at the v4.9.2..v4.14.0 changes and can't see any related change that could have caused it.

We could of course apply the change, but thought it best to check with you first as the diff is unexpected

Serpentiel commented 6 months ago

Hey, @eversC! 👋

Thanks for raising this problem. Our team will check it out and we'll reach out to you soon to let you know if there's any additional information to share.

Serpentiel commented 6 months ago

Hey, @eversC! 👋

It looks like a default value was added to this field recently, and before that, it was set to zero, because Terraform was not aware of the default value.

I agree that a changelog for updates related to fields that are nested under *_user_config could be a good idea. We currently have something like that in the Aiven Operator for Kubernetes, perhaps we could add something similar to it in the Terraform Provider in the near future.

That said, it should be safe to accept the change, as it essentially is not really going to update anything.

eversC commented 6 months ago

sounds good, thanks for the response @Serpentiel