terraform-module / terraform-aws-ecs

Terraform module which creates AWS ECS resources

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

WS Elastic Container Service (ECS) Terraform module

Terraform module which creates ECS resources on AWS.

This module focuses purely on ECS and nothing else. Therefore only these resources can be created with this module:

However, having said the above to have a proper ECS cluster up and running multiple resources are needed. In most cases creating these resources is heavily opinionated and or context-bound. That is why this module does not create these resources. But you still need them to have a production ready environment. Therefore the example area shows how to create everything needed for a production environment.

Reasoining. Due to fact, that base mobule was rewrited due, seems a bit clunky and it does solve some owner specific issue.


Maintenance GitHub forks


Documentation

Usage example

IMPORTANT: The master branch is used in source just as an example. In your code, do not pin to master because there may be breaking changes between releases. Instead pin to the release tag (e.g. ?ref=tags/x.y.z) of one of our latest releases.

module "ecs" {
  source = "terraform-aws-module/ecs/aws"

  name = "my-ecs"

  container_insights = true

  capacity_providers = ["FARGATE", "FARGATE_SPOT"]

  default_capacity_provider_strategy = [
    {
      capacity_provider = "FARGATE_SPOT"
    }
  ]

  tags = {
    Environment = "Development"
  }
}

Examples

See examples directory for working examples to reference

Assumptions

Available features

Requirements

Name Version
terraform >= 1
aws >= 4

Providers

Name Version
aws >= 4

Modules

No modules.

Resources

Name Type
aws_ecs_cluster.this resource
aws_ecs_cluster_capacity_providers.this resource

Inputs

Name Description Type Default Required
capacity_providers List of short names of one or more capacity providers to associate with the cluster. Valid values also include FARGATE and FARGATE_SPOT. list(string) [] no
container_insights Controls if ECS Cluster has container insights enabled bool false no
create_ecs Controls if ECS should be created bool true no
default_capacity_provider_strategy The capacity provider strategy to use by default for the cluster. Can be one or more. list(map(any)) [] no
name Name to be used on all the resources as identifier, also the name of the ECS cluster string null no
tags A map of tags to add to ECS Cluster map(string) {} no

Outputs

Name Description
ecs_cluster_arn ARN of the ECS Cluster
ecs_cluster_id ID of the ECS Cluster
ecs_cluster_name The name of the ECS cluster

πŸ“ Guidelines

  • πŸ“ Use a succinct title and description.
  • πŸ› Bugs & feature requests can be be opened
  • πŸ“Ά Support questions are better asked on Stack Overflow
  • 😊 Be nice, civil and polite (as always).

License

Copyright 2019 Ivan Katliarhcuk

MIT Licensed. See LICENSE for full details.

How to Contribute

Submit a pull request

Authors

Currently maintained by Ivan Katliarchuk and these awesome contributors.

ForTheBadge uses-git

Terraform Registry

Resources

Clone Me

Create a repository using this template β†’

About

Terraform module which creates AWS ECS resources

License:MIT License


Languages

Language:HCL 84.5%Language:Makefile 15.5%