Skip to content

Commit

Permalink
set default value for configuration_item
Browse files Browse the repository at this point in the history
  • Loading branch information
Ariel Abuel (NCS) committed Sep 1, 2021
1 parent 46b9d8f commit 55a8b17
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions config/data_source_configuration_workbook.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,12 @@ func dataSourceConfigurationItemRead(ctx context.Context, d *schema.ResourceData
if col_config_item == "" {
col_config_item = "configuration_item"
}

// set default value for configuration_item
if configuration_item == "" && sheet_name != "" {
configuration_item = sheet_name
}

valid_vertical_orientation := []string{"vertical", "Vertical", "VERTICAL", "vert", "Vert", "VERT", "v", "V"}
valid_horizontal_orientation := []string{"horizontal", "Horizontal", "HORIZONTAL", "horiz", "Horiz", "HORIZ", "h", "H"}
if stringInList(orientation, valid_vertical_orientation) {
Expand Down

0 comments on commit 55a8b17

Please sign in to comment.