Skip to content
This repository was archived by the owner on Jan 17, 2025. It is now read-only.

Commit 43eb9fc

Browse files
Robert Tomczakrobertomczak
authored andcommitted
Fix userSessionTimeoutAttr condition
1 parent 86a6785 commit 43eb9fc

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

redshift/resource_redshift_user.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,9 @@ func resourceRedshiftUserCreate(db *DBConnection, d *schema.ResourceData) error
224224

225225
for _, opt := range intOpts {
226226
val := d.Get(opt.hclKey).(int)
227-
if opt.hclKey != userSessionTimeoutAttr && val != 0 {
227+
if opt.hclKey == userSessionTimeoutAttr && val != 0 {
228+
createOpts = append(createOpts, fmt.Sprintf("%s %d", opt.sqlKey, val))
229+
} else if opt.hclKey != userSessionTimeoutAttr {
228230
createOpts = append(createOpts, fmt.Sprintf("%s %d", opt.sqlKey, val))
229231
}
230232
}

0 commit comments

Comments
 (0)