Skip to content

Commit

Permalink
set dashboard widget to optional (#1224)
Browse files Browse the repository at this point in the history
  • Loading branch information
skarimo authored Oct 6, 2021
1 parent d7bef34 commit 7f2e5ed
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 34 deletions.
2 changes: 1 addition & 1 deletion datadog/resource_datadog_dashboard.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ func resourceDatadogDashboard() *schema.Resource {
},
"widget": {
Type: schema.TypeList,
Required: true,
Optional: true,
Description: "The list of widgets to display on the dashboard.",
Elem: &schema.Resource{
Schema: getWidgetSchema(),
Expand Down
66 changes: 33 additions & 33 deletions docs/resources/dashboard.md
Original file line number Diff line number Diff line change
Expand Up @@ -686,7 +686,6 @@ resource "datadog_dashboard" "free_dashboard" {

- **layout_type** (String) The layout type of the dashboard. Valid values are `ordered`, `free`.
- **title** (String) The title of the dashboard.
- **widget** (Block List, Min: 1) The list of widgets to display on the dashboard. (see [below for nested schema](#nestedblock--widget))

### Optional

Expand All @@ -699,12 +698,45 @@ resource "datadog_dashboard" "free_dashboard" {
- **template_variable** (Block List) The list of template variables for this dashboard. (see [below for nested schema](#nestedblock--template_variable))
- **template_variable_preset** (Block List) The list of selectable template variable presets for this dashboard. (see [below for nested schema](#nestedblock--template_variable_preset))
- **url** (String) The URL of the dashboard.
- **widget** (Block List) The list of widgets to display on the dashboard. (see [below for nested schema](#nestedblock--widget))

### Read-Only

- **dashboard_lists_removed** (Set of Number) A list of dashboard lists this dashboard should be removed from. Internal only.
- **id** (String) The ID of this resource.

<a id="nestedblock--template_variable"></a>
### Nested Schema for `template_variable`

Required:

- **name** (String) The name of the variable.

Optional:

- **available_values** (List of String) The list of values that the template variable drop-down is be limited to
- **default** (String) The default value for the template variable on dashboard load.
- **prefix** (String) The tag prefix associated with the variable. Only tags with this prefix appear in the variable dropdown.


<a id="nestedblock--template_variable_preset"></a>
### Nested Schema for `template_variable_preset`

Optional:

- **name** (String) The name of the preset.
- **template_variable** (Block List) The template variable names and assumed values under the given preset (see [below for nested schema](#nestedblock--template_variable_preset--template_variable))

<a id="nestedblock--template_variable_preset--template_variable"></a>
### Nested Schema for `template_variable_preset.template_variable`

Optional:

- **name** (String) The name of the template variable
- **value** (String) The value that should be assumed by the template variable in this preset



<a id="nestedblock--widget"></a>
### Nested Schema for `widget`

Expand Down Expand Up @@ -11422,38 +11454,6 @@ Optional:

- **is_column_break** (Boolean) Whether the widget should be the first one on the second column in high density or not. Only for the new dashboard layout and only one widget in the dashboard should have this property set to `true`.



<a id="nestedblock--template_variable"></a>
### Nested Schema for `template_variable`

Required:

- **name** (String) The name of the variable.

Optional:

- **available_values** (List of String) The list of values that the template variable drop-down is be limited to
- **default** (String) The default value for the template variable on dashboard load.
- **prefix** (String) The tag prefix associated with the variable. Only tags with this prefix appear in the variable dropdown.


<a id="nestedblock--template_variable_preset"></a>
### Nested Schema for `template_variable_preset`

Optional:

- **name** (String) The name of the preset.
- **template_variable** (Block List) The template variable names and assumed values under the given preset (see [below for nested schema](#nestedblock--template_variable_preset--template_variable))

<a id="nestedblock--template_variable_preset--template_variable"></a>
### Nested Schema for `template_variable_preset.template_variable`

Optional:

- **name** (String) The name of the template variable
- **value** (String) The value that should be assumed by the template variable in this preset

## Import

Import is supported using the following syntax:
Expand Down

0 comments on commit 7f2e5ed

Please sign in to comment.