Skip to content

Commit 2295649

Browse files
authored
Cleaned up conflicts / exactly_one_of / at_least_one_of documentation (GoogleCloudPlatform#9844)
* Cleaned up conflicts / exactly_one_of / at_least_one_of documentation Added documentation for at_least_one_of and clarified in examples that conflicts _excludes_ the current field, but the others _include_ it. Also added a note that these properties are not supported inside lists of nested objects. Related: yaqs/316453740125093888 * Update field-reference.md
1 parent dc046ff commit 2295649

File tree

1 file changed

+31
-8
lines changed

1 file changed

+31
-8
lines changed

docs/content/develop/field-reference.md

Lines changed: 31 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -166,27 +166,50 @@ send_empty_value: true
166166
### `conflicts`
167167
Specifies a list of fields (excluding the current field) that cannot be
168168
specified at the same time as the current field. Must be set separately on
169-
all listed fields.
169+
all listed fields. Not supported within
170+
[lists of nested objects](https://github.com/hashicorp/terraform-plugin-sdk/issues/470#issue-630928923).
170171

171172
Example:
172173

173174
```yaml
174-
conflicts:
175-
- field_one
176-
- nested_object.0.nested_field
175+
- !ruby/object:Api::Type::String
176+
name: 'fieldOne'
177+
conflicts:
178+
- field_two
179+
- nested_object.0.nested_field
177180
```
178181

179182
### `exactly_one_of`
183+
Specifies a list of fields (including the current field) of which exactly one
184+
must be set. Must be set separately on all listed fields. Not supported within
185+
[lists of nested objects](https://github.com/hashicorp/terraform-plugin-sdk/issues/470#issue-630928923).
186+
187+
Example:
188+
189+
```yaml
190+
- !ruby/object:Api::Type::String
191+
name: 'fieldOne'
192+
exactly_one_of:
193+
- field_one
194+
- field_two
195+
- nested_object.0.nested_field
196+
```
197+
198+
### `at_least_one_of`
180199
Specifies a list of fields (including the current field) that cannot be
181200
specified at the same time (but at least one of which must be set). Must be
182-
set separately on all listed fields.
201+
set separately on all listed fields. Not supported within
202+
[lists of nested objects](https://github.com/hashicorp/terraform-plugin-sdk/issues/470#issue-630928923).
183203

184204
Example:
185205

186206
```yaml
187-
exactly_one_of:
188-
- field_one
189-
- nested_object.0.nested_field
207+
- !ruby/object:Api::Type::String
208+
name: 'fieldOne'
209+
at_least_one_of:
210+
- field_one
211+
- field_two
212+
- nested_object.0.nested_field
190213
```
191214

192215
## `Enum` properties

0 commit comments

Comments
 (0)