I'm slightly confused with the syntax of how to get the UUID or MOID of the newly generated VM, referenced in the documentation.
I thought it would be: ${data.vsphere_virtual_machine.id}
, but data
requires four parts...so trying with something along the lines of ${data.vsphere_virtual_machine.vm.id}
failed as well.
Can you point me in the right direction for the syntax to get the UUID or MOID?
Thanks!
Idea behind requiring the MOID or UUID of the newly generated VM is to pass it into a remote-exec
call, with which I can use in a script to have a unique name for the VM.
data "vsphere_virtual_machine" "template" {
name = "test-vm-template"
datacenter_id = "${data.vsphere_datacenter.dc.id}"
}
--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
GitHub Issues: https://github.com/hashicorp/terraform/issues
IRC: #terraform-tool on Freenode
---
You received this message because you are subscribed to the Google Groups "Terraform" group.
To unsubscribe from this group and stop receiving emails from it, send an email to terraform-too...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/terraform-tool/35543b5d-866b-4352-a837-221989a3b97b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Error: resource 'vsphere_virtual_machine.vpshere_build_machine' provisioner remote-exec (#3): unknown resource 'data.vpshere_virtual_machine.template' referenced in variable data.vpshere_virtual_machine.template.id
Error: resource 'vsphere_virtual_machine.vpshere_build_machine' provisioner remote-exec (#3): unknown resource 'data.vpshere_virtual_machine.template' referenced in variable data.vpshere_virtual_machine.template.moid
To view this discussion on the web visit https://groups.google.com/d/msgid/terraform-tool/0551c303-8dea-4ee6-b992-5581e85c9cfe%40googlegroups.com.
--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
GitHub Issues: https://github.com/hashicorp/terraform/issues
IRC: #terraform-tool on Freenode
---
You received this message because you are subscribed to the Google Groups "Terraform" group.
To unsubscribe from this group and stop receiving emails from it, send an email to terraform-too...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/terraform-tool/601eb780-16cf-40a6-9bfb-ce0a83c385f1%40googlegroups.com.
* Resource 'data.vsphere_virtual_machine.template' does not have attribute 'moid' for variable 'data.vsphere_virtual_machine.template.moid'
--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
GitHub Issues: https://github.com/hashicorp/terraform/issues
IRC: #terraform-tool on Freenode
---
You received this message because you are subscribed to the Google Groups "Terraform" group.
To unsubscribe from this group and stop receiving emails from it, send an email to terraform-too...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/terraform-tool/7102260a-3f65-4925-9c32-11ea6b420724%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/terraform-tool/b0b8a9ac-7bf1-495c-898f-70e1dd24cf6a%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/terraform-tool/b2bc7573-e46e-44b6-9033-1dfe6a639aba%40googlegroups.com.