Skip to content

Commit

Permalink
helper/schema: Remove Default mention from Schema type Optional field…
Browse files Browse the repository at this point in the history
… Go documentation

Reference: #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`.
  • Loading branch information
bflad committed Apr 10, 2023
1 parent 7896600 commit 41a42d1
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions helper/schema/schema.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,6 @@ type Schema struct {
// Optional indicates whether the practitioner can choose to not enter
// a value in the configuration for this attribute. Optional cannot be used
// with Required.
//
// If also using Default or DefaultFunc, Computed should also be enabled,
// otherwise Terraform can output warning logs or "inconsistent result
// after apply" errors.
Optional bool

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

0 comments on commit 41a42d1

Please sign in to comment.