Giter Club home page Giter Club logo

terraform-aws-ecs-scheduler's Introduction

terraform-aws-ecs-scheduler

schedule ecs tasks using eventbridge and lambda

Example

module "ecs-schedule" {
  source = "git::https://github.com/rssnyder/terraform-aws-ecs-scheduler.git"
  prefix = "myservice_"
  services = [
    {
      cluster_arn = aws_ecs_cluster.dev.id,
      service_arn = aws_ecs_service.myservice.id,
      start_cron  = "cron(0 13 ? * MON-FRI *)",
      stop_cron   = "cron(0 21 ? * MON-FRI *)"
    },
    {
      cluster_arn = aws_ecs_cluster.dev.id,
      service_arn = aws_ecs_service.myotherservice.id,
      start_cron  = "cron(0 13 ? * MON-FRI *)",
      stop_cron   = "cron(0 21 ? * MON-FRI *)"
    }
  ]
}

Inputs

Name Description Type Default Required
prefix Prefix to add to all resources string no
services ECS services and their cron schedules list(object({cluster_arn = string, service_arn = string, start_cron = string, stop_cron = string})) yes

Resources

Name Type
ecs_scheduler_lambda aws_iam_role
ecs_scheduler_lambda_logs aws_iam_role_policy_attachment
ecs_scheduler_lambda aws_iam_policy
ecs_scheduler_lambda_ecs aws_iam_role_policy_attachment
ecs_scheduler aws_lambda_function
ecs_scheduler aws_iam_role
ecs_scheduler aws_iam_policy
ecs_scheduler aws_iam_role_policy_attachment
ecs_scheduler_start aws_scheduler_schedule
ecs_scheduler_stop aws_scheduler_schedule

terraform-aws-ecs-scheduler's People

Contributors

rssnyder avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.