Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support input devices #63

Merged
merged 3 commits into from
Feb 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions docs/data-sources/virtualmachine.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ data "harvester_virtualmachine" "opensuse154" {
- **disk** (List of Object) (see [below for nested schema](#nestedatt--disk))
- **efi** (Boolean)
- **hostname** (String)
- **input** (List of Object) (see [below for nested schema](#nestedatt--input))
- **machine_type** (String)
- **memory** (String)
- **message** (String)
Expand Down Expand Up @@ -92,6 +93,16 @@ Read-Only:
- **volume_name** (String)


<a id="nestedatt--input"></a>
### Nested Schema for `input`

Read-Only:

- **bus** (String)
- **name** (String)
- **type** (String)


<a id="nestedatt--network_interface"></a>
### Nested Schema for `network_interface`

Expand Down
20 changes: 20 additions & 0 deletions docs/resources/virtualmachine.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,12 @@ resource "harvester_virtualmachine" "k3os" {
bus = "virtio"
boot_order = 1
}

input {
name = "tablet"
type = "tablet"
bus = "usb"
}
}


Expand Down Expand Up @@ -225,6 +231,7 @@ resource "harvester_virtualmachine" "opensuse154" {
- **efi** (Boolean)
- **hostname** (String)
- **id** (String) The ID of this resource.
- **input** (Block List) (see [below for nested schema](#nestedblock--input))
- **machine_type** (String)
- **memory** (String)
- **namespace** (String)
Expand Down Expand Up @@ -299,6 +306,19 @@ Optional:
- **user_data_base64** (String)
- **user_data_secret_name** (String)


<a id="nestedblock--input"></a>
### Nested Schema for `input`

Required:

- **name** (String)

Optional:

- **bus** (String)
- **type** (String)

## Import

Import is supported using the following syntax:
Expand Down
6 changes: 6 additions & 0 deletions examples/resources/harvester_virtualmachine/resource.tf
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,12 @@ resource "harvester_virtualmachine" "k3os" {
bus = "virtio"
boot_order = 1
}

input {
name = "tablet"
type = "tablet"
bus = "usb"
}
}


Expand Down
157 changes: 83 additions & 74 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,45 +3,51 @@ module github.com/harvester/terraform-provider-harvester
go 1.18

replace (
github.com/dgrijalva/jwt-go => github.com/dgrijalva/jwt-go v3.2.1-0.20200107013213-dc14462fd587+incompatible
github.com/docker/distribution => github.com/docker/distribution v0.0.0-20191216044856-a8371794149d
github.com/docker/docker => github.com/docker/docker v1.4.2-0.20200203170920-46ec8731fbce
github.com/go-kit/kit => github.com/go-kit/kit v0.3.0
github.com/googleapis/gnostic => github.com/googleapis/gnostic v0.4.1
github.com/docker/distribution => github.com/docker/distribution v2.7.1+incompatible // oras dep requires a replace is set
github.com/docker/docker => github.com/docker/docker v20.10.9+incompatible // oras dep requires a replace is set
github.com/gin-gonic/gin => github.com/gin-gonic/gin v1.7.7
github.com/knative/pkg => github.com/rancher/pkg v0.0.0-20190514055449-b30ab9de040e
github.com/openshift/api => github.com/openshift/api v0.0.0-20191219222812-2987a591a72c
github.com/openshift/client-go => github.com/openshift/client-go v0.0.0-20200521150516-05eb9880269c
github.com/operator-framework/operator-lifecycle-manager => github.com/operator-framework/operator-lifecycle-manager v0.0.0-20190128024246-5eb7ae5bdb7a
github.com/rancher/rancher/pkg/apis => github.com/rancher/rancher/pkg/apis v0.0.0-20211208233239-77392a65423d
github.com/rancher/rancher/pkg/client => github.com/rancher/rancher/pkg/client v0.0.0-20211208233239-77392a65423d
github.com/rancher/rancher/pkg/apis => github.com/rancher/rancher/pkg/apis v0.0.0-20221013203903-14a66edd1e20
github.com/rancher/rancher/pkg/client => github.com/rancher/rancher/pkg/client v0.0.0-20221013203903-14a66edd1e20

helm.sh/helm/v3 => github.com/rancher/helm/v3 v3.8.0-rancher1
k8s.io/api => k8s.io/api v0.23.7
k8s.io/apiextensions-apiserver => k8s.io/apiextensions-apiserver v0.23.7
k8s.io/apimachinery => k8s.io/apimachinery v0.23.7
k8s.io/apiserver => k8s.io/apiserver v0.23.7
k8s.io/cli-runtime => k8s.io/cli-runtime v0.23.7
k8s.io/client-go => k8s.io/client-go v0.23.7
k8s.io/cloud-provider => k8s.io/cloud-provider v0.23.7
k8s.io/cluster-bootstrap => k8s.io/cluster-bootstrap v0.23.7
k8s.io/code-generator => k8s.io/code-generator v0.23.7
k8s.io/component-base => k8s.io/component-base v0.23.7
k8s.io/component-helpers => k8s.io/component-helpers v0.23.7
k8s.io/controller-manager => k8s.io/controller-manager v0.23.7
k8s.io/cri-api => k8s.io/cri-api v0.23.7
k8s.io/csi-translation-lib => k8s.io/csi-translation-lib v0.23.7
k8s.io/kube-aggregator => k8s.io/kube-aggregator v0.23.7
k8s.io/kube-controller-manager => k8s.io/kube-controller-manager v0.23.7
k8s.io/kube-proxy => k8s.io/kube-proxy v0.23.7
k8s.io/kube-scheduler => k8s.io/kube-scheduler v0.23.7
k8s.io/kubectl => k8s.io/kubectl v0.23.7
k8s.io/kubelet => k8s.io/kubelet v0.23.7
k8s.io/kubernetes => k8s.io/kubernetes v1.23.7
k8s.io/legacy-cloud-providers => k8s.io/legacy-cloud-providers v0.23.7
k8s.io/metrics => k8s.io/metrics v0.23.7
k8s.io/mount-utils => k8s.io/mount-utils v0.23.7
k8s.io/pod-security-admission => k8s.io/pod-security-admission v0.23.7
k8s.io/sample-apiserver => k8s.io/sample-apiserver v0.23.7
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc => go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.20.0
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp => go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.20.0
go.opentelemetry.io/otel => go.opentelemetry.io/otel v0.20.0
go.opentelemetry.io/otel/exporters/otlp => go.opentelemetry.io/otel/exporters/otlp v0.20.0
go.opentelemetry.io/otel/sdk => go.opentelemetry.io/otel/sdk v0.20.0
go.opentelemetry.io/otel/trace => go.opentelemetry.io/otel/trace v0.20.0
go.opentelemetry.io/proto/otlp => go.opentelemetry.io/proto/otlp v0.7.0

helm.sh/helm/v3 => github.com/rancher/helm/v3 v3.9.0-rancher1
k8s.io/api => k8s.io/api v0.24.10
k8s.io/apiextensions-apiserver => k8s.io/apiextensions-apiserver v0.24.10
k8s.io/apimachinery => k8s.io/apimachinery v0.24.10
k8s.io/apiserver => k8s.io/apiserver v0.24.10
k8s.io/cli-runtime => k8s.io/cli-runtime v0.24.10
k8s.io/client-go => k8s.io/client-go v0.24.10
k8s.io/cloud-provider => k8s.io/cloud-provider v0.24.10
k8s.io/cluster-bootstrap => k8s.io/cluster-bootstrap v0.24.10
k8s.io/code-generator => k8s.io/code-generator v0.24.10
k8s.io/component-base => k8s.io/component-base v0.24.10
k8s.io/component-helpers => k8s.io/component-helpers v0.24.10
k8s.io/controller-manager => k8s.io/controller-manager v0.24.10
k8s.io/cri-api => k8s.io/cri-api v0.24.10
k8s.io/csi-translation-lib => k8s.io/csi-translation-lib v0.24.10
k8s.io/kube-aggregator => k8s.io/kube-aggregator v0.24.10
k8s.io/kube-controller-manager => k8s.io/kube-controller-manager v0.24.10
k8s.io/kube-proxy => k8s.io/kube-proxy v0.24.10
k8s.io/kube-scheduler => k8s.io/kube-scheduler v0.24.10
k8s.io/kubectl => k8s.io/kubectl v0.24.10
k8s.io/kubelet => k8s.io/kubelet v0.24.10
k8s.io/kubernetes => k8s.io/kubernetes v1.24.10
k8s.io/legacy-cloud-providers => k8s.io/legacy-cloud-providers v0.24.10
k8s.io/metrics => k8s.io/metrics v0.24.10
k8s.io/mount-utils => k8s.io/mount-utils v0.24.10
k8s.io/pod-security-admission => k8s.io/pod-security-admission v0.24.10
k8s.io/sample-apiserver => k8s.io/sample-apiserver v0.24.10

kubevirt.io/api => github.com/kubevirt/api v0.54.0
kubevirt.io/client-go => github.com/kubevirt/client-go v0.54.0
Expand All @@ -50,21 +56,22 @@ replace (
sigs.k8s.io/structured-merge-diff => sigs.k8s.io/structured-merge-diff v0.0.0-20190302045857-e85c7b244fd2
)

replace github.com/harvester/harvester => github.com/harvester/harvester v0.0.2-0.20230209065814-98f56beae339

require (
github.com/harvester/harvester v1.1.0-rc3
github.com/harvester/harvester-network-controller v0.3.0-rc3
github.com/hashicorp/hcl/v2 v2.8.2 // indirect
github.com/harvester/harvester v1.1.1
github.com/harvester/harvester-network-controller v0.3.1
github.com/hashicorp/terraform-plugin-docs v0.4.0
github.com/hashicorp/terraform-plugin-sdk/v2 v2.6.1
github.com/k8snetworkplumbingwg/network-attachment-definition-client v0.0.0-20200331171230-d50e42f2b669
github.com/longhorn/longhorn-manager v1.3.1
github.com/mitchellh/go-homedir v1.1.0
github.com/rancher/wrangler v1.0.1-0.20220520195731-8eeded9bae2a
github.com/rancher/wrangler v1.0.1-0.20221202234327-1cafffeaa9a1
gopkg.in/yaml.v2 v2.4.0
k8s.io/api v0.24.0
k8s.io/apimachinery v0.24.0
k8s.io/api v0.25.4
k8s.io/apimachinery v0.25.4
k8s.io/client-go v12.0.0+incompatible
k8s.io/utils v0.0.0-20211116205334-6203023598ed
k8s.io/utils v0.0.0-20221011040102-427025108f67
kubevirt.io/api v0.54.0
)

Expand All @@ -79,10 +86,10 @@ require (
github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 // indirect
github.com/achanda/go-sysctl v0.0.0-20160222034550-6be7678c45d2 // indirect
github.com/agext/levenshtein v1.2.2 // indirect
github.com/apparentlymart/go-textseg/v12 v12.0.0 // indirect
github.com/apparentlymart/go-textseg v1.0.0 // indirect
github.com/apparentlymart/go-textseg/v13 v13.0.0 // indirect
github.com/armon/go-radix v1.0.0 // indirect
github.com/aws/aws-sdk-go v1.38.65 // indirect
github.com/aws/aws-sdk-go v1.44.83 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d // indirect
github.com/bgentry/speakeasy v0.1.0 // indirect
Expand All @@ -91,24 +98,24 @@ require (
github.com/cespare/xxhash/v2 v2.1.2 // indirect
github.com/containernetworking/cni v1.1.2 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/emicklei/go-restful v2.15.0+incompatible // indirect
github.com/emicklei/go-restful/v3 v3.8.0 // indirect
github.com/evanphx/json-patch v4.12.0+incompatible // indirect
github.com/fatih/color v1.13.0 // indirect
github.com/felixge/httpsnoop v1.0.1 // indirect
github.com/fsnotify/fsnotify v1.5.1 // indirect
github.com/fsnotify/fsnotify v1.5.4 // indirect
github.com/go-logr/logr v1.2.3 // indirect
github.com/go-openapi/jsonpointer v0.19.5 // indirect
github.com/go-openapi/jsonreference v0.19.6 // indirect
github.com/go-openapi/swag v0.21.1 // indirect
github.com/gobuffalo/flect v0.2.4 // indirect
github.com/gobuffalo/flect v0.2.5 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/google/go-cmp v0.5.6 // indirect
github.com/google/gnostic v0.5.7-v3refs // indirect
github.com/google/go-cmp v0.5.8 // indirect
github.com/google/gofuzz v1.2.0 // indirect
github.com/google/uuid v1.3.0 // indirect
github.com/googleapis/gax-go/v2 v2.1.1 // indirect
github.com/googleapis/gnostic v0.5.5 // indirect
github.com/gorilla/handlers v1.5.1 // indirect
github.com/hashicorp/errwrap v1.0.0 // indirect
github.com/hashicorp/go-checkpoint v0.5.0 // indirect
Expand All @@ -121,6 +128,7 @@ require (
github.com/hashicorp/go-safetemp v1.0.0 // indirect
github.com/hashicorp/go-uuid v1.0.1 // indirect
github.com/hashicorp/go-version v1.3.0 // indirect
github.com/hashicorp/hcl/v2 v2.3.0 // indirect
github.com/hashicorp/logutils v1.0.0 // indirect
github.com/hashicorp/terraform-exec v0.13.3 // indirect
github.com/hashicorp/terraform-json v0.10.0 // indirect
Expand All @@ -132,22 +140,23 @@ require (
github.com/jmespath/go-jmespath v0.4.0 // indirect
github.com/josharian/intern v1.0.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/klauspost/compress v1.14.2 // indirect
github.com/klauspost/compress v1.15.9 // indirect
github.com/kr/pretty v0.3.0 // indirect
github.com/kubernetes-csi/external-snapshotter/v2 v2.1.1 // indirect
github.com/kubernetes-csi/external-snapshotter/v2 v2.1.3 // indirect
github.com/longhorn/go-iscsi-helper v0.0.0-20220805034259-7b59e22574bb // indirect
github.com/mailru/easyjson v0.7.7 // indirect
github.com/mattn/go-colorable v0.1.12 // indirect
github.com/mattn/go-isatty v0.0.14 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect
github.com/mitchellh/cli v1.1.2 // indirect
github.com/mitchellh/copystructure v1.2.0 // indirect
github.com/mitchellh/go-testing-interface v1.0.4 // indirect
github.com/mitchellh/go-wordwrap v1.0.0 // indirect
github.com/mitchellh/mapstructure v1.4.3 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/mitchellh/reflectwalk v1.0.2 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
github.com/oklog/run v1.0.0 // indirect
github.com/onsi/gomega v1.19.0 // indirect
github.com/openshift/custom-resource-status v1.1.2 // indirect
Expand All @@ -159,44 +168,44 @@ require (
github.com/prometheus/client_model v0.2.0 // indirect
github.com/prometheus/common v0.32.1 // indirect
github.com/prometheus/procfs v0.7.3 // indirect
github.com/rancher/lasso v0.0.0-20220519004610-700f167d8324 // indirect
github.com/rancher/lasso v0.0.0-20221202205459-e7138f16489c // indirect
github.com/rancher/system-upgrade-controller/pkg/apis v0.0.0-20210727200656-10b094e30007 // indirect
github.com/rogpeppe/go-internal v1.8.0 // indirect
github.com/russross/blackfriday v1.6.0 // indirect
github.com/sirupsen/logrus v1.8.1 // indirect
github.com/sirupsen/logrus v1.9.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/ulikunitz/xz v0.5.10 // indirect
github.com/vmihailenco/msgpack v4.0.4+incompatible // indirect
github.com/zclconf/go-cty v1.8.2 // indirect
go.opencensus.io v0.23.0 // indirect
golang.org/x/crypto v0.0.0-20220331220935-ae2d96664a29 // indirect
golang.org/x/net v0.0.0-20220225172249-27dd8689420f // indirect
golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8 // indirect
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c // indirect
golang.org/x/sys v0.0.0-20220319134239-a9b59b0215f8 // indirect
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 // indirect
golang.org/x/text v0.3.7 // indirect
golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac // indirect
golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d // indirect
golang.org/x/net v0.3.1-0.20221206200815-1e63c2f08a10 // indirect
golang.org/x/oauth2 v0.0.0-20220628200809-02e64fa58f26 // indirect
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4 // indirect
golang.org/x/sys v0.3.0 // indirect
golang.org/x/term v0.3.0 // indirect
golang.org/x/text v0.5.0 // indirect
golang.org/x/time v0.0.0-20220609170525-579cf78fd858 // indirect
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect
gomodules.xyz/jsonpatch/v2 v2.2.0 // indirect
google.golang.org/api v0.62.0 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/genproto v0.0.0-20220107163113-42d7afdf6368 // indirect
google.golang.org/grpc v1.43.0 // indirect
google.golang.org/protobuf v1.27.1 // indirect
google.golang.org/genproto v0.0.0-20220720214146-176da50484ac // indirect
google.golang.org/grpc v1.48.0 // indirect
google.golang.org/protobuf v1.28.0 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/yaml.v3 v3.0.0 // indirect
k8s.io/apiextensions-apiserver v0.24.0 // indirect
k8s.io/component-base v0.23.7 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
k8s.io/apiextensions-apiserver v0.25.4 // indirect
k8s.io/component-base v0.25.4 // indirect
k8s.io/gengo v0.0.0-20211129171323-c02415ce4185 // indirect
k8s.io/klog/v2 v2.40.1 // indirect
k8s.io/kube-openapi v0.0.0-20220124234850-424119656bbf // indirect
k8s.io/klog/v2 v2.80.1 // indirect
k8s.io/kube-openapi v0.0.0-20220803162953-67bda5d908f1 // indirect
kubevirt.io/containerized-data-importer-api v1.47.0 // indirect
kubevirt.io/controller-lifecycle-operator-sdk/api v0.0.0-20220329064328-f3cc58c6ed90 // indirect
kubevirt.io/kubevirt v0.54.0 // indirect
sigs.k8s.io/cluster-api v0.4.4 // indirect
sigs.k8s.io/controller-runtime v0.11.2 // indirect
sigs.k8s.io/json v0.0.0-20211020170558-c049b76a60c6 // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.2.1 // indirect
sigs.k8s.io/cluster-api v1.2.0-beta.0 // indirect
sigs.k8s.io/controller-runtime v0.12.3 // indirect
sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2 // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect
sigs.k8s.io/yaml v1.3.0 // indirect
)
Loading