Skip to main content
Version: v1.5 (dev)

Harvester Terraform Provider

Support Matrix

Harvester VersionSupported Terraform Provider HarvesterSupported Terraformer Harvester
v1.3.0v0.6.4v1.1.1-harvester
v1.2.2v0.6.4v1.1.1-harvester
v1.2.1v0.6.4v1.1.1-harvester
v1.2.0v0.6.3v1.1.1-harvester
v1.1.2v0.6.3v1.1.1-harvester
v1.1.1v0.6.3v1.1.1-harvester
v1.1.0v0.6.3v1.1.1-harvester

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.

Github Repo: https://github.com/harvester/terraform-provider-harvester

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"
}
}