diff --git a/coralogix/resource_coralogix_dashboard.go b/coralogix/resource_coralogix_dashboard.go index 76342b16..2c289049 100644 --- a/coralogix/resource_coralogix_dashboard.go +++ b/coralogix/resource_coralogix_dashboard.go @@ -350,6 +350,7 @@ type DataTableModel struct { RowStyle types.String `tfsdk:"row_style"` Columns types.List `tfsdk:"columns"` //DataTableColumnModel OrderBy *OrderByModel `tfsdk:"order_by"` + DataModeType types.String `tfsdk:"data_mode_type"` } type DataTableQueryLogsModel struct { @@ -1246,6 +1247,15 @@ func (r *DashboardResource) Schema(_ context.Context, req resource.SchemaRequest }, Optional: true, }, + "data_mode_type": schema.StringAttribute{ + Optional: true, + Computed: true, + Validators: []validator.String{ + stringvalidator.OneOf(dashboardValidDataModeTypes...), + }, + Default: stringdefault.StaticString("unspecified"), + MarkdownDescription: fmt.Sprintf("The data mode type. Can be one of %q.", dashboardValidDataModeTypes), + }, }, Validators: []validator.Object{ objectvalidator.ExactlyOneOf( @@ -4351,6 +4361,7 @@ func expandDataTable(ctx context.Context, table *DataTableModel) (*dashboards.Wi RowStyle: dashboardRowStyleSchemaToProto[table.RowStyle.ValueString()], Columns: columns, OrderBy: expandOrderBy(table.OrderBy), + DataModeType: dashboardSchemaToProtoDataModeType[table.DataModeType.ValueString()], }, }, }, nil @@ -5849,6 +5860,7 @@ func widgetModelAttr() map[string]attr.Type { "order_direction": types.StringType, }, }, + "data_mode_type": types.StringType, }, }, "gauge": types.ObjectType{ @@ -6954,6 +6966,7 @@ func flattenLineChartQueryDefinition(ctx context.Context, definition *dashboards ScaleType: types.StringValue(dashboardProtoToSchemaScaleType[definition.GetScaleType()]), Name: wrapperspbStringToTypeString(definition.GetName()), IsVisible: wrapperspbBoolToTypeBool(definition.GetIsVisible()), + ColorScheme: wrapperspbStringToTypeString(definition.GetColorScheme()), Resolution: resolution, DataModeType: types.StringValue(dashboardProtoToSchemaDataModeType[definition.GetDataModeType()]), }, nil @@ -7418,6 +7431,7 @@ func flattenDataTable(ctx context.Context, table *dashboards.DataTable) (*Widget RowStyle: types.StringValue(dashboardRowStyleProtoToSchema[table.GetRowStyle()]), Columns: columns, OrderBy: flattenOrderBy(table.GetOrderBy()), + DataModeType: types.StringValue(dashboardProtoToSchemaDataModeType[table.GetDataModeType()]), }, }, nil } diff --git a/docs/data-sources/dashboard.md b/docs/data-sources/dashboard.md index 4be6fe62..05a1eed4 100644 --- a/docs/data-sources/dashboard.md +++ b/docs/data-sources/dashboard.md @@ -231,7 +231,7 @@ Read-Only: - `color_scheme` (String) The color scheme. Can be one of classic, severity, cold, negative, green, red, blue. - `colors_by` (String) -- `data_mode_type` (String) +- `data_mode_type` (String) The data mode type. Can be one of ["unspecified" "archive"]. - `group_name_template` (String) - `max_bars_per_chart` (Number) - `query` (Attributes) (see [below for nested schema](#nestedatt--layout--sections--rows--widgets--definition--pie_chart--query)) @@ -562,6 +562,7 @@ Read-Only: Read-Only: - `columns` (Attributes List) (see [below for nested schema](#nestedatt--layout--sections--rows--widgets--definition--pie_chart--columns)) +- `data_mode_type` (String) - `order_by` (Attributes) (see [below for nested schema](#nestedatt--layout--sections--rows--widgets--definition--pie_chart--order_by)) - `query` (Attributes) (see [below for nested schema](#nestedatt--layout--sections--rows--widgets--definition--pie_chart--query)) - `results_per_page` (Number) The number of results to display per page. diff --git a/docs/resources/dashboard.md b/docs/resources/dashboard.md index a8b30250..9fbf065f 100644 --- a/docs/resources/dashboard.md +++ b/docs/resources/dashboard.md @@ -1240,6 +1240,7 @@ Required: Optional: - `columns` (Attributes List) (see [below for nested schema](#nestedatt--layout--sections--rows--id--definition--pie_chart--columns)) +- `data_mode_type` (String) The data mode type. Can be one of ["unspecified" "archive"]. - `order_by` (Attributes) (see [below for nested schema](#nestedatt--layout--sections--rows--id--definition--pie_chart--order_by))