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

chore(deps): bump github.com/hashicorp/terraform-plugin-framework from 0.13.0 to 0.14.0 #2

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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion go.mod
Expand Up @@ -5,7 +5,7 @@ go 1.18
require (
github.com/google/go-cmp v0.5.9
github.com/google/uuid v1.3.0
github.com/hashicorp/terraform-plugin-framework v0.13.0
github.com/hashicorp/terraform-plugin-framework v0.14.0
github.com/hashicorp/terraform-plugin-go v0.14.0
)

Expand Down
4 changes: 2 additions & 2 deletions go.sum
Expand Up @@ -9,8 +9,8 @@ github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I=
github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/hashicorp/terraform-plugin-framework v0.13.0 h1:tGnqttzZwU3FKc+HasHr2Yi5L81FcQbdc8zQhbBD9jQ=
github.com/hashicorp/terraform-plugin-framework v0.13.0/go.mod h1:wcZdk4+Uef6Ng+BiBJjGAcIPlIs5bhlEV/TA1k6Xkq8=
github.com/hashicorp/terraform-plugin-framework v0.14.0 h1:Mwj55u+Jc/QGM6fLBPCe1P+ZF3cuYs6wbCdB15lx/Dg=
github.com/hashicorp/terraform-plugin-framework v0.14.0/go.mod h1:wcZdk4+Uef6Ng+BiBJjGAcIPlIs5bhlEV/TA1k6Xkq8=
github.com/hashicorp/terraform-plugin-go v0.14.0 h1:ttnSlS8bz3ZPYbMb84DpcPhY4F5DsQtcAS7cHo8uvP4=
github.com/hashicorp/terraform-plugin-go v0.14.0/go.mod h1:2nNCBeRLaenyQEi78xrGrs9hMbulveqG/zDMQSvVJTE=
github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI=
Expand Down
5 changes: 5 additions & 0 deletions uuidtypes/uuid_type.go
Expand Up @@ -110,3 +110,8 @@ func (u UUIDType) ValueFromTerraform(_ context.Context, value tftypes.Value) (at

return UUIDFromGoogleUUID(parsedUUID), nil
}

// ValueType returns attr.Value type returned by ValueFromTerraform.
func (u UUIDType) ValueType(context.Context) attr.Value {
return UUID{}
}
34 changes: 34 additions & 0 deletions uuidtypes/uuid_type_test.go
Expand Up @@ -412,3 +412,37 @@ func TestType_ValueFromTerraform(t *testing.T) {
})
}
}

func TestUUIDType_ValueType(t *testing.T) {
t.Parallel()

tests := []struct {
name string
value uuidtypes.UUIDType
expected attr.Value
}{
{
name: "always",
value: uuidtypes.UUIDType{},
expected: uuidtypes.UUID{},
},
}
for _, testcase := range tests {
testcase := testcase

t.Run(testcase.name, func(t *testing.T) {
t.Parallel()

got := testcase.value.ValueType(context.Background())

if diff := cmp.Diff(got, testcase.expected); diff != "" {
t.Errorf(
"Type()\ngot : %v\nexpected: %v\ndiff: %v\n",
got,
testcase.expected,
diff,
)
}
})
}
}