Skip to content

Commit

Permalink
patch - layout is required (#175)
Browse files Browse the repository at this point in the history
  • Loading branch information
OrNovo authored Nov 21, 2023
1 parent 039fee0 commit 0cc29b8
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions coralogix/resource_coralogix_dashboard.go
Original file line number Diff line number Diff line change
Expand Up @@ -1757,6 +1757,11 @@ func (r DashboardResource) Schema(_ context.Context, req resource.SchemaRequest,
},
},
MarkdownDescription: "Layout configuration for the dashboard's visual elements.",
Validators: []validator.Object{
objectvalidator.ExactlyOneOf(
path.MatchRelative().AtParent().AtName("content_json"),
),
},
},
"variables": schema.ListNestedAttribute{
Optional: true,
Expand Down Expand Up @@ -2451,6 +2456,9 @@ func expandDashboardTimeFrame(dashboard *dashboards.Dashboard, timeFrame *Dashbo
}

func expandDashboardLayout(ctx context.Context, layout *DashboardLayoutModel) (*dashboards.Layout, diag.Diagnostics) {
if layout == nil {
return nil, nil
}
sections, diags := expandDashboardSections(ctx, layout.Sections)
if diags.HasError() {
return nil, diags
Expand Down

0 comments on commit 0cc29b8

Please sign in to comment.