You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 17, 2024. It is now read-only.
vRA 7.x version
vRA 7.3 Terraform version
Terraform v0.12.26
terraform-provider-vra7 plugin version
provider.vra7 v1.0.1
Describe the bug
Can't change state of the VM instances provisioned by Terraform through vRA.
Context
I build a VM through vRA using a terraform plan and the vRA7 provider successfully.
If I try to change the lease that's goes through without a problem, same if I change CPU or Mem.
I can't start a VM (that was powered off through vRA) by running a terraform updated plan.
Further details
If I shutdown the VM from vRA or vCenter, upon a state refresh the respective details are properly updated in the state file, so one can see its status and available actions per that status, for example:
Right after provisioing the VM through terraform (the VM is on), I have:
So, following this observation (while the VM was still poweroff) I've updated the main terraform plan by changing the state, once that hasn't worked, I've tried changing some of the other, like setting PowerOff=true (have had quite a few tries and combinations).
All terraform plans get applied successfully and in vRA under Requests tab I can see the "Reconfigure a machine" action that terraform instigates, finishing successfully as well.
The VM on the other hand, doesn't power on, or power off to that matter.
Conclusion
As mentioned, this may not be a bug, but I would have expected I can modify any of the resource properties after the initial provisioning. In case this is not a bug, an explanation as to how it all works would be highly appreciated.
To Reproduce
Steps to reproduce the behavior:
The VM is already provisioned through terraform and I'm reapplying the following plan:
2020/06/19 10:36:41 [WARN] Log levels other than TRACE are currently unreliable, and are supported only for backward compatibility.
Use TF_LOG=TRACE to see Terraform's internal logs.
Refreshing Terraform state in-memory prior to plan...
The refreshed state will be used to calculate this plan, but will not be
persisted to local or remote state storage.
Note: You didn't specify an "-out" parameter to save this plan, so Terraform
can't guarantee that exactly these actions will be performed if
"terraform apply" is subsequently run.
Then I run apply:
terraform apply -auto-approve
2020/06/19 10:38:05 [WARN] Log levels other than TRACE are currently unreliable, and are supported only for backward compatibility.
Use TF_LOG=TRACE to see Terraform's internal logs.
vra7_deployment.TFTest01[0]: Refreshing state... [id=46610d78-efa8-43f5-a840-3fb42e2335a5]
vra7_deployment.TFTest01[0]: Modifying... [id=46610d78-efa8-43f5-a840-3fb42e2335a5]
vra7_deployment.TFTest01[0]: Still modifying... [id=46610d78-efa8-43f5-a840-3fb42e2335a5, 10s elapsed]
vra7_deployment.TFTest01[0]: Still modifying... [id=46610d78-efa8-43f5-a840-3fb42e2335a5, 20s elapsed]
vra7_deployment.TFTest01[0]: Still modifying... [id=46610d78-efa8-43f5-a840-3fb42e2335a5, 30s elapsed]
vra7_deployment.TFTest01[0]: Still modifying... [id=46610d78-efa8-43f5-a840-3fb42e2335a5, 40s elapsed]
vra7_deployment.TFTest01[0]: Still modifying... [id=46610d78-efa8-43f5-a840-3fb42e2335a5, 50s elapsed]
vra7_deployment.TFTest01[0]: Still modifying... [id=46610d78-efa8-43f5-a840-3fb42e2335a5, 1m0s elapsed]
vra7_deployment.TFTest01[0]: Still modifying... [id=46610d78-efa8-43f5-a840-3fb42e2335a5, 1m10s elapsed]
vra7_deployment.TFTest01[0]: Still modifying... [id=46610d78-efa8-43f5-a840-3fb42e2335a5, 1m20s elapsed]
vra7_deployment.TFTest01[0]: Still modifying... [id=46610d78-efa8-43f5-a840-3fb42e2335a5, 1m30s elapsed]
vra7_deployment.TFTest01[0]: Still modifying... [id=46610d78-efa8-43f5-a840-3fb42e2335a5, 1m40s elapsed]
vra7_deployment.TFTest01[0]: Still modifying... [id=46610d78-efa8-43f5-a840-3fb42e2335a5, 1m50s elapsed]
vra7_deployment.TFTest01[0]: Still modifying... [id=46610d78-efa8-43f5-a840-3fb42e2335a5, 2m0s elapsed]
vra7_deployment.TFTest01[0]: Still modifying... [id=46610d78-efa8-43f5-a840-3fb42e2335a5, 2m10s elapsed]
vra7_deployment.TFTest01[0]: Modifications complete after 2m17s [id=46610d78-efa8-43f5-a840-3fb42e2335a5]
Expected behavior
Would have expected that when I have changed the State (or any of the other reboot variables) to apply these changes to the existing instance.
On the other hand, the command terraform plan, does sort allude that's not something I am controlling, ie:
vRA 7.x version
vRA 7.3
Terraform version
Terraform v0.12.26
terraform-provider-vra7 plugin version
provider.vra7 v1.0.1
Describe the bug
Can't change state of the VM instances provisioned by Terraform through vRA.
Context
I build a VM through vRA using a terraform plan and the vRA7 provider successfully.
If I try to change the lease that's goes through without a problem, same if I change CPU or Mem.
I can't start a VM (that was powered off through vRA) by running a terraform updated plan.
Further details
If I shutdown the VM from vRA or vCenter, upon a state refresh the respective details are properly updated in the state file, so one can see its status and available actions per that status, for example:
Right after provisioing the VM through terraform (the VM is on), I have:
Whilst, after I've run shutdown (from vc or vra) following a terraform refresh I now have:
If I power the VM on from vRA, then I have:
So, following this observation (while the VM was still poweroff) I've updated the main terraform plan by changing the state, once that hasn't worked, I've tried changing some of the other, like setting PowerOff=true (have had quite a few tries and combinations).
All terraform plans get applied successfully and in vRA under Requests tab I can see the "Reconfigure a machine" action that terraform instigates, finishing successfully as well.
The VM on the other hand, doesn't power on, or power off to that matter.
Conclusion
As mentioned, this may not be a bug, but I would have expected I can modify any of the resource properties after the initial provisioning. In case this is not a bug, an explanation as to how it all works would be highly appreciated.
To Reproduce
Steps to reproduce the behavior:
Then I run apply:
No error, but the VM Machine state does not change, the state looks like this:
Expected behavior
Would have expected that when I have changed the State (or any of the other reboot variables) to apply these changes to the existing instance.
On the other hand, the command terraform plan, does sort allude that's not something I am controlling, ie:
Screenshots
Screenshot of the vRA reconfigure operation:
Logs
19062020-102137.log
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: