All Projects → mongodb → terraform-aws-ecs-task-definition

mongodb / terraform-aws-ecs-task-definition

Licence: Apache-2.0 license
A Terraform module for creating Amazon ECS Task Definitions

Programming Languages

HCL
1544 projects
go
31211 projects - #10 most used programming language
Smarty
1635 projects

Projects that are alternatives of or similar to terraform-aws-ecs-task-definition

terraform-aws-ecs-service
Creates an ECS Service.
Stars: ✭ 86 (+28.36%)
Mutual labels:  aws-ecs, terraform-modules
terraform-aws-druid
Terraform module to deploy Apache Druid in Kubernetes
Stars: ✭ 16 (-76.12%)
Mutual labels:  terraform-modules
terraform-aws-efs-backup
Terraform module designed to easily backup EFS filesystems to S3 using DataPipeline
Stars: ✭ 40 (-40.3%)
Mutual labels:  terraform-modules
terraform-aws-ecs-cluster
Creates an ECS cluster backed by an Auto Scaling Group
Stars: ✭ 57 (-14.93%)
Mutual labels:  aws-ecs
terraform-aws-route53-cluster-zone
Terraform module to easily define consistent cluster domains on Route53 (e.g. `prod.ourcompany.com`)
Stars: ✭ 42 (-37.31%)
Mutual labels:  terraform-modules
terraform-aws-api-gateway
Terraform module to create Route53 resource on AWS for create api gateway with it's basic elements.
Stars: ✭ 43 (-35.82%)
Mutual labels:  terraform-modules
terraform-aws-ec2-instance
Terraform module for provisioning a general purpose EC2 host
Stars: ✭ 123 (+83.58%)
Mutual labels:  terraform-modules
terraform-module-versions
CLI tool that checks Terraform code for module updates. Single binary, no dependencies. linux, osx, windows. #golang #cli #terraform
Stars: ✭ 143 (+113.43%)
Mutual labels:  terraform-modules
terraform-aws-config
This module configures AWS Config, a service that enables you to assess, audit, and evaluate the configurations of your AWS resources.
Stars: ✭ 24 (-64.18%)
Mutual labels:  terraform-modules
terranetes
Terraform boilerplate for production-grade Kubernetes clusters on AWS (optionally includes kube-system components, OpenVPN, an ingress controller, monitoring services...)
Stars: ✭ 15 (-77.61%)
Mutual labels:  terraform-modules
terraform-azurerm-kubernetes
Install a Kubernetes cluster the CoreOS Tectonic Way: HA, self-hosted, RBAC, etcd Operator, and more
Stars: ✭ 22 (-67.16%)
Mutual labels:  terraform-modules
terraform-azurerm-compute
Terraform Azure RM Compute Module
Stars: ✭ 133 (+98.51%)
Mutual labels:  terraform-modules
terraform-aws-base-networking
Terraform module for building base networking in AWS
Stars: ✭ 15 (-77.61%)
Mutual labels:  terraform-modules
terraform-codedeploy
Terraform module to add codedeploy
Stars: ✭ 29 (-56.72%)
Mutual labels:  terraform-modules
Shappar
気軽に投票を【取れる】【見れる】【できる】アプリです。
Stars: ✭ 22 (-67.16%)
Mutual labels:  aws-ecs
terraform-aws-cloudtrail
Creates and configures AWS CloudTrail
Stars: ✭ 40 (-40.3%)
Mutual labels:  terraform-modules
neo4j-aws-causal-cluster
Neo4j Enterprise Causal Cluster on AWS ECS by GetSocial
Stars: ✭ 24 (-64.18%)
Mutual labels:  aws-ecs
terraform-aws-backup
Terraform module to provision AWS Backup, a fully managed backup service that makes it easy to centralize and automate the back up of data across AWS services such as EBS volumes, RDS databases, DynamoDB tables, EFS file systems, and AWS Storage Gateway volumes.
Stars: ✭ 62 (-7.46%)
Mutual labels:  terraform-modules
terraform-aws-lambda-auto-package
A terraform module to define a lambda function which source files are automatically built and packaged for lambda deployment.
Stars: ✭ 23 (-65.67%)
Mutual labels:  terraform-modules
terraform-aws-iam-user
A Terraform module to create and manage Identity and Access Management (IAM) Users on Amazon Web Services (AWS). https://aws.amazon.com/iam
Stars: ✭ 17 (-74.63%)
Mutual labels:  terraform-modules

GitHub release GitHub

A Terraform module for creating Amazon ECS Task Definitions

NOTICE

THIS MODULE IS NOT COMPATIBLE WITH VERSIONS OF TERRAFORM LESS THAN v0.12.x. PLEASE REFER TO THE OFFICIAL DOCUMENTATION FOR UPGRADING TO THE LATEST VERSION OF TERRAFORM.

Contents

Motivation

The purpose of this module is to generate a valid Amazon ECS Task Definition dynamically. A task definition is required to run Docker containers in Amazon ECS. A task definition contains a list of container definitions received by the Docker daemon to create a container instance.

Use Cases

Requirements

Usage

This module uses the same parameters as the ContainerDefinition object. Given the following Terraform configuration:

provider "aws" {}

module "mongo-task-definition" {
  source = "github.com/mongodb/terraform-aws-ecs-task-definition"

  family = "mongo"
  image  = "mongo:3.6"
  memory = 512
  name   = "mongo"

  portMappings = [
    {
      containerPort = 27017
    },
  ]
}

Invoking the commands defined below creates an ECS task definition with the following containerDefinitions:

$ terraform init
$ terraform apply
[
  {
    "command": null,
    "cpu": null,
    "disableNetworking": false,
    "dnsSearchDomains": null,
    "dnsServers": null,
    "dockerLabels": null,
    "dockerSecurityOptions": null,
    "entryPoint": null,
    "environment": null,
    "essential": true,
    "extraHosts": null,
    "healthCheck": null,
    "hostname": null,
    "image": "mongo:3.6",
    "interactive": false,
    "links": null,
    "linuxParameters": null,
    "logConfiguration": null,
    "memory": 512,
    "memoryReservation": null,
    "mountPoints": null,
    "name": "mongo",
    "portMappings": [{"containerPort":27017}],
    "privileged": false,
    "pseudoTerminal": false,
    "readonlyRootFilesystem": false,
    "repositoryCredentials": null,
    "resourceRequirements": null,
    "secrets": null,
    "systemControls": null,
    "ulimits": null,
    "user": null,
    "volumesFrom": null,
    "workingDirectory": null
  }
]

Multiple Container Definitions

By default, this module creates a task definition with a single container definition. To create a task definition with multiple container definitions, refer to the documentation of the merge module.

Providers

Name Version
aws n/a
template n/a

Inputs

Name Description Type Default Required
command The command that is passed to the container list(string) [] no
cpu The number of cpu units reserved for the container number 0 no
disableNetworking When this parameter is true, networking is disabled within the container bool false no
dnsSearchDomains A list of DNS search domains that are presented to the container list(string) [] no
dnsServers A list of DNS servers that are presented to the container list(string) [] no
dockerLabels A key/value map of labels to add to the container map(string) {} no
dockerSecurityOptions A list of strings to provide custom labels for SELinux and AppArmor multi-level security systems list(string) [] no
entryPoint The entry point that is passed to the container list(string) [] no
environment The environment variables to pass to a container list(map(string)) [] no
essential If the essential parameter of a container is marked as true, and that container fails or stops for any reason, all other containers that are part of the task are stopped bool true no
execution_role_arn The Amazon Resource Name (ARN) of the task execution role that the Amazon ECS container agent and the Docker daemon can assume string "" no
extraHosts A list of hostnames and IP address mappings to append to the /etc/hosts file on the container list(string) [] no
family You must specify a family for a task definition, which allows you to track multiple versions of the same task definition any n/a yes
healthCheck The health check command and associated configuration parameters for the container any {} no
hostname The hostname to use for your container string "" no
image The image used to start a container string "" no
interactive When this parameter is true, this allows you to deploy containerized applications that require stdin or a tty to be allocated bool false no
ipc_mode The IPC resource namespace to use for the containers in the task string "host" no
links The link parameter allows containers to communicate with each other without the need for port mappings list(string) [] no
linuxParameters Linux-specific modifications that are applied to the container, such as Linux KernelCapabilities any {} no
logConfiguration The log configuration specification for the container any {} no
memory The hard limit (in MiB) of memory to present to the container number 0 no
memoryReservation The soft limit (in MiB) of memory to reserve for the container number 0 no
mountPoints The mount points for data volumes in your container list(any) [] no
name The name of a container string "" no
network_mode The Docker networking mode to use for the containers in the task string "bridge" no
pid_mode The process namespace to use for the containers in the task string "host" no
placement_constraints An array of placement constraint objects to use for the task list(string) [] no
portMappings The list of port mappings for the container list(any) [] no
privileged When this parameter is true, the container is given elevated privileges on the host container instance (similar to the root user) bool false no
pseudoTerminal When this parameter is true, a TTY is allocated bool false no
readonlyRootFilesystem When this parameter is true, the container is given read-only access to its root file system bool false no
register_task_definition Registers a new task definition from the supplied family and containerDefinitions bool true no
repositoryCredentials The private repository authentication credentials to use map(string) {} no
requires_compatibilities The launch type required by the task list(string) [] no
resourceRequirements The type and amount of a resource to assign to a container list(string) [] no
secrets The secrets to pass to the container list(map(string)) [] no
systemControls A list of namespaced kernel parameters to set in the container list(string) [] no
tags The metadata that you apply to the task definition to help you categorize and organize them map(string) {} no
task_role_arn The short name or full Amazon Resource Name (ARN) of the IAM role that containers in this task can assume string "" no
ulimits A list of ulimits to set in the container list(any) [] no
user The user name to use inside the container string "" no
volumes A list of volume definitions in JSON format that containers in your task may use list(any) [] no
volumesFrom Data volumes to mount from another container list(object) [] no
workingDirectory The working directory in which to run commands inside the container string "" no

Outputs

Name Description
arn The full Amazon Resource Name (ARN) of the task definition
container_definitions A list of container definitions in JSON format that describe the different containers that make up your task
family The family of your task definition, used as the definition name
revision The revision of the task in a particular family

Testing

This module uses Terratest, a Go library maintained by Gruntwork, to write automated tests for your infrastructure code. To invoke tests, run the following commands:

$ go test -v ./...

License

Apache License 2.0

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].