Terraform ecs scheduled task

Terraform ecs scheduled task DEFAULT

dxw/terraform-aws-ecs-scheduled-task

A Terraform module to create a scheduled task in AWS ECS

Usage

module"scheduled_task" { source ="github.com/dxw/terraform-aws-ecs-scheduled-task" version ="1.2" name ="my_awesome_task" environment ="staging" container_definitions ="${file(./path/to/container-definitions.json)}" schedule_expression ="cron(0 * * * ? 0)" cluster_arn ="my_awesome_cluster" memory ="512" cpu ="512" }

Configuration

The following variables can be configured:

Required

  • Description: Unique name for resources
  • Default:

  • Description: Environment - appended to ${var.name} for resources
  • Default:

  • Description: Task container defintions. See AWS docs
  • Default:

  • Description: Schedule expression ( or ) for when to run task. See AWS docs
  • Default:

  • Description: ARN of cluster on which to run task
  • Default:

  • Description: The number of cpu units used by the task
  • Default:

  • Description: The amount (in MiB) of memory used by the task
  • Default:

Optional

  • Description: Task network mode
  • Default:

Outputs

The following outputs are exported:

  • Description: Scheduled Task ECS Role ID

  • Description: Scheduled Task ECS Role ID

  • Description: Scheduled Task CloudWatch Role ID

  • Description: Scheduled Task ARN
Sours: https://githubmemory.com/repo/dxw/terraform-aws-ecs-scheduled-task

terraform-aws-ecs-scheduled-task

cloudwatch_event_rule_arnThe Amazon Resource Name (ARN) of the rule.ecs_events_policy_arnThe ARN assigned by AWS to this CloudWatch Events IAM Policy.ecs_events_policy_descriptionThe description of the CloudWatch Events IAM Policy.ecs_events_policy_documentThe policy document of the CloudWatch Events IAM Policy.ecs_events_policy_idThe CloudWatch Events IAM Policy's ID.ecs_events_policy_nameThe name of the CloudWatch Events IAM Policy.ecs_events_policy_pathThe path of the CloudWatch Events IAM Policy.ecs_events_role_arnThe Amazon Resource Name (ARN) specifying the CloudWatch Events IAM Role.ecs_events_role_create_dateThe creation date of the IAM Role.ecs_events_role_descriptionThe description of the CloudWatch Events IAM Role.ecs_events_role_nameThe name of the CloudWatch Events IAM Role.ecs_events_role_unique_idThe stable and unique string identifying the CloudWatch Events IAM Role.ecs_task_definition_arnFull ARN of the Task Definition (including both family and revision).ecs_task_definition_familyThe family of the Task Definition.ecs_task_definition_revisionThe revision of the task in a particular family.ecs_task_execution_policy_arnThe ARN assigned by AWS to this ECS Task Execution IAM Policy.ecs_task_execution_policy_descriptionThe description of the ECS Task Execution IAM Policy.ecs_task_execution_policy_documentThe policy document of the ECS Task Execution IAM Policy.ecs_task_execution_policy_idThe ECS Task Execution IAM Policy's ID.ecs_task_execution_policy_nameThe name of the ECS Task Execution IAM Policy.ecs_task_execution_policy_pathThe path of the ECS Task Execution IAM Policy.ecs_task_execution_role_arnThe Amazon Resource Name (ARN) specifying the ECS Task Execution IAM Role.ecs_task_execution_role_create_dateThe creation date of the ECS Task Execution IAM Role.ecs_task_execution_role_descriptionThe description of the ECS Task Execution IAM Role.ecs_task_execution_role_nameThe name of the ECS Task Execution IAM Role.ecs_task_execution_role_unique_idThe stable and unique string identifying the ECS Task Execution IAM Role.
Sours: https://github.com/tmknom/terraform-aws-ecs-scheduled-task
  1. Amazon snuggle
  2. Diy indie jewelry
  3. Pokemon revoltion online
  4. Blown glass oil candles
  5. Goodyear tires 18

Terraform ECS Fargate Scheduled Task

A set of Terraform templates used for provisioning scheduled tasks on AWS ECS Fargate.

ECS Scheduled Tasks use CloudWatch Event Rules to run Fargate containers.

diagram

The templates are designed to be customized. The optional components can be removed by simply deleting the file.

The templates are used for managing infrastructure concerns and, as such, the templates deploy a hello-world docker image. We recommend using the fargate CLI for managing application concerns like deploying your actual application images and environment variables on top of this infrastructure. The fargate CLI can be used to deploy applications from your laptop or in CI/CD pipelines.

Components

base

These components are shared by all environments.

NameDescriptionOptional
main.tfAWS provider, output
state.tfS3 bucket backend for storing Terraform remote state
ecr.tfECR repository for application (all environments share)

env/dev

These components are for a specific environment. There should be a corresponding directory for each environment that is needed.

NameDescriptionOptional
main.tfTerrform remote state, AWS provider, output
ecs.tfECS Cluster, Service, Task Definition, ecsTaskExecutionRole, CloudWatch Log Group
nsg.tfNSG for Task
role.tfApplication Role for containerYes
cicd.tfIAM user that can be used by CI/CD systemsYes
logs-logzio.tfShip container logs to logz.ioYes
secretsmanager.tfAdd a base secret to SecretsmanagerYes

Usage

Typically, the base Terraform will only need to be run once, and then should only need changes very infrequently. After the base is built, each environment can be built.

fargate-create

Alternatively you can use the fargate-create CLI to scaffold new projects based on this template.

install

create an input vars file ()

Additional Information

  • Base README

  • Environment README

Sours: https://opensourcelibs.com/lib/terraform-ecs-fargate-scheduled-task
Modules - Terraform Tutorial - #15

.

Ecs task terraform scheduled

.

AWS ECS Creation with Terraform - JayDemy

.

You will also like:

.



29 30 31 32 33