aws::ecs-cluster

Create an ECS cluster.

Example

aws::ecs-cluster ecs-cluster-example
    cluster-name: "ecs-cluster-example"
    capacity-providers: [
        $(aws::ecs-capacity-provider ecs-capacity-provider-cluster-example),
        $(aws::ecs-capacity-provider ecs-capacity-provider-cluster-example-2)
    ]

    default-capacity-provider-strategy
        capacity-provider: $(aws::ecs-capacity-provider ecs-capacity-provider-cluster-example)
        base: 2
        weight: 2
    end

    default-capacity-provider-strategy
        capacity-provider: $(aws::ecs-capacity-provider ecs-capacity-provider-cluster-example-2)
        weight: 1
    end

    settings: {
        'containerInsights': 'disabled'
    }

    tags: {
        'Name': 'ecs-cluster-example'
    }

end

Attributes

Attribute Description
cluster-name The name identifying the cluster. Must be a string 1 to 255 characters long containing letters, numbers, and hyphens. Must begin with a letter. Valid values satisfy the regex: [^[a-zA-Z]([-a-zA-Z0-9]{0,254})?]. (Required)
capacity-providers set The capacity providers associated with the cluster.
default-capacity-provider-strategy list subresource

The default capacity provider strategy for the cluster.

When services or tasks are run in the cluster with no launch type or capacity provider strategy specified, the default capacity provider strategy is used.

capacity-provider
The capacity provider to include in the strategy. (Required)
base

Designates how many tasks, at a minimum, to run on the specified capacity-provider.

Only one capacity provider in a capacity provider strategy can have a base defined at a nonzero value. Defaults to 0.

weight

Designates the relative percentage of the total number of tasks launched that should use the specified capacity-provider.

At least one capacity provider in a capacity provider strategy must have weight greater than 0. Defaults to 1.

settings map

The settings for the cluster. This parameter indicates whether CloudWatch Container Insights is enabled or disabled for a cluster.

The only valid key is containerInsights, and the valid values are enabled or disabled.

tags map

The metadata applied to the cluster. Each tag consists of a key and an optional value.

Up to 50 tags per resource are allowed. The maximum character length is 128 for keys and 256 for values. Tags may not be prefixed with aws:, regardless of character case.

Outputs

Attribute Description
arn The Amazon Resource Name (ARN) that identifies the cluster.