You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cloudstack.apache.org by GitBox <gi...@apache.org> on 2021/12/06 20:26:35 UTC

[GitHub] [cloudstack-terraform-provider] vladimirpetrov opened a new issue #25: cloudstack_template does not wait until the template is ready for use

vladimirpetrov opened a new issue #25:
URL: https://github.com/apache/cloudstack-terraform-provider/issues/25


   When you have both upload template and deploy VM operations, the cloudstack_template does not really wait until the template is in 'Ready' state so the next operation - deploy VM - fails:
   
   ```
   cloudstack_template.tiny_linux: Creating...
   cloudstack_instance.VM1: Creating...
   cloudstack_template.tiny_linux: Still creating... [10s elapsed]
   cloudstack_template.tiny_linux: Creation complete after 11s [id=e375a36e-64e8-48a3-b563-68aa70c56295]
   ╷
   │ Error: Error retrieving ID of template Tiny Linux: No match found for Tiny Linux: &{Count:0 Templates:[]}
   │ 
   │   with cloudstack_autoscale_vm_profile.vm_scale,
   │   on cloudstack_autoscale_vm_profile.tf line 1, in resource "cloudstack_autoscale_vm_profile" "vm_scale":
   │    1: resource "cloudstack_autoscale_vm_profile" "vm_scale" {
   │ 
   ╵
   ╷
   │ Error: Error creating the new instance TERRAFORMVM1: CloudStack API error 530 (CSExceptionErrorCode: 4250): Template 205 has not been completely downloaded to zone 1
   │ 
   │   with cloudstack_instance.VM1,
   │   on cloudstack_instance.tf line 1, in resource "cloudstack_instance" "VM1":
   │    1: resource "cloudstack_instance" "VM1" {
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack-terraform-provider] vladimirpetrov commented on issue #25: cloudstack_template does not wait until the template is ready for use

Posted by GitBox <gi...@apache.org>.
vladimirpetrov commented on issue #25:
URL: https://github.com/apache/cloudstack-terraform-provider/issues/25#issuecomment-994467098


   This trick works, thanks @harikrishna-patnala, closing the issue.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack-terraform-provider] harikrishna-patnala commented on issue #25: cloudstack_template does not wait until the template is ready for use

Posted by GitBox <gi...@apache.org>.
harikrishna-patnala commented on issue #25:
URL: https://github.com/apache/cloudstack-terraform-provider/issues/25#issuecomment-994299483


   @vladimirpetrov dependency for template in VM resource will be created only if use template's terraform resource name in VM resource config like below 
   
   resource "cloudstack_instance" "VM1" {
     name             = "VM1"
     service_offering = "Small Instance"
     **template         = cloudstack_template.Template.id**
     network_id       = cloudstack_network.N1.id
     zone             = "${var.zoneId}"
   }
   
   If we use the template uuid or name directly in the VM resource configuration then terraform won't create the dependency. Can you please try as I mentioned before. I've tried the same observed VM waits till template gets registered and download complete.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack-terraform-provider] vladimirpetrov closed issue #25: cloudstack_template does not wait until the template is ready for use

Posted by GitBox <gi...@apache.org>.
vladimirpetrov closed issue #25:
URL: https://github.com/apache/cloudstack-terraform-provider/issues/25


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org