terraform-aws-cloudtrail-cloudwatch-alarms
terraform-aws-cloudtrail-cloudwatch-alarms copied to clipboard
Support AWS Gov Cloud
Describe the Feature
The ARN partition is hardcoded to AWS. Since it is hardcoded the module does not work in AWS Gov Cloud or other partitions. This is encountered when 1) creating log policy 2) SNS topic policy and 3) SNS KMS Key policy.
Expected Behavior
I expected the partition would be automatically derived for creating policies and the module would successfully deploy in an AWS Gov Cloud environment.
Use Case
This would be valuable for deploy to other partitions (e.g., aws-us-gov, aws-cn).
Describe Ideal Solution
Use aws_partition to automatically determine partition.
For example,
data "aws_partition" "current" {}
resources = [
"arn:${data.aws_partition.current.partition}:s3:::my-bucket",
]
Alternatives Considered
Allow user to set a variable.
Additional Context
No response