Closed thomas-auth0 closed 1 month ago
Hey, @thomas-auth0! 👋
Thank you for raising the issue! Could you please also suggest what values for those fields do you see in the state file directly (usually named as terraform.tfstate
)?
values for those fields do you see in the state file directly:
Thanks!, Here's the actual state (with 3.12.1
):
"pg_user_config": [
{
"enable_ipv6": "",
"pg": [
{
"autovacuum_analyze_scale_factor": "",
Hey, @thomas-auth0! 👋
Could you please update the Terraform version (not the provider's version) to the latest one and try it again?
Additionally, I recommend to check what is the schema_version
in the state. In case it's value is other than 0, please change it to be so. This field serves as an indicator for the Terraform to run the "state upgrading" functions.
I tried to reproduce your issue, but I haven't been able to. Here's exactly what I did:
enable_ipv6
flagenable_ipv6
set to an empty string:"...",
"schema_version": 0,
"...",
"enable_ipv6": "",
"..."
maintenance_window
) in order to trigger a diff in the service's config/state, and consequentially continued with the apply operation.enable_ipv6
field was correctly "upgraded" in the state and the state then looked like this:"...",
"schema_version": 1,
"...",
"enable_ipv6": false,
"..."
I looked up the error message, a <type> is required
, and it looks like there were instances when this error appeared in older versions of Terraform, that were related to a bug in the Terraform itself, so I recommend to check whether upgrading your Terraform to the latest version helps to resolve the problem or not.
I will be closing this issue for the time being. If you have any additional information to share, please feel free to do that over here 🙂
Thanks @Serpentiel I'll try with a different version.
Hi ! We have the same error, any ideas from where it comes please ?
Hey, @anthonydurot! 👋
I'm afraid I'm no longer actively participating in the maintenance of this repository.
I'll mention @byashimov or @rriski for additional help, though.
Hey @anthonydurot:
What happened?
I'm trying to upgrade the Aiven provider from 3.12.1 to 4.9.3 using Terraform 1.1.7
When I update the provider to 4.x and run
terraform init && terraform plan
, I get the following errors with theaiven_pg
resources:These settings are empty in my config (they are not defined in the
pg_user_config
blocks, uses defaults).In Terraform provider 3.x they defaulted to empty string, and with 4.0.0 they now should have strict types.
What did you expect to happen?
It looks like the stateUpgrader is not updating the types as it should.
What else do we need to know?
The problem disappear if I manually add
enable_ipv6 = false
in the config, but I shouldn't have to add all these optional settings. Am I missing something in this upgrade process?