@@ -44,12 +44,16 @@ Upgrade topics:
44
44
* [ More Robust Validation of ` helper/resource.TestCheckResourceAttrPair ` ] ( #more-robust-validation-of-helper-resource-testcheckresourceattrpair )
45
45
* [ More Robust Validation of Test Sweepers] ( #more-robust-validation-of-test-sweepers )
46
46
* [ Deprecation of ` helper/schema.ExistsFunc ` ] ( #deprecation-of-helper-schema-existsfunc )
47
+ * [ Deprecation of ` helper/schema.SchemaValidateFunc ` ] ( #deprecation-of-helper-schema-schemavalidatefunc )
47
48
* [ Removal of ` helper/mutexkv ` Package] ( #removal-of-helper-mutexkv-package )
48
49
* [ Removal of ` helper/pathorcontents ` Package] ( #removal-of-helper-pathorcontents-package )
49
50
* [ Removal of ` httpclient ` Package] ( #removal-of-httpclient-package )
50
51
* [ Removal of ` helper/hashcode ` Package] ( #removal-of-helper-hashcode-package )
51
52
* [ Removal of the ` acctest ` Package] ( #removal-of-the-acctest-package )
52
53
* [ Removal of the ` terraform.ResourceProvider ` Interface] ( #removal-of-the-terraform-resourceprovider-interface )
54
+ * [ Removal of the ` helper/schema.Provider.StopContext ` method] ( #removal-of-the-helper-schema-provider-stopcontext-method )
55
+ * [ Removal of ` helper/schema.ResourceData.SetPartial ` ] ( #removal-of-helper-schema-resourcedata-setpartial )
56
+ * [ Removal of the ` helper/schema.Provider.MetaReset ` property] ( #removal-of-the-helper-schema-provider-metareset-property )
53
57
* [ Removal of Deprecated Validation Functions] ( #removal-of-deprecated-validation-functions )
54
58
* [ Removal of ` helper/schema.Schema.PromoteSingle ` ] ( #removal-of-helper-schema-schema-promotesingle )
55
59
* [ Removal of ` helper/schema.ResourceData.UnsafeSetFieldRaw ` ] ( #removal-of-helper-schema-resourcedata-unsafesetfieldraw )
@@ -335,6 +339,18 @@ twice. Providers should check for Not Found responses in Read, and call
335
339
` helper/schema.ResourceData.SetId(“”) ` and return no errors if a Not Found
336
340
response is encountered, instead.
337
341
342
+ ## Deprecation of ` helper/schema.SchemaValidateFunc `
343
+ The ` helper/schema.SchemaValidateFunc ` type and the properties that use it,
344
+ including ` helper/schema.Schema.ValidateFunc ` , are now deprecated in favor of
345
+ ` helper/schema.SchemaValidateDiagFunc ` , which gains awareness for diagnostics,
346
+ allowing more accurate errors to be returned.
347
+
348
+ The ` helper/validation ` helper functions will have
349
+ ` helper/schema.SchemaValidateDiagFunc ` equivalents of the validation functions
350
+ added in a future release to ease the transition. Until that point, a
351
+ wrapper can be used that wraps the warnings and errors returned from
352
+ ` helper/schema.SchemaValidateFunc ` in a ` diag.Diagnostics ` .
353
+
338
354
## Removal of ` helper/mutexkv ` Package
339
355
The ` helper/mutexkv ` package provided convenience helpers for managing
340
356
concurrency, but is not specifically related to Terraform plugin development,
@@ -509,6 +525,36 @@ this will involve changing the returned type of the `Provider()` function, and
509
525
removing some type assertions; all necessary changes should be raised at
510
526
compile time.
511
527
528
+ ## Removal of the ` helper/schema.Provider.StopContext ` method
529
+
530
+ The ` helper/schema.Provider.StopContext ` method has been removed as its
531
+ implementation has been reconfigured. Use ` helper/schema.StopContext ` , passed a
532
+ ` context.Context ` originate from one of the new context-aware functions,
533
+ instead.
534
+
535
+ ## Removal of ` helper/schema.ResourceData.SetPartial `
536
+
537
+ The ` helper/schema.ResourceData.SetPartial ` method was deprecated and has been
538
+ removed. This method used to allow setting certain fields in state when
539
+ ` helper/schema.ResourceData.Partial ` was set to ` true ` , but developers weren't
540
+ clear under which circumstances that needed to happen.
541
+
542
+ This method should never need to be used. ` helper/schema.ResourceData.Partial `
543
+ should be set to ` true ` before returning an error if the error should prevent
544
+ any state from being part of the config being automatically persisted in state.
545
+ For most providers, this doesn't matter, as the refresh step will take care of
546
+ setting the state to what it should be.
547
+
548
+ See [ issue #476 ] ( https://github.com/hashicorp/terraform-plugin-sdk/issues/476 )
549
+ for more information.
550
+
551
+ ## Removal of the ` helper/schema.Provider.MetaReset ` property
552
+
553
+ The ` helper/schema.Provider.MetaReset ` property allowed providers to set a
554
+ function tha would be called during testing to reset the ` meta ` associated with
555
+ the provider. This function was never actually called, and so the property has
556
+ been removed.
557
+
512
558
## Removal of Deprecated Validation Functions
513
559
The following ` helper/validation ` functions have been renamed, and the
514
560
deprecated aliases have been removed:
@@ -566,11 +612,9 @@ their use case, and we can help find a path forward.
566
612
567
613
* ` helper/acctest.RemoteTestPrecheck `
568
614
* ` helper/acctest.SkipRemoteTestsEnvVar `
569
- * ` helper/resource.EnvLogPathMask `
570
615
* ` helper/resource.GRPCTestProvider `
571
616
* ` helper/resource.LogOutput `
572
617
* ` helper/resource.Map `
573
- * ` helper/resource.TestEnvVar `
574
618
* ` helper/resource.TestProvider `
575
619
* ` helper/schema.MultiMapReader `
576
620
* ` helper/schema.Provider.Input `
@@ -614,6 +658,7 @@ their use case, and we can help find a path forward.
614
658
* ` plugin.UIOutputServer `
615
659
* ` plugin.VersionedPlugins no longer has a "provisioner" key `
616
660
* ` resource.RunNewTest `
661
+ * ` resource.TestDisableBinaryTestingFlagEnvVar `
617
662
* ` schema.Backend `
618
663
* ` schema.FromContextBackendConfig `
619
664
* ` schema.SetProto5 `
0 commit comments