I'm currently working on automating the encryption of EBS volumes using AWS, following a specific guide. One limitation I encountered is that I can't have any configured rules named 'encrypted volumes.' Another limitation mentions that the setup is region-specific, but when I deploy my stack, it appears to be at the account level, preventing me from deploying it to different regions. I'm looking for advice on how I can work around this issue since I need to deploy the solution across six different regions.
2 Answers
It looks like there are ways to make your CloudFormation templates region-specific, although it can get a bit tricky since IAM resources are global. One workaround is to modify your IAM resources to include wildcard regions, allowing them to function across different areas. You can also deploy regional resources like KMS and Lambda in each region and update your IAM settings accordingly. Additionally, for enabling encryption by default, you can run a Bash script in each region that takes the region as an argument. Another option is using the AWS CLI, running: `aws ec2 enable-ebs-encryption-by-default --region region`. Good luck!
Using Terraform might be a seamless solution for deploying the same configuration across multiple regions without issues. Also, if you're working with the default KMS key instead of a custom one, you might not even need to configure it for certain regions. It’s a bit odd, but I've noticed that KMS encryption with the default key is already enabled in some areas.

Terraform would definitely streamline things, but unfortunately, they only use a GUI for their resources. Everything is pretty much point-and-click for them.