ccycv opened a new issue, #47:
URL: https://github.com/apache/cloudstack-terraform-provider/issues/47
I'm getting the following error for registering new template in cloudstack
via terraform.
```
cloudstack_template.Test: Creating...
╷
│ Error: Error creating template Test: json: cannot unmarshal object into Go
struct field RegisterTemplateResponse.template of type string
│
│ with cloudstack_template.Test,
│ on acs.tf line 76, in resource "cloudstack_template" "Test":
│ 76: resource "cloudstack_template" "Test" {
│
╵
```
My terraform code looks like this;
```
terraform {
required_providers {
cloudstack = {
source = "cloudstack/cloudstack"
version = "0.4.0-pre"
}
}
}
provider "cloudstack" {
alias = "env0"
api_url = "http://acs-001.xxx.host:8080/client/api"
api_key = "my apy key"
secret_key = "my secret key"
}
provider "cloudstack" {
alias = "env1"
api_url = "http://acs-002.xxx.host:8080/client/api"
api_key = "my apy key"
secret_key = "my secret key"
}
variable "template_url" {
default = "http://5.xxx.xxx.5/cloudstack/RockyLinux/RockyLinux-9.ova"
}
variable "template_name" {
default = "Test"
}
variable "password_enabled" {
default = true
}
variable "public" {
default = true
}
variable "featured" {
default = true
}
variable "hypervisor" {
default = "VMware"
}
variable "ostype" {
default = "Other Linux (64-bit)"
}
resource "cloudstack_template" "Test" {
provider = cloudstack.env0
name = var.template_name
url = var.template_url
format = "OVA"
hypervisor = var.hypervisor
os_type = var.ostype
password_enabled = var.password_enabled
is_public = var.public
is_featured = var.featured
zone = "DE-001"
}
/*resource "cloudstack_template" "Test1" {
provider = cloudstack.env1
name = var.template_name
url = var.template_url
format = "OVA"
hypervisor = var.hypervisor
os_type = var.ostype
password_enabled = var.password_enabled
is_public = var.public
is_featured = var.featured
zone = "-1"
}*/
```
I also try here with only 1 zone "DE-001", to see if works, the question for
zone, is the parameter value "-1" for zone parameter valid?
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]