Skip to content

Error Creating Example Terraform Script #13

@jojo2569

Description

@jojo2569

Hi, newbie to Terraform. Setup per the example but am getting errors connecting to the repositoryid and serverpoolid.

Any assistance appreciated.

terraform {
  required_providers {
    ovm = {
      source = "devans10/ovm"
      version = "1.0.2"
    }
  }
}

provider "ovm" {
  user       = "XXXX"
  password   = "XXXX"
  entrypoint = "https://10.199.199.3:7002"
}

resource "ovm_vm" "vm1" {
  name          = "test_vm1"
  repositoryid  = "0004fb00000300004e57995d637d1b5a"
  serverpoolid  = "0004fb000002000039cf5993df9c68cd"
  vmdomaintype  = "XEN_HVM"
  cpucount      = 2
  cpucountlimit = 2
  memory        = 512 //MB
}

Errors when performing terrafom validate

│ Error: Incorrect attribute value type
│ 
│   on main.tf line 18, in resource "ovm_vm" "vm1":
│   18:   repositoryid  = "0004fb00000300004e57995d637d1b5a"
│ 
│ Inappropriate value for attribute "repositoryid": map of string required.
╵
╷
│ Error: Incorrect attribute value type
│ 
│   on main.tf line 19, in resource "ovm_vm" "vm1":
│   19:   serverpoolid  = "0004fb000002000039cf5993df9c68cd"
│ 
│ Inappropriate value for attribute "serverpoolid": map of string required.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions