Skip to content

launchbynttdata/tf-aws-module_primitive-ecs_cluster

Repository files navigation

tf-aws-module_primitive-ecs_cluster

This module provides a primitive Terraform module for creating an Amazon ECS cluster with support for various configurations including container insights, execute command configuration, and service connect defaults.

Features

  • Configurable cluster settings (Container Insights)
  • Execute command configuration with logging
  • Managed storage configuration for Fargate ephemeral storage encryption
  • Service Connect defaults
  • Comprehensive tagging

Usage

module "ecs_cluster" {
  source = "path/to/module"

  name = "my-ecs-cluster"

  settings = [
    {
      name  = "containerInsights"
      value = "enabled"
    }
  ]

  tags = {
    Environment = "dev"
  }
}

Resources Created

  • 1 ECS Cluster

Requirements

Name Version
terraform >= 1.0
aws ~> 5.0

Modules

No modules.

Resources

Name Type
aws_ecs_cluster.this resource

Inputs

Name Description Type Default Required
name Name of the ECS cluster (up to 255 letters, numbers, hyphens, and underscores) string n/a yes
tags Key-value map of resource tags map(string) {} no
settings Configuration block(s) with cluster settings. For example, this can be used to enable CloudWatch Container Insights for a cluster
list(object({
name = string
value = string
}))
[] no
configuration Execute command configuration for the cluster
object({
execute_command_configuration = optional(object({
kms_key_id = optional(string)
logging = optional(string, "DEFAULT")
log_configuration = optional(object({
cloud_watch_encryption_enabled = optional(bool, false)
cloud_watch_log_group_name = optional(string)
s3_bucket_name = optional(string)
s3_bucket_encryption_enabled = optional(bool, false)
s3_key_prefix = optional(string)
}))
}))
managed_storage_configuration = optional(object({
fargate_ephemeral_storage_kms_key_id = optional(string)
kms_key_id = string
}))
})
null no
service_connect_defaults Default Service Connect namespace
object({
namespace = string
})
null no

Outputs

Name Description
arn ARN that identifies the cluster
name Name of the cluster
tags_all Map of tags assigned to the resource, including those inherited from the provider

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 5