Skip to content

Commit c28d1e1

Browse files
Terraform Plugin SDK v2 Upgrade (#289)
* run tf-sdk-migrator v2upgrade * schema.Removed removed in v2, change to deprecated https://developer.hashicorp.com/terraform/plugin/sdkv2/guides/v2-upgrade-guide#removal-of-helper-schema-schema-removed * SetPartial was removed in v2 https://developer.hashicorp.com/terraform/plugin/sdkv2/guides/v2-upgrade-guide#removal-of-helper-schema-resourcedata-setpartial * ResourceProvider removed in v2 https://developer.hashicorp.com/terraform/plugin/sdkv2/guides/v2-upgrade-guide#removal-of-the-terraform-resourceprovider-interface * go/[email protected] was retracted go: warning: cloud.google.com/go/[email protected]: retracted by module author: due to googleapis/google-cloud-go#6857 go: to switch to the latest unretracted version, run: go get cloud.google.com/go/storage@latest * update plugin/v2 deps and manually merge require sections open bug about require sections: golang/go#56471 * publish image needs fields for computed resources * set default for file mode. ensure proper string-int conversion the lxd client api works in ints, but mode is a string for our users * use set-specific attribute test function * simplify provider tests
1 parent 0c6b4eb commit c28d1e1

33 files changed

+283
-1353
lines changed

docs/resources/publish_image.md

+10
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,16 @@ resource "lxd_publish_image" "test1" {
4747

4848
* `project` - *Optional* - Name of the project where the published image will be stored.
4949

50+
## Attribute Reference
51+
52+
The following attributes are exported:
53+
54+
* `fingerprint` - The fingerprint of the published image
55+
56+
* `architecture` - The architecture of the published image
57+
58+
* `created_at` - The creation timestamp of the published image
59+
5060
## Notes
5161

5262
* The container must be stopped

go.mod

+36-67
Original file line numberDiff line numberDiff line change
@@ -4,106 +4,75 @@ go 1.20
44

55
require (
66
github.com/dustinkirkland/golang-petname v0.0.0-20191129215211-8e5a1ed0cff0
7-
github.com/hashicorp/terraform-plugin-sdk v1.16.0
7+
github.com/hashicorp/terraform-plugin-sdk/v2 v2.26.1
88
github.com/lxc/lxd v0.0.0-20191225221339-dfbb18acc0d8
99
github.com/mitchellh/go-homedir v1.1.0
10+
1011
)
1112

1213
require (
13-
cloud.google.com/go v0.104.0 // indirect
14-
cloud.google.com/go/compute v1.10.0 // indirect
15-
cloud.google.com/go/iam v0.5.0 // indirect
16-
cloud.google.com/go/storage v1.27.0 // indirect
1714
github.com/agext/levenshtein v1.2.2 // indirect
18-
github.com/apparentlymart/go-cidr v1.0.1 // indirect
19-
github.com/apparentlymart/go-textseg v1.0.0 // indirect
20-
github.com/armon/go-radix v1.0.0 // indirect
21-
github.com/aws/aws-sdk-go v1.44.122 // indirect
22-
github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d // indirect
23-
github.com/bgentry/speakeasy v0.1.0 // indirect
24-
github.com/davecgh/go-spew v1.1.1 // indirect
25-
github.com/emirpasic/gods v1.12.0 // indirect
26-
github.com/fatih/color v1.7.0 // indirect
15+
github.com/apparentlymart/go-textseg/v13 v13.0.0 // indirect
16+
github.com/fatih/color v1.13.0 // indirect
2717
github.com/flosch/pongo2 v0.0.0-20200913210552-0d938eb266f3 // indirect
28-
github.com/go-git/gcfg v1.5.0 // indirect
29-
github.com/go-git/go-billy/v5 v5.0.0 // indirect
30-
github.com/go-git/go-git/v5 v5.1.0 // indirect
31-
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
3218
github.com/golang/protobuf v1.5.2 // indirect
3319
github.com/google/go-cmp v0.5.9 // indirect
34-
github.com/google/uuid v1.3.0 // indirect
35-
github.com/googleapis/enterprise-certificate-proxy v0.2.0 // indirect
36-
github.com/googleapis/gax-go/v2 v2.6.0 // indirect
3720
github.com/gorilla/websocket v1.4.2 // indirect
3821
github.com/hashicorp/errwrap v1.0.0 // indirect
3922
github.com/hashicorp/go-checkpoint v0.5.0 // indirect
4023
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
41-
github.com/hashicorp/go-getter v1.7.0 // indirect
42-
github.com/hashicorp/go-hclog v0.9.2 // indirect
43-
github.com/hashicorp/go-multierror v1.0.0 // indirect
44-
github.com/hashicorp/go-plugin v1.3.0 // indirect
45-
github.com/hashicorp/go-safetemp v1.0.0 // indirect
46-
github.com/hashicorp/go-uuid v1.0.1 // indirect
24+
github.com/hashicorp/go-cty v1.4.1-0.20200414143053-d3edf31b6320 // indirect
25+
github.com/hashicorp/go-hclog v1.4.0 // indirect
26+
github.com/hashicorp/go-multierror v1.1.1 // indirect
27+
github.com/hashicorp/go-plugin v1.4.8 // indirect
28+
github.com/hashicorp/go-uuid v1.0.3 // indirect
4729
github.com/hashicorp/go-version v1.6.0 // indirect
48-
github.com/hashicorp/hcl v0.0.0-20170504190234-a4b07c25de5f // indirect
49-
github.com/hashicorp/hcl/v2 v2.3.0 // indirect
30+
github.com/hashicorp/hc-install v0.5.0 // indirect
31+
github.com/hashicorp/hcl/v2 v2.16.2 // indirect
5032
github.com/hashicorp/logutils v1.0.0 // indirect
51-
github.com/hashicorp/terraform-config-inspect v0.0.0-20191115094559-17f92b0546e8 // indirect
52-
github.com/hashicorp/terraform-exec v0.10.0 // indirect
53-
github.com/hashicorp/terraform-json v0.5.0 // indirect
54-
github.com/hashicorp/terraform-plugin-test/v2 v2.1.3 // indirect
55-
github.com/hashicorp/terraform-svchost v0.0.0-20191011084731-65d371908596 // indirect
33+
github.com/hashicorp/terraform-exec v0.18.1 // indirect
34+
github.com/hashicorp/terraform-json v0.16.0 // indirect
35+
github.com/hashicorp/terraform-plugin-go v0.14.3 // indirect
36+
github.com/hashicorp/terraform-plugin-log v0.8.0 // indirect
37+
github.com/hashicorp/terraform-registry-address v0.1.0 // indirect
38+
github.com/hashicorp/terraform-svchost v0.0.0-20200729002733-f050f53b9734 // indirect
5639
github.com/hashicorp/yamux v0.0.0-20181012175058-2f1d1f20f75d // indirect
57-
github.com/imdario/mergo v0.3.9 // indirect
58-
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect
59-
github.com/jmespath/go-jmespath v0.4.0 // indirect
6040
github.com/juju/go4 v0.0.0-20160222163258-40d72ab9641a // indirect
6141
github.com/juju/persistent-cookiejar v0.0.0-20171026135701-d5e5a8405ef9 // indirect
6242
github.com/juju/schema v1.0.0 // indirect
6343
github.com/juju/webbrowser v0.0.0-20160309143629-54b8c57083b4 // indirect
6444
github.com/julienschmidt/httprouter v1.2.0 // indirect
65-
github.com/kevinburke/ssh_config v0.0.0-20190725054713-01f96b0aa0cd // indirect
66-
github.com/klauspost/compress v1.15.11 // indirect
67-
github.com/mattn/go-colorable v0.1.1 // indirect
68-
github.com/mattn/go-isatty v0.0.5 // indirect
69-
github.com/mitchellh/cli v1.1.1 // indirect
70-
github.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db // indirect
71-
github.com/mitchellh/copystructure v1.0.0 // indirect
45+
github.com/mattn/go-colorable v0.1.12 // indirect
46+
github.com/mattn/go-isatty v0.0.14 // indirect
47+
github.com/mitchellh/copystructure v1.2.0 // indirect
7248
github.com/mitchellh/go-testing-interface v1.14.1 // indirect
7349
github.com/mitchellh/go-wordwrap v1.0.0 // indirect
74-
github.com/mitchellh/mapstructure v1.1.2 // indirect
75-
github.com/mitchellh/reflectwalk v1.0.1 // indirect
50+
github.com/mitchellh/mapstructure v1.5.0 // indirect
51+
github.com/mitchellh/reflectwalk v1.0.2 // indirect
7652
github.com/oklog/run v1.0.0 // indirect
7753
github.com/pkg/errors v0.9.1 // indirect
78-
github.com/posener/complete v1.2.1 // indirect
7954
github.com/rogpeppe/fastuuid v1.2.0 // indirect
80-
github.com/sergi/go-diff v1.1.0 // indirect
81-
github.com/spf13/afero v1.2.2 // indirect
82-
github.com/ulikunitz/xz v0.5.10 // indirect
83-
github.com/vmihailenco/msgpack v4.0.1+incompatible // indirect
84-
github.com/xanzy/ssh-agent v0.2.1 // indirect
85-
github.com/zclconf/go-cty v1.2.1 // indirect
86-
github.com/zclconf/go-cty-yaml v1.0.1 // indirect
87-
go.opencensus.io v0.23.0 // indirect
88-
golang.org/x/crypto v0.0.0-20220314234659-1baeb1ce4c0b // indirect
89-
golang.org/x/net v0.7.0 // indirect
90-
golang.org/x/oauth2 v0.1.0 // indirect
91-
golang.org/x/sys v0.5.0 // indirect
92-
golang.org/x/term v0.5.0 // indirect
93-
golang.org/x/text v0.7.0 // indirect
94-
golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect
95-
google.golang.org/api v0.100.0 // indirect
55+
github.com/stretchr/testify v1.8.1 // indirect
56+
github.com/vmihailenco/msgpack v4.0.4+incompatible // indirect
57+
github.com/vmihailenco/msgpack/v4 v4.3.12 // indirect
58+
github.com/vmihailenco/tagparser v0.1.1 // indirect
59+
github.com/zclconf/go-cty v1.13.1 // indirect
60+
golang.org/x/crypto v0.7.0 // indirect
61+
golang.org/x/mod v0.8.0 // indirect
62+
golang.org/x/net v0.8.0 // indirect
63+
golang.org/x/sys v0.6.0 // indirect
64+
golang.org/x/term v0.6.0 // indirect
65+
golang.org/x/text v0.8.0 // indirect
9666
google.golang.org/appengine v1.6.7 // indirect
97-
google.golang.org/genproto v0.0.0-20221025140454-527a21cfbd71 // indirect
98-
google.golang.org/grpc v1.50.1 // indirect
99-
google.golang.org/protobuf v1.28.1 // indirect
67+
google.golang.org/genproto v0.0.0-20230320184635-7606e756e683 // indirect
68+
google.golang.org/grpc v1.53.0 // indirect
69+
google.golang.org/protobuf v1.29.1 // indirect
10070
gopkg.in/errgo.v1 v1.0.1 // indirect
10171
gopkg.in/httprequest.v1 v1.2.0 // indirect
10272
gopkg.in/juju/environschema.v1 v1.0.0 // indirect
10373
gopkg.in/macaroon-bakery.v2 v2.2.0 // indirect
10474
gopkg.in/macaroon.v2 v2.1.0 // indirect
10575
gopkg.in/retry.v1 v1.0.3 // indirect
10676
gopkg.in/robfig/cron.v2 v2.0.0-20150107220207-be2e0b0deed5 // indirect
107-
gopkg.in/warnings.v0 v0.1.2 // indirect
10877
gopkg.in/yaml.v2 v2.3.0 // indirect
10978
)

0 commit comments

Comments
 (0)