Skip to content

geekcell/terraform-aws-ecs-cluster

Repository files navigation

Geek Cell GmbH

Code Quality

License GitHub release (latest tag) Release Validate Lint

Terraform AWS ECS Cluster

This Terraform module provides a preconfigured solution for setting up an Amazon Elastic Container Service (ECS) Cluster with enabled Container Insights, logging, and advanced monitoring. With this module, you can easily launch, manage, and scale your Docker containers and applications in the cloud while having complete visibility into their performance and health.

Inputs

Name Description Type Default Required
enable_container_insights Enable CloudWatch Container Insights for the cluster. bool true no
encrypt_ephemeral_storage Encrypt the ECS ephemeral storage for the cluster. bool false no
encrypt_execute_command_session Encrypt execute command session for the cluster. bool false no
encrypt_managed_storage Encrypt the ECS managed storage for the cluster. bool false no
logging_execute_command_session Log execute command session for the cluster. string "DEFAULT" no
name Name of the ECS cluster. string n/a yes
tags Tags to add to the ECS cluster. map(any) {} no

Outputs

Name Description
arn The ARN of the ECS cluster.
command_session_cloudwatch_log_group_arn The ARN of the CloudWatch log group used to store the command session.
command_session_kms_arn The ARN of the KMS key used to encrypt the command session.
name The name of the ECS cluster.
storage_kms_arn The ARN of the KMS key used to encrypt the storage (managed and ephemeral).

Providers

Name Version
aws >= 5.59

Resources

  • resource.aws_cloudwatch_log_group.container_insights (main.tf#80)
  • resource.aws_cloudwatch_log_group.main (main.tf#73)
  • resource.aws_ecs_cluster.main (main.tf#10)
  • data source.aws_caller_identity.current (main.tf#100)
  • data source.aws_iam_policy_document.kms_storage (main.tf#101)

Examples

Basic Example

module "basic-example" {
  source = "../../"

  name = var.name
}