@@ -21,7 +21,6 @@ import (
21
21
22
22
"github.com/honeycombio/terraform-provider-honeycombio/client"
23
23
"github.com/honeycombio/terraform-provider-honeycombio/internal/helper"
24
- "github.com/honeycombio/terraform-provider-honeycombio/internal/helper/validation"
25
24
"github.com/honeycombio/terraform-provider-honeycombio/internal/models"
26
25
)
27
26
@@ -101,9 +100,6 @@ func (*flexibleBoardResource) Schema(_ context.Context, _ resource.SchemaRequest
101
100
Blocks : map [string ]schema.Block {
102
101
"panel" : schema.ListNestedBlock {
103
102
Description : "List of panels to render on the board." ,
104
- Validators : []validator.List {
105
- validation .RequireConsistentPanelPositions (),
106
- },
107
103
NestedObject : schema.NestedBlockObject {
108
104
Attributes : map [string ]schema.Attribute {
109
105
"type" : schema.StringAttribute {
@@ -125,6 +121,7 @@ func (*flexibleBoardResource) Schema(_ context.Context, _ resource.SchemaRequest
125
121
Description : "The X coordinate of the panel." ,
126
122
Validators : []validator.Int64 {
127
123
int64validator .AtLeast (0 ),
124
+ int64validator .AlsoRequires (path .MatchRelative ().AtParent ().AtName ("y_coordinate" )),
128
125
},
129
126
},
130
127
"y_coordinate" : schema.Int64Attribute {
@@ -134,6 +131,7 @@ func (*flexibleBoardResource) Schema(_ context.Context, _ resource.SchemaRequest
134
131
Description : "The Y coordinate of the panel." ,
135
132
Validators : []validator.Int64 {
136
133
int64validator .AtLeast (0 ),
134
+ int64validator .AlsoRequires (path .MatchRelative ().AtParent ().AtName ("x_coordinate" )),
137
135
},
138
136
},
139
137
"height" : schema.Int64Attribute {
@@ -152,12 +150,10 @@ func (*flexibleBoardResource) Schema(_ context.Context, _ resource.SchemaRequest
152
150
Description : "The width of the panel." ,
153
151
Validators : []validator.Int64 {
154
152
int64validator .AtLeast (1 ),
153
+ int64validator .AtMost (12 ),
155
154
},
156
155
},
157
156
},
158
- Validators : []validator.Object {
159
- validation .RequireBothCoordinates (),
160
- },
161
157
},
162
158
"slo_panel" : schema.ListNestedBlock {
163
159
Description : "A Service Level Objective(SLO) panel to be displayed on the Board." ,
0 commit comments