Skip to content

Fix grammatical errors in error messages regarding identity changes #1172

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

Merged
merged 1 commit into from
Jun 30, 2025
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion internal/fwserver/server_applyresourcechange_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1840,7 +1840,7 @@ func TestServerApplyResourceChange(t *testing.T) {
Diagnostics: diag.Diagnostics{
diag.NewErrorDiagnostic(
"Unexpected Identity Change",
"During the update operation, the Terraform Provider unexpectedly returned a different identity then the previously stored one.\n\n"+
"During the update operation, the Terraform Provider unexpectedly returned a different identity than the previously stored one.\n\n"+
"This is always a problem with the provider and should be reported to the provider developer.\n\n"+
"Planned Identity: tftypes.Object[\"test_id\":tftypes.String]<\"test_id\":tftypes.String<\"id-123\">>\n\n"+
"New Identity: tftypes.Object[\"test_id\":tftypes.String]<\"test_id\":tftypes.String<\"new-id-123\">>",
Expand Down
2 changes: 1 addition & 1 deletion internal/fwserver/server_planresourcechange.go
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@ func (s *Server) PlanResourceChange(ctx context.Context, req *PlanResourceChange
if !req.ResourceBehavior.MutableIdentity && !req.PriorState.Raw.IsNull() && !req.PriorIdentity.Raw.IsNull() && !req.PriorIdentity.Raw.Equal(resp.PlannedIdentity.Raw) {
resp.Diagnostics.AddError(
"Unexpected Identity Change",
"During the planning operation, the Terraform Provider unexpectedly returned a different identity then the previously stored one.\n\n"+
"During the planning operation, the Terraform Provider unexpectedly returned a different identity than the previously stored one.\n\n"+
"This is always a problem with the provider and should be reported to the provider developer.\n\n"+
fmt.Sprintf("Prior Identity: %s\n\n", req.PriorIdentity.Raw.String())+
fmt.Sprintf("Planned Identity: %s", resp.PlannedIdentity.Raw.String()),
Expand Down
4 changes: 2 additions & 2 deletions internal/fwserver/server_planresourcechange_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4075,7 +4075,7 @@ func TestServerPlanResourceChange(t *testing.T) {
Diagnostics: diag.Diagnostics{
diag.NewErrorDiagnostic(
"Unexpected Identity Change",
"During the planning operation, the Terraform Provider unexpectedly returned a different identity then the previously stored one.\n\n"+
"During the planning operation, the Terraform Provider unexpectedly returned a different identity than the previously stored one.\n\n"+
"This is always a problem with the provider and should be reported to the provider developer.\n\n"+
"Prior Identity: tftypes.Object[\"test_id\":tftypes.String]<\"test_id\":tftypes.String<\"id-123\">>\n\n"+
"Planned Identity: tftypes.Object[\"test_id\":tftypes.String]<\"test_id\":tftypes.String<\"new-id-123\">>",
Expand Down Expand Up @@ -6777,7 +6777,7 @@ func TestServerPlanResourceChange(t *testing.T) {
Diagnostics: diag.Diagnostics{
diag.NewErrorDiagnostic(
"Unexpected Identity Change",
"During the planning operation, the Terraform Provider unexpectedly returned a different identity then the previously stored one.\n\n"+
"During the planning operation, the Terraform Provider unexpectedly returned a different identity than the previously stored one.\n\n"+
"This is always a problem with the provider and should be reported to the provider developer.\n\n"+
"Prior Identity: tftypes.Object[\"test_id\":tftypes.String]<\"test_id\":tftypes.String<\"id-123\">>\n\n"+
"Planned Identity: tftypes.Object[\"test_id\":tftypes.String]<\"test_id\":tftypes.String<\"new-id-123\">>",
Expand Down
2 changes: 1 addition & 1 deletion internal/fwserver/server_readresource.go
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ func (s *Server) ReadResource(ctx context.Context, req *ReadResourceRequest, res
if !req.ResourceBehavior.MutableIdentity && !readFollowingImport && !req.CurrentIdentity.Raw.IsNull() && !req.CurrentIdentity.Raw.Equal(resp.NewIdentity.Raw) {
resp.Diagnostics.AddError(
"Unexpected Identity Change",
"During the read operation, the Terraform Provider unexpectedly returned a different identity then the previously stored one.\n\n"+
"During the read operation, the Terraform Provider unexpectedly returned a different identity than the previously stored one.\n\n"+
"This is always a problem with the provider and should be reported to the provider developer.\n\n"+
fmt.Sprintf("Current Identity: %s\n\n", req.CurrentIdentity.Raw.String())+
fmt.Sprintf("New Identity: %s", resp.NewIdentity.Raw.String()),
Expand Down
2 changes: 1 addition & 1 deletion internal/fwserver/server_readresource_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -725,7 +725,7 @@ func TestServerReadResource(t *testing.T) {
Diagnostics: diag.Diagnostics{
diag.NewErrorDiagnostic(
"Unexpected Identity Change",
"During the read operation, the Terraform Provider unexpectedly returned a different identity then the previously stored one.\n\n"+
"During the read operation, the Terraform Provider unexpectedly returned a different identity than the previously stored one.\n\n"+
"This is always a problem with the provider and should be reported to the provider developer.\n\n"+
"Current Identity: tftypes.Object[\"test_id\":tftypes.String]<\"test_id\":tftypes.String<\"id-123\">>\n\n"+
"New Identity: tftypes.Object[\"test_id\":tftypes.String]<\"test_id\":tftypes.String<\"new-id-123\">>",
Expand Down
2 changes: 1 addition & 1 deletion internal/fwserver/server_updateresource.go
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ func (s *Server) UpdateResource(ctx context.Context, req *UpdateResourceRequest,
if !req.ResourceBehavior.MutableIdentity && !req.PlannedIdentity.Raw.IsNull() && !req.PlannedIdentity.Raw.Equal(resp.NewIdentity.Raw) {
resp.Diagnostics.AddError(
"Unexpected Identity Change",
"During the update operation, the Terraform Provider unexpectedly returned a different identity then the previously stored one.\n\n"+
"During the update operation, the Terraform Provider unexpectedly returned a different identity than the previously stored one.\n\n"+
"This is always a problem with the provider and should be reported to the provider developer.\n\n"+
fmt.Sprintf("Planned Identity: %s\n\n", req.PlannedIdentity.Raw.String())+
fmt.Sprintf("New Identity: %s", resp.NewIdentity.Raw.String()),
Expand Down