Top-level attributes are not valid

Using the 0.12upgrade tool on the VMWare provider template example, I get error:

TF-UPGRADE-TODO: Top-level attributes are not valid, so this was not automatically upgraded

virtual_machine_dns_servers = [

… for all variables in the terraform.tfvars file.

How can I fix it?

Hi @wirelessben,

It seems like for some reason the upgrade tool tried to treat your terraform.tfvars file as a .tf file rather than as a .tfvars file. I’m not sure quite why it did that (we’ve not seen reports of that behavior before, so I must assume it’s something unusual in your environment :frowning: ), but if that is the only problem you are seeing from your upgrade my suggestion would be to simply delete the TF-UPGRADE-TODO comment and leave your virtual_machine_dns_servers definition unchanged.

Sorry for that odd behavior!

That’s good to know. Thank you, Martin. Downgrading to 11.14 fixed the problem, so I’ll stick with that for now.