Insert Block of Text into a File After a Ranged Search

Hello,

I've been racking my brain trying to find a good way to accomplish a task. I need to insert a block of text into a file in the format of

FirewallRuleSet proxy-users {
    FirewallRule allow to 0.0.0.0/0
}

I need to insert this block of text (which could have sed special characters) into a file under another block of text of a similar format:

FirewallRuleSet known-users {
    FirewallRule allow to 0.0.0.0/0
}

The issue is to get it to insert AFTER the closing } bracket. I've tried a few different options like sed with a ranged select; sed -i '/^FirewallRuleSet known-users.*/,/^}$/a \ $BLOB' .

But that obviously isn't valid syntax. So my question is, is there a method to accomplish this? The problem is it's also in the middle of a file and never at the same line.

Something like this?

awk -v var="$BLOB" '
/FirewallRuleSet known-users/{f=1}
f && /^\}$/{print;print var;f=0;next}
1' file

Wow... okay that worked perfectly. Thanks for the really speedy reply. I'm really not as familiar with awk as i should be. Time to go read up on it.