Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error retrieving ID of zone all: No match found for all: &{Count:0 Zones:[]} #48

Closed
ccycv opened this issue Jan 16, 2023 · 1 comment · Fixed by #92
Closed

error retrieving ID of zone all: No match found for all: &{Count:0 Zones:[]} #48

ccycv opened this issue Jan 16, 2023 · 1 comment · Fixed by #92
Assignees
Milestone

Comments

@ccycv
Copy link

ccycv commented Jan 16, 2023

Is there a way to register a template in all the available zones without having to specify each zone?

I tested with value "all" and I get this error.

cloudstack_template.Test1: Creating...
╷
│ Error: Error retrieving ID of zone all: No match found for all: &{Count:0 Zones:[]}
│
│   with cloudstack_template.Test1,
│   on acs.tf line 95, in resource "cloudstack_template" "Test1":
│   95: resource "cloudstack_template" "Test1" {

And with value "-1" works... but is still get this error even the template is registered in all cloudstack zones.

cloudstack_template.Test1: Still creating... [10s elapsed]
╷
│ Error: There is more then one result for Template UUID: f16ffd67-c9a8-42fe-91b1-30624a3635ba!
│
│   with cloudstack_template.Test1,
│   on acs.tf line 96, in resource "cloudstack_template" "Test1":
│   96: resource "cloudstack_template" "Test1" {
│
╵
PS I:\terraform\cloudstack Register Templates>
@rohityadavcloud rohityadavcloud added this to the v0.5.0 milestone Sep 12, 2023
@kiranchavala
Copy link
Collaborator

I think this can be fixed by including the zoneids parameter

Need to include zoneids parameter in the terraform code (resourceCloudStackTemplate, resourceCloudStackTemplateCreate)

func resourceCloudStackTemplate() *schema.Resource {

https://cloudstack.apache.org/api/apidocs-4.19/apis/registerTemplate.html

cc @vishesh92

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants