From 975c8a7272e3e0dbdf49d7b55433d19557afbae0 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Thu, 11 Feb 2021 23:25:18 -0500 Subject: [PATCH] Update aws/resource_aws_ssm_patch_baseline.go --- aws/resource_aws_ssm_patch_baseline.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/aws/resource_aws_ssm_patch_baseline.go b/aws/resource_aws_ssm_patch_baseline.go index a6d47f44880..e7446cfd363 100644 --- a/aws/resource_aws_ssm_patch_baseline.go +++ b/aws/resource_aws_ssm_patch_baseline.go @@ -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)