diff --git a/.changes/1.13.1.md b/.changes/1.13.1.md new file mode 100644 index 000000000..78a0e6d9c --- /dev/null +++ b/.changes/1.13.1.md @@ -0,0 +1,6 @@ +## 1.13.1 (May 21, 2025) + +BUG FIXES: + +* echoprovider: Fixed bug where Terraform v1.12+ would return an error message indicating the provider doesn't support `GetResourceIdentitySchemas`. ([#512](https://github.com/hashicorp/terraform-plugin-testing/issues/512)) + diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 000000000..38e8ce712 --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,16 @@ +## Related Issue + +Fixes # + +## Description + +In plain English, describe your approach to addressing the issue linked above. For example, if you made a particular design decision, let us know why you chose this path instead of another solution. + + +## Rollback Plan + +- [ ] If a change needs to be reverted, we will roll out an update to the code within 7 days. + +## Changes to Security Controls + +Are there any changes to security controls (access controls, encryption, logging) in this pull request? If so, explain. diff --git a/CHANGELOG.md b/CHANGELOG.md index 3085ae21f..9cfd7b6a4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +## 1.13.1 (May 21, 2025) + +BUG FIXES: + +* echoprovider: Fixed bug where Terraform v1.12+ would return an error message indicating the provider doesn't support `GetResourceIdentitySchemas`. ([#512](https://github.com/hashicorp/terraform-plugin-testing/issues/512)) + ## 1.13.0 (May 16, 2025) NOTES: diff --git a/echoprovider/server.go b/echoprovider/server.go index dc4d90c8b..efcdb15f1 100644 --- a/echoprovider/server.go +++ b/echoprovider/server.go @@ -406,3 +406,19 @@ func (e *echoProviderServer) CloseEphemeralResource(ctx context.Context, req *tf func (e *echoProviderServer) ValidateEphemeralResourceConfig(ctx context.Context, req *tfprotov6.ValidateEphemeralResourceConfigRequest) (*tfprotov6.ValidateEphemeralResourceConfigResponse, error) { return &tfprotov6.ValidateEphemeralResourceConfigResponse{}, nil } + +func (e *echoProviderServer) GetResourceIdentitySchemas(context.Context, *tfprotov6.GetResourceIdentitySchemasRequest) (*tfprotov6.GetResourceIdentitySchemasResponse, error) { + return &tfprotov6.GetResourceIdentitySchemasResponse{}, nil +} + +func (e *echoProviderServer) UpgradeResourceIdentity(context.Context, *tfprotov6.UpgradeResourceIdentityRequest) (*tfprotov6.UpgradeResourceIdentityResponse, error) { + return &tfprotov6.UpgradeResourceIdentityResponse{ + Diagnostics: []*tfprotov6.Diagnostic{ + { + Severity: tfprotov6.DiagnosticSeverityError, + Summary: "Unsupported UpgradeResourceIdentity Operation", + Detail: "Resource Identity is not supported by this provider.", + }, + }, + }, nil +} diff --git a/internal/testing/testsdk/providerserver/providerserver_protov5.go b/internal/testing/testsdk/providerserver/providerserver_protov5.go index 5704b288a..6f93bdffe 100644 --- a/internal/testing/testsdk/providerserver/providerserver_protov5.go +++ b/internal/testing/testsdk/providerserver/providerserver_protov5.go @@ -134,3 +134,11 @@ func (s Protov5ProviderServer) CloseEphemeralResource(ctx context.Context, req * func (s Protov5ProviderServer) ValidateEphemeralResourceConfig(ctx context.Context, req *tfprotov5.ValidateEphemeralResourceConfigRequest) (*tfprotov5.ValidateEphemeralResourceConfigResponse, error) { return &tfprotov5.ValidateEphemeralResourceConfigResponse{}, nil } + +func (s Protov5ProviderServer) GetResourceIdentitySchemas(context.Context, *tfprotov5.GetResourceIdentitySchemasRequest) (*tfprotov5.GetResourceIdentitySchemasResponse, error) { + return &tfprotov5.GetResourceIdentitySchemasResponse{}, nil +} + +func (s Protov5ProviderServer) UpgradeResourceIdentity(context.Context, *tfprotov5.UpgradeResourceIdentityRequest) (*tfprotov5.UpgradeResourceIdentityResponse, error) { + return &tfprotov5.UpgradeResourceIdentityResponse{}, nil +}