Skip to content

Commit

Permalink
Update aws/resource_aws_ssm_patch_baseline.go
Browse files Browse the repository at this point in the history
  • Loading branch information
bflad authored Feb 12, 2021
1 parent 415c1ac commit 975c8a7
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions aws/resource_aws_ssm_patch_baseline.go
Original file line number Diff line number Diff line change
Expand Up @@ -479,12 +479,10 @@ func expandAwsSsmPatchRuleGroup(d *schema.ResourceData) *ssm.PatchRuleGroup {
EnableNonSecurity: aws.Bool(rCfg["enable_non_security"].(bool)),
}

if v, ok := rCfg["approve_after_days"].(int); ok && v != 0 {
rule.ApproveAfterDays = aws.Int64(int64(v))
}

if v, ok := rCfg["approve_until_date"].(string); ok && v != "" {
rule.ApproveUntilDate = aws.String(v)
} else if v, ok := rCfg["approve_after_days"].(int); ok {
rule.ApproveAfterDays = aws.Int64(int64(v))
}

rules = append(rules, rule)
Expand Down

0 comments on commit 975c8a7

Please sign in to comment.