Skip to content

Commit 9ea96b9

Browse files
committed
Update website documentation
1 parent c517943 commit 9ea96b9

File tree

3 files changed

+6
-30
lines changed

3 files changed

+6
-30
lines changed

website/docs/plugin/framework/handling-data/attributes/set-nested.mdx

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -159,20 +159,6 @@ The [`setplanmodifier`](https://pkg.go.dev/github.com/hashicorp/terraform-plugin
159159

160160
Set the `Sensitive` field if the attribute value should always be considered [sensitive data](/terraform/language/state/sensitive-data). In Terraform, this will generally mask the value in practitioner output. This setting cannot be conditionally set and does not impact how data is stored in the state.
161161

162-
### WriteOnly
163-
164-
<Highlight>
165-
166-
Only managed resources implement this concept.
167-
168-
</Highlight>
169-
170-
Set the `WriteOnly` field to define a [write-only argument](/terraform/plugin/framework/resources/write-only-arguments).
171-
Write-only arguments can accept [ephemeral values](/terraform/language/resources/ephemeral)
172-
and are not persisted in the Terraform plan or state artifacts. Write-only arguments are supported in Terraform 1.11 and later.
173-
174-
If a nested attribute has the `WriteOnly` field set, all child attributes must also have `WriteOnly` set.
175-
176162
### Validation
177163

178164
Set the `Validators` field to define [validation](/terraform/plugin/framework/validation#attribute-validation). This validation logic is ran in addition to any validation contained within a [custom type](#custom-types).

website/docs/plugin/framework/handling-data/attributes/set.mdx

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -128,18 +128,6 @@ The [`setplanmodifier`](https://pkg.go.dev/github.com/hashicorp/terraform-plugin
128128

129129
Set the `Sensitive` field if the attribute value should always be considered [sensitive data](/terraform/language/state/sensitive-data). In Terraform, this will generally mask the value in practitioner output. This setting cannot be conditionally set and does not impact how data is stored in the state.
130130

131-
### WriteOnly
132-
133-
<Highlight>
134-
135-
Only managed resources implement this concept.
136-
137-
</Highlight>
138-
139-
Set the `WriteOnly` field to define a [write-only argument](/terraform/plugin/framework/resources/write-only-arguments).
140-
Write-only arguments can accept [ephemeral values](/terraform/language/resources/ephemeral)
141-
and are not persisted in the Terraform plan or state artifacts. Write-only arguments are supported in Terraform 1.11 and later.
142-
143131
### Validation
144132

145133
Set the `Validators` field to define [validation](/terraform/plugin/framework/validation#attribute-validation). This validation logic is ran in addition to any validation contained within a [custom type](#custom-types).

website/docs/plugin/framework/resources/write-only-arguments.mdx

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@ which should either use the value by making the appropriate change to the API or
1515

1616
The following are high level differences between `Required`/`Optional` arguments and write-only arguments:
1717

18-
- Write-only arguments can accept ephemeral and non-ephemeral values
18+
- Write-only arguments can accept ephemeral and non-ephemeral values.
19+
20+
- Write-only arguments cannot be used with set attributes, set nested attributes, and set nested blocks.
1921

2022
- Write-only argument values are only available in the configuration. The prior state, planned state, and final state values for
2123
write-only arguments should always be `null`.
@@ -25,15 +27,15 @@ write-only arguments should always be `null`.
2527

2628
- Write-only argument values cannot produce a Terraform plan difference.
2729
- This is because the prior state value for a write-only argument will always be `null` and the planned/final state value will also be `null`, therefore, it cannot produce a diff on its own.
28-
- The one exception to this case is if the write-only argument is added to `requires_replace` during Plan Modification (i.e., using the [`RequiresReplace()`](/terraform/plugin/framework/resources/plan-modification#requiresreplace) plan modifier), in that case, the write-only argument will always cause a diff/trigger a resource recreation
30+
- The one exception to this case is if the write-only argument is added to `requires_replace` during Plan Modification (i.e., using the [`RequiresReplace()`](/terraform/plugin/framework/resources/plan-modification#requiresreplace) plan modifier), in that case, the write-only argument will always cause a diff/trigger a resource recreation.
2931

3032
- Since write-only arguments can accept ephemeral values, write-only argument configuration values are not expected to be consistent between plan and apply.
3133

3234
## Schema
3335

3436
An attribute can be made write-only by setting the `WriteOnly` field to `true` in the schema. Attributes with `WriteOnly` set to `true` must also have
35-
one of `Required` or `Optional` set to `true`. If a nested attribute has `WriteOnly` set to `true`, all child attributes must also have `WriteOnly` set to `true`.
36-
`Computed` cannot be set to true for write-only arguments.
37+
one of `Required` or `Optional` set to `true`. If a list nested, map nested, or single nested attribute has `WriteOnly` set to `true`, all child attributes must also have `WriteOnly` set to `true`.
38+
A set nested block cannot have any child attributes with `WriteOnly` set to `true`. `Computed` cannot be set to true for write-only arguments.
3739

3840
**Schema example:**
3941

0 commit comments

Comments
 (0)