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 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)), }