Skip to content

Commit

Permalink
Rewrite plugin from tfsdk to terraform-plugin-framework
Browse files Browse the repository at this point in the history
* Upgrade go-multipass dependency to get better error messages
* Rename CPU to CPUS in LaunchReq parameters
* Use string as parameter to CPUS instead of int
* Convert exec.Command to exec without shell
* Add stderr text to error message for Launch
  • Loading branch information
larstobi committed Jul 18, 2022
1 parent 5390a6f commit aa2c8a3
Show file tree
Hide file tree
Showing 7 changed files with 221 additions and 169 deletions.
4 changes: 0 additions & 4 deletions docs/resources/instance.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,4 @@ Multipass instance resource.
- `image` (String) Optional image to launch. If omitted, then the default Ubuntu LTS will be used. <remote> can be either ‘release’ or ‘daily‘. If <remote> is omitted, ‘release’ will be used. <image> can be a partial image hash or an Ubuntu release version, codename or alias. <url> is a custom image URL that is in http://, https://, or file:// format.
- `memory` (String) Amount of memory to allocate. Positive integers, in bytes, or with K, M, G suffix. Minimum: 128M, default: 1G.

### Read-Only

- `id` (String) The ID of this resource.


42 changes: 14 additions & 28 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,47 +3,33 @@ module terraform-provider-multipass
go 1.18

require (
github.com/hashicorp/terraform-plugin-log v0.4.1
github.com/hashicorp/terraform-plugin-sdk/v2 v2.17.0
github.com/larstobi/go-multipass v1.0.7
github.com/hashicorp/terraform-plugin-framework v0.9.0
github.com/hashicorp/terraform-plugin-go v0.11.0
github.com/hashicorp/terraform-plugin-log v0.5.0
github.com/larstobi/go-multipass v1.0.8
)

require (
github.com/agext/levenshtein v1.2.2 // indirect
github.com/apparentlymart/go-textseg/v13 v13.0.0 // indirect
github.com/fatih/color v1.13.0 // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/google/go-cmp v0.5.8 // indirect
github.com/hashicorp/errwrap v1.0.0 // indirect
github.com/hashicorp/go-cty v1.4.1-0.20200414143053-d3edf31b6320 // indirect
github.com/hashicorp/go-hclog v1.2.1 // indirect
github.com/hashicorp/go-multierror v1.1.1 // indirect
github.com/hashicorp/go-plugin v1.4.4 // indirect
github.com/hashicorp/go-uuid v1.0.3 // indirect
github.com/hashicorp/go-version v1.5.0 // indirect
github.com/hashicorp/hcl/v2 v2.12.0 // indirect
github.com/hashicorp/logutils v1.0.0 // indirect
github.com/hashicorp/terraform-plugin-go v0.9.1 // indirect
github.com/hashicorp/terraform-registry-address v0.0.0-20210412075316-9b2996cce896 // indirect
github.com/hashicorp/terraform-registry-address v0.0.0-20220623143253-7d51757b572c // indirect
github.com/hashicorp/terraform-svchost v0.0.0-20200729002733-f050f53b9734 // indirect
github.com/hashicorp/yamux v0.0.0-20181012175058-2f1d1f20f75d // indirect
github.com/hashicorp/yamux v0.0.0-20211028200310-0bc27b27de87 // indirect
github.com/mattn/go-colorable v0.1.12 // indirect
github.com/mattn/go-isatty v0.0.14 // indirect
github.com/mitchellh/copystructure v1.2.0 // indirect
github.com/mitchellh/go-testing-interface v1.14.1 // indirect
github.com/mitchellh/go-wordwrap v1.0.0 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/mitchellh/reflectwalk v1.0.2 // indirect
github.com/oklog/run v1.0.0 // indirect
github.com/vmihailenco/msgpack v4.0.4+incompatible // indirect
github.com/oklog/run v1.1.0 // indirect
github.com/vmihailenco/msgpack/v4 v4.3.12 // indirect
github.com/vmihailenco/tagparser v0.1.1 // indirect
github.com/zclconf/go-cty v1.10.0 // indirect
golang.org/x/net v0.0.0-20210326060303-6b1517762897 // indirect
golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6 // indirect
golang.org/x/text v0.3.5 // indirect
google.golang.org/appengine v1.6.6 // indirect
google.golang.org/genproto v0.0.0-20200711021454-869866162049 // indirect
google.golang.org/grpc v1.46.0 // indirect
github.com/vmihailenco/tagparser v0.1.2 // indirect
golang.org/x/net v0.0.0-20220708220712-1185a9018129 // indirect
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8 // indirect
golang.org/x/text v0.3.7 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/genproto v0.0.0-20220715211116-798f69b842b9 // indirect
google.golang.org/grpc v1.48.0 // indirect
google.golang.org/protobuf v1.28.0 // indirect
)
Loading

0 comments on commit aa2c8a3

Please sign in to comment.