Skip to content

Commit

Permalink
Deprecate DiffStrategy flag (#2596)
Browse files Browse the repository at this point in the history
Turns out Go needs `Deprecated:` and not `Deprecated.` for deprecation.
This PR deprecates the defunct `WithDiffStrategy` provider option and
cleans up all uses of it.

Stacked on #2594
  • Loading branch information
VenelinMartinov authored Nov 6, 2024
1 parent 180b924 commit e38d894
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 7 deletions.
4 changes: 1 addition & 3 deletions pkg/tests/regress_aws_1423_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,7 @@ func TestRegressAws1423(t *testing.T) {
},
}

p := shimv2.NewProvider(tfProvider,
shimv2.WithDiffStrategy(shimv2.PlanState),
)
p := shimv2.NewProvider(tfProvider)

info := tfbridge.ProviderInfo{
P: p,
Expand Down
2 changes: 1 addition & 1 deletion pkg/tests/regress_aws_2352_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ func TestRegressAws2352(t *testing.T) {
},
}

p := shimv2.NewProvider(tfProvider, shimv2.WithDiffStrategy(shimv2.PlanState))
p := shimv2.NewProvider(tfProvider)

info := tfbridge.ProviderInfo{
P: p,
Expand Down
2 changes: 1 addition & 1 deletion pkg/tests/regress_hcloud_175_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ func TestRegressHCloud175(t *testing.T) {
},
}

p := shimv2.NewProvider(tfProvider, shimv2.WithDiffStrategy(shimv2.PlanState))
p := shimv2.NewProvider(tfProvider)

info := tfbridge.ProviderInfo{
P: p,
Expand Down
2 changes: 1 addition & 1 deletion pkg/tfbridge/tests/provider_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -739,7 +739,7 @@ func TestValidateConfig(t *testing.T) {
},
},
},
}, shimv2.WithDiffStrategy(shimv2.PlanState)),
}),
Name: "testprov",
ResourcePrefix: "example",
}, newTestProviderOptions{})
Expand Down
2 changes: 1 addition & 1 deletion pkg/tfshim/sdk-v2/provider_options.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ func WithPlanStateEdit(f PlanStateEditFunc) providerOption { //nolint:revive
}
}

// Deprecated.
// Deprecated: WithDiffStrategy is no longer used.
// TODO[pulumi/pulumi-terraform-bridge#2062] clean up deprecation.
func WithDiffStrategy(s DiffStrategy) providerOption { //nolint:revive
return func(opts providerOptions) (providerOptions, error) {
Expand Down

0 comments on commit e38d894

Please sign in to comment.