Mass remove/add to multiple security groups cross region
Do you already manage your resources with Terraform or are you looking for something to iterate through your AWS environment to change those settings?
If you're currently not managing your environment with Terraform, you'll have to import your resources into Terraform before you can begin making changes to your environment.
Your request sounds more like something you'd use the AWS CLI or perhaps Ansible for. Terraform isn't intended to perform scripting tasks on an environment.