Skip to content

Commit

Permalink
fix: if the value is NULL(just in case)
Browse files Browse the repository at this point in the history
  • Loading branch information
rohitaro committed Mar 31, 2023
1 parent f90948b commit 6c79d7c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion mysql/resource_rds_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ func ReadRDSConfig(ctx context.Context, d *schema.ResourceData, meta interface{}
}
}

if len(results["binlog retention hours"]) == 0 {
if len(results["binlog retention hours"]) == 0 || results["binlog retention hours"] == "NULL" {
results["binlog retention hours"] = "0"
}

Expand Down
2 changes: 1 addition & 1 deletion mysql/resource_rds_config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ func testAccRDSCheck_full(rn string, binlogUpdated, targetDelayUpdated int) reso
}
}

if len(results["binlog retention hours"]) == 0 {
if len(results["binlog retention hours"]) == 0 || results["binlog retention hours"] == "NULL" {
results["binlog retention hours"] = "0"
}

Expand Down

0 comments on commit 6c79d7c

Please sign in to comment.