Created
January 4, 2020 00:31
-
-
Save vthub/4e2da1575fe1375d4dd0928167f08024 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
resource "aws_cloudwatch_event_target" "scheduled_task" { | |
target_id = "$scheduled-ecs-target" | |
rule = aws_cloudwatch_event_rule.scheduled_task.name | |
arn = aws_ecs_cluster.cluster.arn | |
role_arn = aws_iam_role.scheduled_task_cloudwatch.arn | |
ecs_target { | |
task_count = 1 | |
task_definition_arn = aws_ecs_task_definition.definition.arn | |
launch_type = "FARGATE" | |
network_configuration { | |
subnets = data.aws_subnet_ids.subnets.ids | |
assign_public_ip = true | |
security_groups = [aws_security_group.ecs.id] | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment