Insufficient metadata blocks during upgrade to 0.15

Im trying to upgrade from terraform 0.14.11 to 0.15.5 and getting this error during terraform apply. How do I find out where this error complaining about? the returned message says “Line 0 source code not avaliable”

What is a metadata block? My codebase is quite monolithic so its quite hard to track if it doesn’t specify a line # or module name.

Error: Insufficient metadata blocks
on line 0:
(source code not available)

At least 1 “metadata” blocks are required.

I’m unfamiliar with this error, but Google turned up Terraform module throws `Error: Insufficient attribute blocks` - Stack Overflow which looks relevant.

Hi @aromahops,

I would start by suggesting that you skip to v1.0.11, as it was a direct continuation of the same release branch, and contains more fixes for known issues. Also, if you can ensure you are only upgrading the terraform CLI while keeping all provider versions the same, it would help reduce the scope of what we’re looking for here.

If a more recent patch still shows no source for the problem, my first guess is that the error is from an implied provider with no explicit configuration. Can you show the output of terraform providers?

You can also look at the trace logs from TF_LOG=trace and see if there are any clues as to where the error is originating.

1 Like


upgrading to 1.0.11 worked! It provided me with a better error message and line number relating to a kubernetes yaml file that was missing a metadata block.

Thank you for the help!