Terraform Provider

Requirements

  • Terraform >= 0.13.x

  • Go 1.18 to build the provider plugin

Install The Provider

copy and paste this code into your Terraform configuration. Then, run terraform init to initialize it.

terraform {
  required_providers {
    harvester = {
      source = "harvester/harvester"
      version = "<replace to the latest release version>"
    }
  }
}

provider "harvester" {
  # Configuration options
}

Using the provider

More details about the provider-specific configurations can be found in the docs.

Resource Timeouts

Several resource-related operations (for example, creating a new image and downloading its content from the internet) may take some time to complete.Depending on the host hardware and other factors, these operations may exceed default timeout settings and cause errors. To modify timeout values for such operations, define a timeout block in the resource.

resource "harvester_image" "opensuse154" {
  name      = "opensuse154"
  namespace = "harvester-public"

  display_name = "openSUSE-Leap-15.4.x86_64-NoCloud.qcow2"
  source_type  = "download"
  url          = "https://downloadcontent-us1.opensuse.org/repositories/Cloud:/Images:/Leap_15.4/images/openSUSE-Leap-15.4.x86_64-NoCloud.qcow2"

  timeouts {
    create = "15m"
    update = "15m"
    delete = "1m"
  }
}