Interpolation-only expressions are deprecated warning during terraform init

So I have been trying to explore Infrastructure as Code in my spare time and while trying out terraform I get this warning:

Warning: Interpolation-only expressions are deprecated
on line 40, in resource "vsphere_virtual_machine" "vm":
40: resource_pool_id = "${}"

Seems like post version 0.11, resource declaration doesn’t need special syntax i.e. ${} which was not reflected in the offical documentation. So the simple solution was to let go off of the ${} expression. Since the current version is 1.19, I guess I am a late comer joining the party however equally baffled how this wrong documentation wasn’t stirring any noise!

resource_pool_id = ""

However, after following the latest format and trying to run terraform apply, I got an error:

Error: could not find resource pool ID "": ServerFaultCode: The object '' has already been deleted or has not been completely created

No wonder the official documentation still had the old format in place. So, until Vmware provider implements update on their side, we have to go with the deprecated syntax.

Leave a Reply

Your email address will not be published. Required fields are marked *