Skip to content

Commit da1433e

Browse files
committed
Update various comments for wording
1 parent f2c04b2 commit da1433e

18 files changed

+61
-34
lines changed

internal/fwschema/attribute.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,8 @@ type Attribute interface {
6868
// IsWriteOnly should return true if the attribute configuration value is
6969
// write-only. This is named differently than WriteOnly to prevent a
7070
// conflict with the tfsdk.Attribute field name.
71+
//
72+
// Write-only attributes are a managed-resource schema concept only.
7173
IsWriteOnly() bool
7274
}
7375

resource/schema/bool_attribute.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,9 +153,10 @@ type BoolAttribute struct {
153153
// should be avoided and a plan modifier should be used instead.
154154
Default defaults.Bool
155155

156-
// WriteOnly indicates that the practitioner can choose a value for this
157-
// attribute, but Terraform will not store this attribute in state.
156+
// WriteOnly indicates that Terraform will not store this attribute value
157+
// in the plan or state artifacts.
158158
// If WriteOnly is true, either Optional or Required must also be true.
159+
// WriteOnly cannot be set with Computed.
159160
//
160161
// This functionality is only supported in Terraform 1.11 and later.
161162
// Practitioners that choose a value for this attribute with older

resource/schema/dynamic_attribute.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,9 +154,10 @@ type DynamicAttribute struct {
154154
// should be avoided and a plan modifier should be used instead.
155155
Default defaults.Dynamic
156156

157-
// WriteOnly indicates that the practitioner can choose a value for this
158-
// attribute, but Terraform will not store this attribute in state.
157+
// WriteOnly indicates that Terraform will not store this attribute value
158+
// in the plan or state artifacts.
159159
// If WriteOnly is true, either Optional or Required must also be true.
160+
// WriteOnly cannot be set with Computed.
160161
//
161162
// This functionality is only supported in Terraform 1.11 and later.
162163
// Practitioners that choose a value for this attribute with older

resource/schema/float32_attribute.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,9 +156,10 @@ type Float32Attribute struct {
156156
// should be avoided and a plan modifier should be used instead.
157157
Default defaults.Float32
158158

159-
// WriteOnly indicates that the practitioner can choose a value for this
160-
// attribute, but Terraform will not store this attribute in state.
159+
// WriteOnly indicates that Terraform will not store this attribute value
160+
// in the plan or state artifacts.
161161
// If WriteOnly is true, either Optional or Required must also be true.
162+
// WriteOnly cannot be set with Computed.
162163
//
163164
// This functionality is only supported in Terraform 1.11 and later.
164165
// Practitioners that choose a value for this attribute with older

resource/schema/float64_attribute.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,9 +156,10 @@ type Float64Attribute struct {
156156
// should be avoided and a plan modifier should be used instead.
157157
Default defaults.Float64
158158

159-
// WriteOnly indicates that the practitioner can choose a value for this
160-
// attribute, but Terraform will not store this attribute in state.
159+
// WriteOnly indicates that Terraform will not store this attribute value
160+
// in the plan or state artifacts.
161161
// If WriteOnly is true, either Optional or Required must also be true.
162+
// WriteOnly cannot be set with Computed.
162163
//
163164
// This functionality is only supported in Terraform 1.11 and later.
164165
// Practitioners that choose a value for this attribute with older

resource/schema/int32_attribute.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,9 +156,10 @@ type Int32Attribute struct {
156156
// should be avoided and a plan modifier should be used instead.
157157
Default defaults.Int32
158158

159-
// WriteOnly indicates that the practitioner can choose a value for this
160-
// attribute, but Terraform will not store this attribute in state.
159+
// WriteOnly indicates that Terraform will not store this attribute value
160+
// in the plan or state artifacts.
161161
// If WriteOnly is true, either Optional or Required must also be true.
162+
// WriteOnly cannot be set with Computed.
162163
//
163164
// This functionality is only supported in Terraform 1.11 and later.
164165
// Practitioners that choose a value for this attribute with older

resource/schema/int64_attribute.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,9 +156,10 @@ type Int64Attribute struct {
156156
// should be avoided and a plan modifier should be used instead.
157157
Default defaults.Int64
158158

159-
// WriteOnly indicates that the practitioner can choose a value for this
160-
// attribute, but Terraform will not store this attribute in state.
159+
// WriteOnly indicates that Terraform will not store this attribute value
160+
// in the plan or state artifacts.
161161
// If WriteOnly is true, either Optional or Required must also be true.
162+
// WriteOnly cannot be set with Computed.
162163
//
163164
// This functionality is only supported in Terraform 1.11 and later.
164165
// Practitioners that choose a value for this attribute with older

resource/schema/list_attribute.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,9 +169,10 @@ type ListAttribute struct {
169169
// should be avoided and a plan modifier should be used instead.
170170
Default defaults.List
171171

172-
// WriteOnly indicates that the practitioner can choose a value for this
173-
// attribute, but Terraform will not store this attribute in state.
172+
// WriteOnly indicates that Terraform will not store this attribute value
173+
// in the plan or state artifacts.
174174
// If WriteOnly is true, either Optional or Required must also be true.
175+
// WriteOnly cannot be set with Computed.
175176
//
176177
// This functionality is only supported in Terraform 1.11 and later.
177178
// Practitioners that choose a value for this attribute with older

resource/schema/list_nested_attribute.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,9 +179,13 @@ type ListNestedAttribute struct {
179179
// should be avoided and a plan modifier should be used instead.
180180
Default defaults.List
181181

182-
// WriteOnly indicates that the practitioner can choose a value for this
183-
// attribute, but Terraform will not store this attribute in state.
182+
// WriteOnly indicates that Terraform will not store this attribute value
183+
// in the plan or state artifacts.
184184
// If WriteOnly is true, either Optional or Required must also be true.
185+
// WriteOnly cannot be set with Computed.
186+
//
187+
// If WriteOnly is true for a nested attribute, all of its child attributes
188+
// must also set WriteOnly to true and no child attribute can be Computed.
185189
//
186190
// This functionality is only supported in Terraform 1.11 and later.
187191
// Practitioners that choose a value for this attribute with older

resource/schema/map_attribute.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,9 +172,10 @@ type MapAttribute struct {
172172
// should be avoided and a plan modifier should be used instead.
173173
Default defaults.Map
174174

175-
// WriteOnly indicates that the practitioner can choose a value for this
176-
// attribute, but Terraform will not store this attribute in state.
175+
// WriteOnly indicates that Terraform will not store this attribute value
176+
// in the plan or state artifacts.
177177
// If WriteOnly is true, either Optional or Required must also be true.
178+
// WriteOnly cannot be set with Computed.
178179
//
179180
// This functionality is only supported in Terraform 1.11 and later.
180181
// Practitioners that choose a value for this attribute with older

0 commit comments

Comments
 (0)