Skip to content

Commit

Permalink
Add missing default values to fix hashicorp#13545
Browse files Browse the repository at this point in the history
  • Loading branch information
lonegunmanb committed Apr 25, 2022
1 parent ca6f09f commit e72a140
Showing 1 changed file with 9 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@ func resourceDataFactoryDatasetDelimitedText() *pluginsdk.Resource {
"column_delimiter": {
Type: pluginsdk.TypeString,
Optional: true,
Default: ",",
},

// Delimited Text Specific Field
Expand All @@ -176,12 +177,14 @@ func resourceDataFactoryDatasetDelimitedText() *pluginsdk.Resource {
"quote_character": {
Type: pluginsdk.TypeString,
Optional: true,
Default: `"`,
},

// Delimited Text Specific Field
"escape_character": {
Type: pluginsdk.TypeString,
Optional: true,
Default: `\`,
},

// Delimited Text Specific Field
Expand All @@ -195,12 +198,14 @@ func resourceDataFactoryDatasetDelimitedText() *pluginsdk.Resource {
"first_row_as_header": {
Type: pluginsdk.TypeBool,
Optional: true,
Default: false,
},

// Delimited Text Specific Field
"null_value": {
Type: pluginsdk.TypeString,
Optional: true,
Default: "",
},

"parameters": {
Expand Down Expand Up @@ -362,12 +367,12 @@ func resourceDataFactoryDatasetDelimitedTextCreateUpdate(d *pluginsdk.ResourceDa
delimited_textDatasetProperties.EncodingName = v.(string)
}

if v, ok := d.GetOk("first_row_as_header"); ok {
delimited_textDatasetProperties.FirstRowAsHeader = v.(bool)
if v, ok := d.Get("first_row_as_header").(bool); ok {
delimited_textDatasetProperties.FirstRowAsHeader = v
}

if v, ok := d.GetOk("null_value"); ok {
delimited_textDatasetProperties.NullValue = v.(string)
if v, ok := d.Get("null_value").(string); ok {
delimited_textDatasetProperties.NullValue = v
}

if v, ok := d.GetOk("compression_level"); ok {
Expand Down

0 comments on commit e72a140

Please sign in to comment.