File tree Expand file tree Collapse file tree 2 files changed +24
-0
lines changed Expand file tree Collapse file tree 2 files changed +24
-0
lines changed Original file line number Diff line number Diff line change 11data "aws_region" "current" {}
2+
3+ data "aws_partition" "current" {}
4+
25data "aws_ami" "amzn" {
36 most_recent = true
47 owners = [" amazon" ]
Original file line number Diff line number Diff line change 1+ data "aws_iam_policy_document" "ecs_events" {
2+ statement {
3+ actions = [
4+ " logs:CreateLogStream" ,
5+ " logs:PutLogEvents" ,
6+ " logs:PutLogEventsBatch" ,
7+ ]
8+
9+ resources = [" arn:aws:logs:${ data . aws_region . current . name } :${ data . aws_partition . current . partition } :log-group:/ecs/events/${ var . name } /*" ]
10+
11+ principals {
12+ identifiers = [" events.amazonaws.com" , " delivery.logs.amazonaws.com" ]
13+ type = " Service"
14+ }
15+ }
16+ }
17+
18+ resource "aws_cloudwatch_log_resource_policy" "ecs_events" {
19+ policy_document = data. aws_iam_policy_document . ecs_events [0 ]. json
20+ policy_name = " capture-ecs-events-${ var . name } "
21+ }
You can’t perform that action at this time.
0 commit comments