This Terraform module deploys an AWS ECS Fargate scheduled task service.
Check versions for this module on:
- Github Releases: https://github.com/cn-terraform/terraform-aws-ecs-fargate-scheduled-task/releases
- Terraform Module Registry: https://registry.terraform.io/modules/cn-terraform/ecs-fargate-scheduled-task/aws
The Networking module:
- Github Releases: https://github.com/cn-terraform/terraform-aws-networking/releases
- Terraform Module Registry: https://registry.terraform.io/modules/cn-terraform/networking/aws
The ECS Cluster module:
- Github Releases: https://github.com/cn-terraform/terraform-aws-ecs-cluster/releases
- Terraform Module Registry: https://registry.terraform.io/modules/cn-terraform/ecs-cluster/aws
The ECS Task Definition module:
- Github Releases: https://github.com/cn-terraform/terraform-aws-ecs-fargate-task-definition/releases
- Terraform Module Registry: https://registry.terraform.io/modules/cn-terraform/ecs-fargate-task-definition/aws
Pleas run this command right after cloning the repository.
pre-commit install
For that you may need to install the following tools:
In order to run all checks at any point run the following command:
pre-commit run --all-files
Name | Version |
---|---|
terraform | >= 0.13 |
aws | >= 4 |
local | >= 2 |
Name | Version |
---|---|
aws | 5.41.0 |
No modules.
Name | Description | Type | Default | Required |
---|---|---|---|---|
ecs_cluster_arn | The ECS Cluster where the scheduled task will run. | string |
n/a | yes |
ecs_execution_task_role_arn | (Required) The task definition execution role. The Amazon Resource Name (ARN) of the IAM role to be used for this target when the rule is triggered. | string |
n/a | yes |
ecs_task_role_arn | (Optional) The task definition role. The Amazon Resource Name (ARN) of the IAM role to be used for this target when the rule is triggered. | string |
null |
no |
event_rule_description | (Optional) The description of the rule. | string |
null |
no |
event_rule_event_bus_name | (Optional) The event bus to associate with this rule. If you omit this, the default event bus is used. | string |
null |
no |
event_rule_event_pattern | (Optional) The event pattern described a JSON object. At least one of schedule_expression or event_pattern is required. | string |
null |
no |
event_rule_name | The name of the rule. | string |
n/a | yes |
event_rule_role_arn | (Optional) The Amazon Resource Name (ARN) associated with the role that is used for target invocation. | string |
null |
no |
event_rule_schedule_expression | (Optional) The scheduling expression. For example, cron(0 20 * * ? *) or rate(5 minutes). At least one of event_rule_schedule_expression or event_rule_event_pattern is required. Can only be used on the default event bus. | string |
null |
no |
event_rule_state | (Optional) State of the rule. Valid values are DISABLED, ENABLED, and ENABLED_WITH_ALL_CLOUDTRAIL_MANAGEMENT_EVENTS. When state is ENABLED, the rule is enabled for all events except those delivered by CloudTrail. To also enable the rule for events delivered by CloudTrail, set state to ENABLED_WITH_ALL_CLOUDTRAIL_MANAGEMENT_EVENTS. Defaults to ENABLED. | string |
"ENABLED" |
no |
event_target_ecs_target_assign_public_ip | (Optional) Assign a public IP address to the ENI. Default false. | bool |
false |
no |
event_target_ecs_target_group | (Optional) Specifies an ECS task group for the task. The maximum length is 255 characters. | string |
null |
no |
event_target_ecs_target_platform_version | (Optional) Specifies the platform version for the task. Specify only the numeric portion of the platform version, such as 1.1.0. For more information about valid platform versions, see AWS Fargate Platform Versions. Default to LATEST. | string |
"LATEST" |
no |
event_target_ecs_target_propagate_tags | (Optional) Specifies whether to propagate the tags from the task definition to the task. If no value is specified, the tags are not propagated. Tags can only be propagated to the task during task creation. Valid values: TASK_DEFINITION or leave empty to avoid propagation. |
string |
"" |
no |
event_target_ecs_target_security_groups | (Optional) The security groups associated with the task or service. If you do not specify a security group, the default security group for the VPC is used. | list(any) |
null |
no |
event_target_ecs_target_subnets | The subnets associated with the task or service. | list(any) |
n/a | yes |
event_target_ecs_target_task_count | (Optional) The number of tasks to create based on the TaskDefinition. The default is 1. | number |
1 |
no |
event_target_ecs_target_task_definition_arn | (Required) The ARN of the task definition to use if the event target is an Amazon ECS cluster. | string |
n/a | yes |
event_target_input | (Optional) Valid JSON text passed to the target. Conflicts with event_target_input_path. | string |
null |
no |
event_target_input_path | (Optional) The value of the JSONPath that is used for extracting part of the matched event when passing it to the target. Conflicts with event_target_input. | string |
null |
no |
event_target_target_id | (Optional) The unique target assignment ID. If missing, will generate a random, unique id. | string |
null |
no |
name_prefix | Name prefix for resources on AWS. | string |
n/a | yes |
permissions_boundary | (Optional) The ARN of the policy that is used to set the permissions boundary for the role. | string |
null |
no |