Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
625 views
in Technique[技术] by (71.8m points)

vsphere - Terraform - running remote exec on new multiple VM-s

Question: I am trying to create a number of VM-s using Terraform & vSphere. The creation is all fine, looks ok, but the provisioner tasks are failing, as it can not interpret the host.

The relevant part of the code is here

Expected:

  • create 2 VM-s

enter image description here

  • with increasing IP addresses

enter image description here

  • then run a simple powershell script on them

enter image description here

However, it errors out, saying the host should be a string.

enter image description here

How can I refer to the IP address of the VM that is just being created, via the "self" object? (Or really, is there a way to display this "self" object and it's attributes?)

question from:https://stackoverflow.com/questions/65845991/terraform-running-remote-exec-on-new-multiple-vm-s

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...