data-pipeline-ecs-task

dod-iac/data-pipeline-ecs-task/aws

Terraform Module HCL AWS

An ECS task as part of a data pipeline

Install
module "data-pipeline-ecs-task" {
source = "dod-iac/data-pipeline-ecs-task/aws"
version = "1.0.1"
}
plain text: /constructs/tfmod-dod-iac-data-pipeline-ecs-task-aws/install.txt
⭐ Source on GitHub 📦 Registry page
README

Usage Creates the resources to run an ECS task as part of a data pipeline, including an IAM policy, task definition, task execution role, and task role. ``hcl resource "aws_cloudwatch_log_group" "ecs_task" { name = format("/aws/ecs/app-%s-task-%s", var.application, var.environment) retention_in_days = 1 # expire logs after 1 day tags = var.tags } module "data_pipeline_ecs_task" { source = "dod-iac/data-pipeline-ecs-task/aws" cloudwatch_log_group_name = aws_cloudwatch_log_group.ecs_task.name command = ["help"] entryPoint = ["/entrypoint.sh"] execution_role_name = format("app-%s-ecs-execution-role-%s", var.application, var.environment) image = var.image memory = pow(2, 5) name = format("app-%s-task-%s", var.application, var.environment) s3_buckets_read = [aws_s3_bucket.source.arn] s3_buckets

Inputs (22)
NameTypeDescriptionDefault
commandlist(string)The command to use with the task. required
entryPointlist(string)The entry point to use with the ECS task. required
task_role_namestringThe name of the IAM task role used by the ECS task. required
namestringThe name of the ECS task definition, essential container, and CloudWatch stream required
execution_role_namestringThe name of the IAM execution role used by the ECS task. required
memorynumberThe memory allocated to the ECS task. required
cloudwatch_log_group_namestringThe name of the CloudWatch log group that the ECS task sends logs to. required
imagestringThe image for the essential container of the ECS task. required
network_modestringThe Docker networking mode to use for the task. Valid values are none, bridge, "awsvpc"
s3_buckets_writelist(string)The ARNs of the AWS S3 buckets that can be written to. Use ["*"] to allow all b[]
readonlyRootFilesystemboolIf true, then the container's root filesystem is mounted as read only.false
requires_compatibilitieslist(string)Set of launch types required by the task. The valid values are EC2 and FARGATE.[ "EC2", "FARGATE" ]
task_role_policy_namestringThe name of the IAM policy attached to the task role used by the ECS task. If n""
s3_buckets_readlist(string)The ARNs of the AWS S3 buckets that can be read from. Use ["*"] to allow all bu[]
cpunumberNumber of cpu units used by the task. If the requires_compatibilities is FARGATE4096
execution_role_policy_namestringThe name of the IAM policy attached to the IAM Execution role used by the ECS ta""
glue_tables_addlist(object({ database = sList of glue tables that partitions can be added to.[]
tagsmap(string)A mapping of tags to assign to the resources.{}
kms_keys_encryptlist(string)The ARNs of the AWS KMS keys that can be used to encrypt data. Use ["*"] to all[]
task_role_policy_documentstringThe contents of the IAM policy attached to the IAM Execution role used by the EC""
execution_role_policy_documentstringThe contents of the IAM policy attached to the IAM execution role used by the EC""
kms_keys_decryptlist(string)The ARNs of the AWS KMS keys that can be used to decrypt data. Use ["*"] to all[]
Outputs (3)
task_definition_family — The family of the AWS ECS Task Definition.
task_definition_revision — The latest revision of the AWS ECS Task Definition.
task_definition_arn — The Amazon Resource Name (ARN) of the AWS ECS Task Definition.
Resources (2)
aws_ecs_task_definitionaws_iam_role_policy_attachment
Details
FrameworkTerraform Module
LanguageHCL
Version1.0.1
Cloud AWS
★ Stars1
Forks1
Total downloads5.2k
Inputs22
Outputs3
Resources2
Examples2
LicenseNOASSERTION
Namespacedod-iac
Updated