Skip to content

Commit 83c1e14

Browse files
Tidying up schema defintion for data, and binary_data attr's
1 parent b284181 commit 83c1e14

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

kubernetes/resource_kubernetes_config_map_v1_data.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,14 +49,16 @@ func resourceKubernetesConfigMapV1Data() *schema.Resource {
4949
},
5050
},
5151
"data": {
52-
Type: schema.TypeMap,
53-
Description: "The data we want to add to the ConfigMap.",
54-
Required: true,
52+
Type: schema.TypeMap,
53+
Description: "The data we want to add to the ConfigMap.",
54+
AtLeastOneOf: []string{"data", "binary_data"},
55+
Optional: true,
5556
},
5657
"binary_data": {
5758
Type: schema.TypeMap,
5859
Description: "BinaryData contains the binary data. Each key must consist of alphanumeric characters, '-', '_' or '.'. BinaryData can contain byte sequences that are not in the UTF-8 range. The keys stored in BinaryData must not overlap with the ones in the Data field, this is enforced during validation process. Using this field will require 1.10+ apiserver and kubelet. This field only accepts base64-encoded payloads that will be decoded/encoded before being sent/received to/from the apiserver.",
5960
Optional: true,
61+
AtLeastOneOf: []string{"data", "binary_data"},
6062
ValidateFunc: validateBase64EncodedMap,
6163
},
6264
"force": {

0 commit comments

Comments
 (0)