Error when running custom provider

I’m trying to create a custom terraform provider and I’m currently running into this error when I run terraform plan or apply

│ Error: Invalid address to set: []string{"databases", "0", "updated_at"}
│   with data.planetscale_databases.all,
│   on line 14, in data "planetscale_databases" "all":
│   14: data "planetscale_databases" "all" {

this is the code I’m using to perform a read

I’m not exactly sure why the error shown mentions a “set” address when databases is TypeList, but that could be an old SDK quirk.

It looks like your problem is just that flattenDatabases creates the attribute as updated_at, while the schema declares the attribute as last_updated

thank you so much @jbardin :sweat_smile: been stuck on this for a while