Sha256: dc6785aad0f11d35466cfe35ec1647d766ca26b40978ffd2fa3893a71dace7c9

Contents?: true

Size: 955 Bytes

Versions: 39

Compression:

Stored size: 955 Bytes

Contents

# https://www.terraform.io/docs/providers/aws/r/cloudwatch_event_rule.html
resource "aws_cloudwatch_event_rule" "default" {
  name                = "${var.aws_recon_base_name}-${random_id.aws_recon.hex}"
  description         = "AWS Recon scheduled task"
  schedule_expression = var.schedule_expression
}

# https://www.terraform.io/docs/providers/aws/r/cloudwatch_event_target.html
resource "aws_cloudwatch_event_target" "default" {
  target_id = aws_ecs_task_definition.aws_recon_task.id
  arn       = aws_ecs_cluster.aws_recon.arn
  rule      = aws_cloudwatch_event_rule.default.name
  role_arn  = aws_iam_role.cw_events.arn

  ecs_target {
    launch_type         = "FARGATE"
    task_definition_arn = aws_ecs_task_definition.aws_recon_task.arn
    platform_version    = "LATEST"

    network_configuration {
      assign_public_ip = true
      security_groups  = [aws_security_group.sg.id]
      subnets          = [aws_subnet.subnet.id]
    }
  }
}

Version data entries

39 entries across 39 versions & 1 rubygems

Version Path
aws_recon-0.5.33 utils/terraform/cloudwatch.tf
aws_recon-0.5.32 utils/terraform/cloudwatch.tf
aws_recon-0.5.31 utils/terraform/cloudwatch.tf
aws_recon-0.5.30 utils/terraform/cloudwatch.tf
aws_recon-0.5.29 utils/terraform/cloudwatch.tf
aws_recon-0.5.28 utils/terraform/cloudwatch.tf
aws_recon-0.5.27 utils/terraform/cloudwatch.tf
aws_recon-0.5.26 utils/terraform/cloudwatch.tf
aws_recon-0.5.25 utils/terraform/cloudwatch.tf
aws_recon-0.5.24 utils/terraform/cloudwatch.tf
aws_recon-0.5.23 utils/terraform/cloudwatch.tf
aws_recon-0.5.22 utils/terraform/cloudwatch.tf
aws_recon-0.5.21 utils/terraform/cloudwatch.tf
aws_recon-0.5.20 utils/terraform/cloudwatch.tf
aws_recon-0.5.19 utils/terraform/cloudwatch.tf
aws_recon-0.5.18 utils/terraform/cloudwatch.tf
aws_recon-0.5.17 utils/terraform/cloudwatch.tf
aws_recon-0.5.16 utils/terraform/cloudwatch.tf
aws_recon-0.5.15 utils/terraform/cloudwatch.tf
aws_recon-0.5.14 utils/terraform/cloudwatch.tf