Skip to content

Commit 7c7e9ab

Browse files
authored
Update to Terraform Plugin Framework v0.11.1 (#23)
* updating to tf framework v0.11 * adding FormatPathPaths func * tf framework v0.11
1 parent 68e2015 commit 7c7e9ab

File tree

5 files changed

+26
-11
lines changed

5 files changed

+26
-11
lines changed

Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.PHONY: tests
2+
tests:
3+
go test ./...

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ changes as possible but, as always, community help is appreciated!
2020
| Terraform Plugin Framework | Framework Utils |
2121
|----------------------------|-----------------|
2222
| v0.7.0-v0.9.0 | v1 |
23-
| v0.10.x | v2 |
23+
| v0.10.x-v0.11.x | v2 |
2424

2525
# Installation
2626
```shell

conv/attr.go

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,18 @@ func FormatPathPathSteps(pathSteps ...path.PathStep) string {
1717
return strings.Join(bits, ".")
1818
}
1919

20+
// FormatPathPaths takes one or more path.Path types and returns a pretty-printable string.
21+
func FormatPathPaths(paths ...path.Path) string {
22+
out := "["
23+
for i, o := range paths {
24+
if i > 0 {
25+
out = fmt.Sprintf("%s, ", out)
26+
}
27+
out = fmt.Sprintf("%s%q", out, FormatPathPathSteps(o.Steps()...))
28+
}
29+
return fmt.Sprintf("%s]", out)
30+
}
31+
2032
// FormatAttributePathSteps takes one or more path steps and joins them together with "."
2133
func FormatAttributePathSteps(pathSteps ...tftypes.AttributePathStep) string {
2234
bits := make([]string, 0)

go.mod

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
module github.com/dcarbone/terraform-plugin-framework-utils/v2
22

3-
go 1.17
3+
go 1.18
44

55
require (
6-
github.com/hashicorp/terraform-plugin-framework v0.10.0
7-
github.com/hashicorp/terraform-plugin-go v0.13.0
6+
github.com/hashicorp/terraform-plugin-framework v0.11.1
7+
github.com/hashicorp/terraform-plugin-go v0.14.0
88
)
99

1010
require (
@@ -21,5 +21,5 @@ require (
2121
golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2 // indirect
2222
golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6 // indirect
2323
google.golang.org/appengine v1.6.5 // indirect
24-
google.golang.org/protobuf v1.28.0 // indirect
24+
google.golang.org/protobuf v1.28.1 // indirect
2525
)

go.sum

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ github.com/google/go-cmp v0.5.8 h1:e6P7q2lk1O+qJJb4BtCQXlK8vWEO8V1ZeuEdJNOqZyg=
1313
github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
1414
github.com/hashicorp/go-hclog v1.2.1 h1:YQsLlGDJgwhXFpucSPyVbCBviQtjlHv3jLTlp8YmtEw=
1515
github.com/hashicorp/go-hclog v1.2.1/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M=
16-
github.com/hashicorp/terraform-plugin-framework v0.10.0 h1:LGYcnvNdVaZA1ZHe53BHLVjaaGs7HTiq6+9Js29stL4=
17-
github.com/hashicorp/terraform-plugin-framework v0.10.0/go.mod h1:CK7Opzukfu/2CPJs+HzUdfHrFlp+ZIQeSxjF0x8k464=
18-
github.com/hashicorp/terraform-plugin-go v0.13.0 h1:Zm+o91HUOcTLotaEu3X2jV/6wNi6f09gkZwGg/MDvCk=
19-
github.com/hashicorp/terraform-plugin-go v0.13.0/go.mod h1:NYGFEM9GeRdSl52txue3RcBDFt2tufaqS22iURP8Bxs=
16+
github.com/hashicorp/terraform-plugin-framework v0.11.1 h1:rq8f+TLDO4tJu+n9mMYlDrcRoIdrg0gTUvV2Jr0Ya24=
17+
github.com/hashicorp/terraform-plugin-framework v0.11.1/go.mod h1:GENReHOz6GEt8Jk3UN94vk8BdC6irEHFgN3Z9HPhPUU=
18+
github.com/hashicorp/terraform-plugin-go v0.14.0 h1:ttnSlS8bz3ZPYbMb84DpcPhY4F5DsQtcAS7cHo8uvP4=
19+
github.com/hashicorp/terraform-plugin-go v0.14.0/go.mod h1:2nNCBeRLaenyQEi78xrGrs9hMbulveqG/zDMQSvVJTE=
2020
github.com/hashicorp/terraform-plugin-log v0.7.0 h1:SDxJUyT8TwN4l5b5/VkiTIaQgY6R+Y2BQ0sRZftGKQs=
2121
github.com/hashicorp/terraform-plugin-log v0.7.0/go.mod h1:p4R1jWBXRTvL4odmEkFfDdhUjHf9zcs/BCoNHAc7IK4=
2222
github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI=
@@ -62,8 +62,8 @@ google.golang.org/appengine v1.6.5 h1:tycE03LOZYQNhDpS27tcQdAzLCVMaj7QT2SXxebnpC
6262
google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc=
6363
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
6464
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
65-
google.golang.org/protobuf v1.28.0 h1:w43yiav+6bVFTBQFZX0r7ipe9JQ1QsbMgHwbBziscLw=
66-
google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
65+
google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w=
66+
google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
6767
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
6868
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY=
6969
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=

0 commit comments

Comments
 (0)