We have an AWS DocumentDB cluster which is deployed and managed by Terraform. We manually changed 2 of the parameter group settings to disabled in the console while we were testing (tls & ttl_monitor). We have since manually enabled them but every time we run terraform plan now it wants to set those 2 parameters to ‘null’. We don’t have any specific Terraform for the parameter group settings and the default setting is to have them enabled so when Terraform sets it to null it won’t make any difference to the actual value but every time we apply, terraform successfully ‘applies’ the changes but subsequent terraform plans keep showing it wants to make the same changes.
I have tried adding in those specific settings into Terraform as ‘enabled’ and this fixes the issue but we have another environment (prod) where we didn’t make those manual changes and if we use Terraform to set the cluster parameters we get a similar issue on prod where despite having them set to enabled, Terraform each time wants to change the ttl_monitor setting. I’m thinking the only way to set this right is to recreate the cluster and not make any further manual changes but would like to understand why Terraform keeps seeing the need to set to null every time.
What I would like is for dev to behave like prod – we have no specific terraform entries for the cluster parameter group settings and so everything is set to default and terraform does not want to keep setting any of the parameter group settings to null each time. This is how prod works and was how dev worked before we manually changed the parameter settings in the console. If the only way is to recreate it then so be it but it seems a bit of a sledgehammer approach, especially if terraform is supposedly setting it to null on apply.