-
Notifications
You must be signed in to change notification settings - Fork 33
Can't access vars in resource_configuration #104
Comments
I'm trying again with terraform 15. I can get outputs to work with
although it seems to alternate between returning the VM's actual name and the name field which is visible in Properties/name in the machine's I still can't get |
I spent quite a bit of time on this same problem and eventually came to a solution. I'm using provider version 3.0.2, terraform 1.0.3, and vra7 v7.5+. I have a resource which provisions several VMs. In my case I'm only configuring a single
Both This works as expected, so this is how i've successfully accessed instance information. I couldn't get the examples provided in this repo to work, but perhaps that's user error. /shrug |
@michael81877 THANK YOU for sharing this. I was banging my head against a wall for a long time trying to get this working and this got me on the right track. I'm using provider version 3.0.2, Terraform 1.0.4 and vRA 7.6. I needed to make one change though since I'm potentially deploying >1 deployment. Both of the resources are below.
|
vRA 7.x version
Version: 7.5.0 (Build: 10053500)
Terraform version
Terraform v0.14.4
terraform-provider-vra7 plugin version
Describe the bug
Variables inside
resource_configuration
blocks are inaccessible.Hello,
After huge gobs of pain I had deployment working under Terraform 11. I have just been through the various upgrade steps to move to V14 but I am now unable to access vars in
resource_configuration
. I've spent a day and a half searching and trying things I've found here and elsewhere without any real progress. Terraform complainsError: Invalid template interpolation value: Cannot include the given value in a string template: string required.
after the VM is deployed successfully and stops.I've seen that this problem has been experienced by others. I've tried things with and without
count
but I really want it to remain to permit mutilple deployments. My script looks in part like this:I've tried splats, as seen in the output vars. I've tried
self
as seen in the file provisioner connection block. I've tried with and withoutproperties
andinstances
and many other things and I still can't get this to run.vra7_deployment.ansible_master[*]
inconnection
also fails. Can someone help, please, as this really does seem like a bug rather than a 'feature' and no amount of trying will make it work here? It shouldn't be this hard especially given that it worked previously.Thanks.
To Reproduce
As described above. Even paths which work from
terraform console
do not work in production.Expected behavior
Variables inside
resource_configuration
should be accessible.The text was updated successfully, but these errors were encountered: