Skip to content

Commit 8898c1a

Browse files
authored
helper/schema: Remove Default mention from Schema type Optional field Go documentation (#1188)
Reference: hashicorp/terraform-plugin-sdk#1185 While the intention of the Go documentation matches Terraform's expectations, other parts of the SDK explicitly validate against the schema definition it was recommending. This documentation change is safer than trying to reconcile all the potential behavior changes should this particular validation be removed and a developer attempts to set `Computed`.
1 parent 7896600 commit 8898c1a

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

helper/schema/schema.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -88,10 +88,6 @@ type Schema struct {
8888
// Optional indicates whether the practitioner can choose to not enter
8989
// a value in the configuration for this attribute. Optional cannot be used
9090
// with Required.
91-
//
92-
// If also using Default or DefaultFunc, Computed should also be enabled,
93-
// otherwise Terraform can output warning logs or "inconsistent result
94-
// after apply" errors.
9591
Optional bool
9692

9793
// Computed indicates whether the provider may return its own value for

0 commit comments

Comments
 (0)