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.

  1. terraform {
  2. required_providers {
  3. harvester = {
  4. source = "harvester/harvester"
  5. version = "<replace to the latest release version>"
  6. }
  7. }
  8. }
  9. provider "harvester" {
  10. # Configuration options
  11. }

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.

  1. resource "harvester_image" "opensuse154" {
  2. name = "opensuse154"
  3. namespace = "harvester-public"
  4. display_name = "openSUSE-Leap-15.4.x86_64-NoCloud.qcow2"
  5. source_type = "download"
  6. url = "https://downloadcontent-us1.opensuse.org/repositories/Cloud:/Images:/Leap_15.4/images/openSUSE-Leap-15.4.x86_64-NoCloud.qcow2"
  7. timeouts {
  8. create = "15m"
  9. update = "15m"
  10. delete = "1m"
  11. }
  12. }