Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ivoronin/terraform-aws-ecs-schedule-container
Schedules container runs on ECS Fargate using cron-like syntax
https://github.com/ivoronin/terraform-aws-ecs-schedule-container
Last synced: 5 days ago
JSON representation
Schedules container runs on ECS Fargate using cron-like syntax
- Host: GitHub
- URL: https://github.com/ivoronin/terraform-aws-ecs-schedule-container
- Owner: ivoronin
- License: mit
- Created: 2023-08-25T12:15:04.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2023-08-25T13:02:12.000Z (about 1 year ago)
- Last Synced: 2024-04-17T21:12:14.780Z (7 months ago)
- Language: HCL
- Size: 3.91 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# terraform-aws-ec2-ecs-schedule-container
Schedules container runs on ECS Fargate using cron-like syntax## How it works
This module creates a periodic event in EventBridge to schedule container runs## Example
```hcl
module "backup" {
source = "ivoronin/ecs-schedule-container/aws"name_prefix = "backup"
cron = "0 * ? * * *"efs_volumes = [{
name = "data"
file_system_id = aws_efs_file_system.data.id
}]container_definition = {
name = "backup"
image = "restic/restic:latest"
essential = trueenvironment = [
{ name = "RESTIC_REPOSITORY", value = var.backup_restic_repository },
{ name = "RESTIC_PASSWORD", value = var.backup_restic_password }
]mountPoints = [{
"containerPath" : "/data",
"sourceVolume" : "data"
}]command = [
"backup",
"--exclude-caches",
"-H", "apps",
"/data"
]
}security_groups = [aws_security_group.backup.id]
subnets = [aws_subnet.app.id]
}
```