Skip to content

Commit

Permalink
Merge pull request #64 from companieshouse/cloudwatch-metrics-policy
Browse files Browse the repository at this point in the history
Add write policy action for CloudWatch metrics
  • Loading branch information
marcransome authored Nov 10, 2022
2 parents 0b19c32 + dade61b commit 0abc2a3
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion groups/frontend/iam.tf
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module "instance_profile" {
source = "[email protected]:companieshouse/terraform-modules//aws/instance_profile?ref=tags/1.0.62"
name = "tuxedo-frontend-profile"
name = "tuxedo-frontend-profile"

cw_log_group_arns = flatten([
[aws_cloudwatch_log_group.cloudwatch.arn],
Expand All @@ -12,4 +12,15 @@ module "instance_profile" {
local.ssm_kms_key_id
]
s3_buckets_write = [local.session_manager_bucket_name]

custom_statements = [
{
sid = "CloudWatchMetricsWrite"
effect = "Allow"
resources = ["*"]
actions = [
"cloudwatch:PutMetricData"
]
}
]
}

0 comments on commit 0abc2a3

Please sign in to comment.