@@ -149,6 +149,7 @@ func resourceMackerelDashboard() *schema.Resource {
149
149
"host" : {
150
150
Type : schema .TypeList ,
151
151
Optional : true ,
152
+ MaxItems : 1 ,
152
153
Elem : & schema.Resource {
153
154
Schema : map [string ]* schema.Schema {
154
155
"host_id" : {
@@ -165,6 +166,7 @@ func resourceMackerelDashboard() *schema.Resource {
165
166
"role" : {
166
167
Type : schema .TypeList ,
167
168
Optional : true ,
169
+ MaxItems : 1 ,
168
170
Elem : & schema.Resource {
169
171
Schema : map [string ]* schema.Schema {
170
172
"role_fullname" : {
@@ -186,6 +188,7 @@ func resourceMackerelDashboard() *schema.Resource {
186
188
"service" : {
187
189
Type : schema .TypeList ,
188
190
Optional : true ,
191
+ MaxItems : 1 ,
189
192
Elem : & schema.Resource {
190
193
Schema : map [string ]* schema.Schema {
191
194
"service_name" : {
@@ -202,6 +205,7 @@ func resourceMackerelDashboard() *schema.Resource {
202
205
"expression" : {
203
206
Type : schema .TypeList ,
204
207
Optional : true ,
208
+ MaxItems : 1 ,
205
209
Elem : & schema.Resource {
206
210
Schema : map [string ]* schema.Schema {
207
211
"expression" : {
@@ -214,11 +218,13 @@ func resourceMackerelDashboard() *schema.Resource {
214
218
"range" : {
215
219
Type : schema .TypeList ,
216
220
Optional : true ,
221
+ MaxItems : 1 ,
217
222
Elem : dashboardRangeResource ,
218
223
},
219
224
"layout" : {
220
225
Type : schema .TypeList ,
221
226
Required : true ,
227
+ MaxItems : 1 ,
222
228
Elem : dashboardLayoutResource ,
223
229
},
224
230
},
@@ -236,6 +242,7 @@ func resourceMackerelDashboard() *schema.Resource {
236
242
"metric" : {
237
243
Type : schema .TypeList ,
238
244
Required : true ,
245
+ MaxItems : 1 ,
239
246
Elem : dashboardMetricResource ,
240
247
},
241
248
"fraction_size" : {
@@ -249,6 +256,7 @@ func resourceMackerelDashboard() *schema.Resource {
249
256
"layout" : {
250
257
Type : schema .TypeList ,
251
258
Required : true ,
259
+ MaxItems : 1 ,
252
260
Elem : dashboardLayoutResource ,
253
261
},
254
262
},
@@ -270,6 +278,7 @@ func resourceMackerelDashboard() *schema.Resource {
270
278
"layout" : {
271
279
Type : schema .TypeList ,
272
280
Required : true ,
281
+ MaxItems : 1 ,
273
282
Elem : dashboardLayoutResource ,
274
283
},
275
284
},
@@ -291,6 +300,7 @@ func resourceMackerelDashboard() *schema.Resource {
291
300
"layout" : {
292
301
Type : schema .TypeList ,
293
302
Required : true ,
303
+ MaxItems : 1 ,
294
304
Elem : dashboardLayoutResource ,
295
305
},
296
306
},
0 commit comments