Skip to content

A Terraform module to manage Amazon Elastic Container Service (ECS) Clusters on Amazon Web Services (AWS). https://aws.amazon.com/ecs

License

Notifications You must be signed in to change notification settings

mineiros-io/terraform-aws-ecs-cluster

Repository files navigation

Build Status GitHub tag (latest SemVer) Terraform Version AWS Provider Version Join Slack

terraform-aws-ecs-cluster

A Terraform module to create and manage an Amazon ECS Cluster on Amazon Web Services (AWS).

_This module supports Terraform version 1 and is compatible with the Terraform AWS Provider version 3.57.0

This module is part of our Infrastructure as Code (IaC) framework that enables our users and customers to easily deploy and manage reusable, secure, and production-grade cloud infrastructure.

Module Features

This module implements the following Terraform resources

  • aws_ecs_cluster

Getting Started

Most common usage of the module:

module "terraform-aws-ecs-cluster" {
  source = "git@github.com:mineiros-io/terraform-aws-ecs-cluster.git?ref=v0.0.1"

  name = "name-of-cluster"
}

Module Argument Reference

See variables.tf and examples/ for details and use-cases.

Main Resource Configuration

  • name: (Required string)

    Name of the cluster (up to 255 letters, numbers, hyphens, and underscores).

  • tags: (Optional map(string))

    A map of tags to apply to all created resources.

    Default is {}.

  • enable_container_insights: (Optional bool)

    Whether to use CloudWatch Container Insights to collect, aggregate, and summarize metrics and logs.

    Default is true.

  • configuration: (Optional object(configuration))

    The execute command configuration for the cluster.

    The configuration object accepts the following attributes:

    • execute_command_configuration: (Optional object(execute_command_configuration))

      The details of the execute command configuration.

      The execute_command_configuration object accepts the following attributes:

      • kms_key_id: (Optional string)

        The AWS Key Management Service key ID to encrypt the data between the local client and the container.

      • logging: (Optional string)

        The log setting to use for redirecting logs for your execute command results. Valid values are NONE, DEFAULT, and OVERRIDE.

      • log_configuration: (Optional object(log_configuration))

        The log configuration for the results of the execute command actions Required when logging is OVERRIDE.

        The log_configuration object accepts the following attributes:

        • cloud_watch_encryption_enabled: (Optional bool)

          Whether or not to enable encryption on the CloudWatch logs. If not specified, encryption will be disabled.

        • cloud_watch_log_group_name: (Optional string)

          The name of the CloudWatch log group to send logs to.

        • s3_bucket_name: (Optional string)

          The name of the S3 bucket to send logs to.

        • s3_bucket_encryption_enabled: (Optional bool)

          Whether or not to enable encryption on the logs sent to S3. If not specified, encryption will be disabled.

        • s3_key_prefix: (Optional string)

          An optional folder in the S3 bucket to place logs in.

Module Configuration

  • module_enabled: (Optional bool)

    Specifies whether resources in the module will be created.

    Default is true.

  • module_tags: (Optional map(string))

    A map of tags that will be applied to all created resources that accept tags. Tags defined with module_tags can be overwritten by resource-specific tags.

    Default is {}.

    Example:

    module_tags = {
      environment = "staging"
      team        = "platform"
    }
  • module_depends_on: (Optional list(dependency))

    A list of dependencies. Any object can be assigned to this list to define a hidden external dependency.

    Default is [].

    Example:

    module_depends_on = [
      null_resource.name
    ]

Module Outputs

The following attributes are exported in the outputs of the module:

  • cluster: (object(cluster))

    All outputs of the 'aws_ecs_cluster' resource.

  • module_enabled: (bool)

    Whether this module is enabled.

  • module_tags: (map(string))

    The map of tags that are being applied to all created resources that accept tags.

External Documentation

AWS Documentation

Terraform AWS Provider Documentation

Module Versioning

This Module follows the principles of Semantic Versioning (SemVer).

Given a version number MAJOR.MINOR.PATCH, we increment the:

  1. MAJOR version when we make incompatible changes,
  2. MINOR version when we add functionality in a backwards compatible manner, and
  3. PATCH version when we make backwards compatible bug fixes.

Backwards compatibility in 0.0.z and 0.y.z version

  • Backwards compatibility in versions 0.0.z is not guaranteed when z is increased. (Initial development)
  • Backwards compatibility in versions 0.y.z is not guaranteed when y is increased. (Pre-release)

About Mineiros

Mineiros is a remote-first company headquartered in Berlin, Germany that solves development, automation and security challenges in cloud infrastructure.

Our vision is to massively reduce time and overhead for teams to manage and deploy production-grade and secure cloud infrastructure.

We offer commercial support for all of our modules and encourage you to reach out if you have any questions or need help. Feel free to email us at hello@mineiros.io or join our Community Slack channel.

Reporting Issues

We use GitHub Issues to track community reported issues and missing features.

Contributing

Contributions are always encouraged and welcome! For the process of accepting changes, we use Pull Requests. If you'd like more information, please see our Contribution Guidelines.

Makefile Targets

This repository comes with a handy Makefile. Run make help to see details on each available target.

License

license

This module is licensed under the Apache License Version 2.0, January 2004. Please see LICENSE for full details.

Copyright © 2020-2022 Mineiros GmbH

About

A Terraform module to manage Amazon Elastic Container Service (ECS) Clusters on Amazon Web Services (AWS). https://aws.amazon.com/ecs

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •