AWS Amazon ECS Cluster

This page shows how to write Terraform and CloudFormation for Amazon ECS Cluster and write them securely.

aws_ecs_cluster (Terraform)

The Cluster in Amazon ECS can be configured in Terraform with the resource name aws_ecs_cluster. The following sections describe 4 examples of how to use the resource and its parameters.

Example Usage from GitHub

github-iconlciamp/terra-test
resource "aws_ecs_cluster" "qa" {
  name = "QA"
}

resource "aws_ecs_cluster" "Prod" {
  name = "Prod"
github-icongilyas/infracost
resource "aws_ecs_cluster" "ecs1" {
  name               = "ecs1"
  capacity_providers = ["FARGATE"]
}

resource "aws_ecs_task_definition" "ecs_task1" {
github-iconDaichiHoshina/go_react_app
resource "aws_ecs_cluster" "repgram-front" {
  name = "repgram-front"
}

resource "aws_ecs_cluster" "repgram-backend" {
  name = "repgram-backend"
github-iconsnyk-labs/infrastructure-as-code-goof
resource "aws_ecs_cluster" "denied" {
}

resource "aws_ecs_cluster" "denied_2" {
  setting {
    name = "containerInsights"

Parameters

Explanation in Terraform Registry

Provides an ECS cluster.

AWS::ECS::Cluster (CloudFormation)

The Cluster in ECS can be configured in CloudFormation with the resource name AWS::ECS::Cluster. The following sections describe how to use the resource and its parameters.

Parameters

Explanation in CloudFormation Registry

The AWS::ECS::Cluster resource creates an Amazon Elastic Container Service (Amazon ECS) cluster.

Frequently asked questions

What is AWS Amazon ECS Cluster?

AWS Amazon ECS Cluster is a resource for Amazon ECS of Amazon Web Service. Settings can be wrote in Terraform and CloudFormation.

Where can I find the example code for the AWS Amazon ECS Cluster?

For Terraform, the lciamp/terra-test, gilyas/infracost and DaichiHoshina/go_react_app source code examples are useful. See the Terraform Example section for further details.

security-icon

Scan your IaC problem in 3 minutes for free

You can keep your IaC security for free. No credit card required.