An open API service indexing awesome lists of open source software.

https://github.com/launchbynttdata/tf-aws-module_primitive-ecs_cluster


https://github.com/launchbynttdata/tf-aws-module_primitive-ecs_cluster

Last synced: 13 days ago
JSON representation

Awesome Lists containing this project

README

          

# 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

```hcl
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](#requirement\_terraform) | >= 1.0 |
| [aws](#requirement\_aws) | ~> 5.0 |

## Modules

No modules.

## Resources

| Name | Type |
|------|------|
| [aws_ecs_cluster.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/ecs_cluster) | resource |

## Inputs

| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| [name](#input\_name) | Name of the ECS cluster (up to 255 letters, numbers, hyphens, and underscores) | `string` | n/a | yes |
| [tags](#input\_tags) | Key-value map of resource tags | `map(string)` | `{}` | no |
| [settings](#input\_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](#input\_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](#input\_service\_connect\_defaults) | Default Service Connect namespace |
object({
namespace = string
})
| `null` | no |

## Outputs

| Name | Description |
|------|-------------|
| [arn](#output\_arn) | ARN that identifies the cluster |
| [name](#output\_name) | Name of the cluster |
| [tags\_all](#output\_tags\_all) | Map of tags assigned to the resource, including those inherited from the provider |