Skip to content

Commit 18f8d55

Browse files
committed
implement resource identity schema + changelogs
1 parent 549959b commit 18f8d55

File tree

5 files changed

+32
-3
lines changed

5 files changed

+32
-3
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
kind: BUG FIXES
2+
body: 'echoprovider: Fixed bug where Terraform v1.12+ would return an error message indicating the provider doesn''t support `GetResourceIdentitySchemas`.'
3+
time: 2025-05-21T15:26:57.058404-04:00
4+
custom:
5+
Issue: "512"

echoprovider/server.go

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -406,3 +406,19 @@ func (e *echoProviderServer) CloseEphemeralResource(ctx context.Context, req *tf
406406
func (e *echoProviderServer) ValidateEphemeralResourceConfig(ctx context.Context, req *tfprotov6.ValidateEphemeralResourceConfigRequest) (*tfprotov6.ValidateEphemeralResourceConfigResponse, error) {
407407
return &tfprotov6.ValidateEphemeralResourceConfigResponse{}, nil
408408
}
409+
410+
func (e *echoProviderServer) GetResourceIdentitySchemas(context.Context, *tfprotov6.GetResourceIdentitySchemasRequest) (*tfprotov6.GetResourceIdentitySchemasResponse, error) {
411+
return &tfprotov6.GetResourceIdentitySchemasResponse{}, nil
412+
}
413+
414+
func (e *echoProviderServer) UpgradeResourceIdentity(context.Context, *tfprotov6.UpgradeResourceIdentityRequest) (*tfprotov6.UpgradeResourceIdentityResponse, error) {
415+
return &tfprotov6.UpgradeResourceIdentityResponse{
416+
Diagnostics: []*tfprotov6.Diagnostic{
417+
{
418+
Severity: tfprotov6.DiagnosticSeverityError,
419+
Summary: "Unsupported UpgradeResourceIdentity Operation",
420+
Detail: "Resource Identity is not supported by this provider.",
421+
},
422+
},
423+
}, nil
424+
}

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ require (
1515
github.com/hashicorp/logutils v1.0.0
1616
github.com/hashicorp/terraform-exec v0.23.0
1717
github.com/hashicorp/terraform-json v0.25.0
18-
github.com/hashicorp/terraform-plugin-go v0.27.0
18+
github.com/hashicorp/terraform-plugin-go v0.27.1-0.20250521190222-e4163ede0746
1919
github.com/hashicorp/terraform-plugin-log v0.9.0
2020
github.com/hashicorp/terraform-plugin-sdk/v2 v2.37.0
2121
github.com/mitchellh/go-testing-interface v1.14.1

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,8 @@ github.com/hashicorp/terraform-exec v0.23.0 h1:MUiBM1s0CNlRFsCLJuM5wXZrzA3MnPYEs
8080
github.com/hashicorp/terraform-exec v0.23.0/go.mod h1:mA+qnx1R8eePycfwKkCRk3Wy65mwInvlpAeOwmA7vlY=
8181
github.com/hashicorp/terraform-json v0.25.0 h1:rmNqc/CIfcWawGiwXmRuiXJKEiJu1ntGoxseG1hLhoQ=
8282
github.com/hashicorp/terraform-json v0.25.0/go.mod h1:sMKS8fiRDX4rVlR6EJUMudg1WcanxCMoWwTLkgZP/vc=
83-
github.com/hashicorp/terraform-plugin-go v0.27.0 h1:ujykws/fWIdsi6oTUT5Or4ukvEan4aN9lY+LOxVP8EE=
84-
github.com/hashicorp/terraform-plugin-go v0.27.0/go.mod h1:FDa2Bb3uumkTGSkTFpWSOwWJDwA7bf3vdP3ltLDTH6o=
83+
github.com/hashicorp/terraform-plugin-go v0.27.1-0.20250521190222-e4163ede0746 h1:Bzdpky/7WRDZBfxsktI97ZhUmZVxDzHGqb3jIcqvOIk=
84+
github.com/hashicorp/terraform-plugin-go v0.27.1-0.20250521190222-e4163ede0746/go.mod h1:FDa2Bb3uumkTGSkTFpWSOwWJDwA7bf3vdP3ltLDTH6o=
8585
github.com/hashicorp/terraform-plugin-log v0.9.0 h1:i7hOA+vdAItN1/7UrfBqBwvYPQ9TFvymaRGZED3FCV0=
8686
github.com/hashicorp/terraform-plugin-log v0.9.0/go.mod h1:rKL8egZQ/eXSyDqzLUuwUYLVdlYeamldAHSxjUFADow=
8787
github.com/hashicorp/terraform-plugin-sdk/v2 v2.37.0 h1:NFPMacTrY/IdcIcnUB+7hsore1ZaRWU9cnB6jFoBnIM=

internal/testing/testsdk/providerserver/providerserver_protov5.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,3 +134,11 @@ func (s Protov5ProviderServer) CloseEphemeralResource(ctx context.Context, req *
134134
func (s Protov5ProviderServer) ValidateEphemeralResourceConfig(ctx context.Context, req *tfprotov5.ValidateEphemeralResourceConfigRequest) (*tfprotov5.ValidateEphemeralResourceConfigResponse, error) {
135135
return &tfprotov5.ValidateEphemeralResourceConfigResponse{}, nil
136136
}
137+
138+
func (s Protov5ProviderServer) GetResourceIdentitySchemas(context.Context, *tfprotov5.GetResourceIdentitySchemasRequest) (*tfprotov5.GetResourceIdentitySchemasResponse, error) {
139+
return &tfprotov5.GetResourceIdentitySchemasResponse{}, nil
140+
}
141+
142+
func (s Protov5ProviderServer) UpgradeResourceIdentity(context.Context, *tfprotov5.UpgradeResourceIdentityRequest) (*tfprotov5.UpgradeResourceIdentityResponse, error) {
143+
return &tfprotov5.UpgradeResourceIdentityResponse{}, nil
144+
}

0 commit comments

Comments
 (0)