Skip to content

Commit

Permalink
Merge pull request #23253 from hashicorp/b-backport-22978
Browse files Browse the repository at this point in the history
Backport of #22978 to `release/3.x`
  • Loading branch information
ewbankkit authored Feb 17, 2022
2 parents 4723139 + 25c8515 commit 297c504
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions .changelog/22978.txt
Original file line number Diff line number Diff line change
@@ -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`
```
2 changes: 1 addition & 1 deletion internal/service/waf/helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)),
}
Expand Down

0 comments on commit 297c504

Please sign in to comment.