diff --git a/internal/terraform/context_apply_test.go b/internal/terraform/context_apply_test.go index a525ab52d..06ff0de10 100644 --- a/internal/terraform/context_apply_test.go +++ b/internal/terraform/context_apply_test.go @@ -582,7 +582,9 @@ func TestContext2Apply_providerAlias(t *testing.T) { p.ApplyResourceChangeFn = testApplyFn ctx := testContext2(t, &ContextOpts{ Providers: map[addrs.Provider]providers.Factory{ - addrs.NewDefaultProvider("aws"): testProviderFuncFixed(p), + addrs.NewDefaultProvider("aws"): func() (providers.Interface, error) { + return p, nil + }, }, }) @@ -616,7 +618,9 @@ func TestContext2Apply_providerAliasConfigure(t *testing.T) { ctx := testContext2(t, &ContextOpts{ Providers: map[addrs.Provider]providers.Factory{ - addrs.NewDefaultProvider("another"): testProviderFuncFixed(p2), + addrs.NewDefaultProvider("another"): func() (providers.Interface, error) { + return p2, nil + }, }, }) @@ -1554,7 +1558,9 @@ func TestContext2Apply_destroyModuleVarProviderConfig(t *testing.T) { ) ctx := testContext2(t, &ContextOpts{ Providers: map[addrs.Provider]providers.Factory{ - addrs.NewDefaultProvider("aws"): testProviderFuncFixed(p), + addrs.NewDefaultProvider("aws"): func() (providers.Interface, error) { + return p, nil + }, }, }) diff --git a/internal/terraform/context_input_test.go b/internal/terraform/context_input_test.go index 819856a6c..a9ec11b38 100644 --- a/internal/terraform/context_input_test.go +++ b/internal/terraform/context_input_test.go @@ -117,7 +117,9 @@ func TestContext2Input_providerMulti(t *testing.T) { ctx := testContext2(t, &ContextOpts{ Providers: map[addrs.Provider]providers.Factory{ - addrs.NewDefaultProvider("aws"): testProviderFuncFixed(p), + addrs.NewDefaultProvider("aws"): func() (providers.Interface, error) { + return p, nil + }, }, UIInput: inp, })