From 8027582ae1d3fd224beb7c62d805cea6a05f3e3e Mon Sep 17 00:00:00 2001 From: Angie Pinilla Date: Sun, 6 Feb 2022 14:45:30 -0500 Subject: [PATCH 1/2] r/waf_rule_group: prevent panic during expand method --- internal/service/waf/helpers.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/service/waf/helpers.go b/internal/service/waf/helpers.go index f8a7721870a..e8edc2fb136 100644 --- a/internal/service/waf/helpers.go +++ b/internal/service/waf/helpers.go @@ -271,7 +271,7 @@ func FlattenActivatedRules(activatedRules []*waf.ActivatedRule) []interface{} { func ExpandActivatedRule(rule map[string]interface{}) *waf.ActivatedRule { r := &waf.ActivatedRule{ - Priority: aws.Int64(rule["priority"].(int64)), + Priority: aws.Int64(int64(rule["priority"].(int))), RuleId: aws.String(rule["rule_id"].(string)), Type: aws.String(rule["type"].(string)), } From ea86702b0f21b013684cb27f17d2ba03d255a73c Mon Sep 17 00:00:00 2001 From: Angie Pinilla Date: Sun, 6 Feb 2022 14:55:34 -0500 Subject: [PATCH 2/2] Update CHANGELOG for #22978 --- .changelog/22978.txt | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 .changelog/22978.txt diff --git a/.changelog/22978.txt b/.changelog/22978.txt new file mode 100644 index 00000000000..bbb3aea076b --- /dev/null +++ b/.changelog/22978.txt @@ -0,0 +1,7 @@ +```release-note:bug +resource/aws_waf_rule_group: Prevent panic when expanding the rule group's set of `activated_rule` +``` + +```release-note:bug +resource/aws_wafregional_rule_group: Prevent panic when expanding the rule group's set of `activated_rule` +``` \ No newline at end of file