Skip to content

Commit 3bcb86f

Browse files
BBBmaurileykarson
authored andcommitted
docs: add write_only field in field_references (GoogleCloudPlatform#13347)
Co-authored-by: Riley Karson <[email protected]>
1 parent 8e78c55 commit 3bcb86f

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

docs/content/reference/field.md

+17
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,23 @@ Example:
9898
sensitive: true
9999
```
100100

101+
### `write_only`
102+
If true, the field is considered "write-only", which means that its value will
103+
be obscured in Terraform output as well as not be stored in state. This field is meant to replace `sensitive` as it doesn't store the value in state.
104+
See [Ephemerality in Resources - Use Write-only arguments](https://developer.hashicorp.com/terraform/language/resources/ephemeral/write-only)
105+
for more information.
106+
107+
Write-only fields are only supported in Terraform v1.11+. Because the provider supports earlier Terraform versions, write only fields must be paired with (mutually exclusive) `sensitive` fields covering the same functionality for compatibility with those older versions.
108+
This field cannot be used in conjuction with `immutable` or `sensitive`.
109+
110+
**Note**: Due to write-only not being read from the API, it is not possible to update the field directly unless a sidecar field is used. (e.g. `password` as a write-only field and `password_wo_version` as an immutable field meant for updating).
111+
112+
Example:
113+
114+
```yaml
115+
write_only: true
116+
```
117+
101118
### `ignore_read`
102119
If true, the provider sets the field's value in the resource state based only
103120
on the user's configuration. If false or unset, the provider sets the field's

0 commit comments

Comments
 (0)