Skip to content

Commit

Permalink
Merge pull request #139 from mackerelio-labs/max-items-dashboard
Browse files Browse the repository at this point in the history
add MaxItems for list in dashboard schema
  • Loading branch information
Arthur1 committed Feb 17, 2023
2 parents 9426cd0 + 47514e3 commit 593ee7f
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions mackerel/resource_mackerel_dashboard.go
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ func resourceMackerelDashboard() *schema.Resource {
"host": {
Type: schema.TypeList,
Optional: true,
MaxItems: 1,
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"host_id": {
Expand All @@ -165,6 +166,7 @@ func resourceMackerelDashboard() *schema.Resource {
"role": {
Type: schema.TypeList,
Optional: true,
MaxItems: 1,
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"role_fullname": {
Expand All @@ -186,6 +188,7 @@ func resourceMackerelDashboard() *schema.Resource {
"service": {
Type: schema.TypeList,
Optional: true,
MaxItems: 1,
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"service_name": {
Expand All @@ -202,6 +205,7 @@ func resourceMackerelDashboard() *schema.Resource {
"expression": {
Type: schema.TypeList,
Optional: true,
MaxItems: 1,
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"expression": {
Expand All @@ -214,11 +218,13 @@ func resourceMackerelDashboard() *schema.Resource {
"range": {
Type: schema.TypeList,
Optional: true,
MaxItems: 1,
Elem: dashboardRangeResource,
},
"layout": {
Type: schema.TypeList,
Required: true,
MaxItems: 1,
Elem: dashboardLayoutResource,
},
},
Expand All @@ -236,6 +242,7 @@ func resourceMackerelDashboard() *schema.Resource {
"metric": {
Type: schema.TypeList,
Required: true,
MaxItems: 1,
Elem: dashboardMetricResource,
},
"fraction_size": {
Expand All @@ -249,6 +256,7 @@ func resourceMackerelDashboard() *schema.Resource {
"layout": {
Type: schema.TypeList,
Required: true,
MaxItems: 1,
Elem: dashboardLayoutResource,
},
},
Expand All @@ -270,6 +278,7 @@ func resourceMackerelDashboard() *schema.Resource {
"layout": {
Type: schema.TypeList,
Required: true,
MaxItems: 1,
Elem: dashboardLayoutResource,
},
},
Expand All @@ -291,6 +300,7 @@ func resourceMackerelDashboard() *schema.Resource {
"layout": {
Type: schema.TypeList,
Required: true,
MaxItems: 1,
Elem: dashboardLayoutResource,
},
},
Expand Down

0 comments on commit 593ee7f

Please sign in to comment.