Cluster

Provides an ECS cluster.

Example Usage

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
    public MyStack()
    {
        var foo = new Aws.Ecs.Cluster("foo", new Aws.Ecs.ClusterArgs
        {
        });
    }

}
package main

import (
    "github.com/pulumi/pulumi-aws/sdk/v2/go/aws/ecs"
    "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
        _, err := ecs.NewCluster(ctx, "foo", nil)
        if err != nil {
            return err
        }
        return nil
    })
}
import pulumi
import pulumi_aws as aws

foo = aws.ecs.Cluster("foo")
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const foo = new aws.ecs.Cluster("foo", {});

Create a Cluster Resource

new Cluster(name: string, args?: ClusterArgs, opts?: CustomResourceOptions);
def Cluster(resource_name, opts=None, capacity_providers=None, default_capacity_provider_strategies=None, name=None, settings=None, tags=None, __props__=None)
func NewCluster(ctx *Context, name string, args *ClusterArgs, opts ...ResourceOption) (*Cluster, error)
public Cluster(string name, ClusterArgs? args = null, CustomResourceOptions? opts = null)
name string
The unique name of the resource.
args ClusterArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
opts ResourceOptions
A bag of options that control this resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args ClusterArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args ClusterArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

Cluster Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.

Inputs

The Cluster resource accepts the following input properties:

CapacityProviders List<string>

List of short names of one or more capacity providers to associate with the cluster. Valid values also include FARGATE and FARGATE_SPOT.

DefaultCapacityProviderStrategies List<ClusterDefaultCapacityProviderStrategyArgs>

The capacity provider strategy to use by default for the cluster. Can be one or more. Defined below.

Name string

The name of the cluster (up to 255 letters, numbers, hyphens, and underscores)

Settings List<ClusterSettingArgs>

Configuration block(s) with cluster settings. For example, this can be used to enable CloudWatch Container Insights for a cluster. Defined below.

Tags Dictionary<string, string>

Key-value map of resource tags

CapacityProviders []string

List of short names of one or more capacity providers to associate with the cluster. Valid values also include FARGATE and FARGATE_SPOT.

DefaultCapacityProviderStrategies []ClusterDefaultCapacityProviderStrategy

The capacity provider strategy to use by default for the cluster. Can be one or more. Defined below.

Name string

The name of the cluster (up to 255 letters, numbers, hyphens, and underscores)

Settings []ClusterSetting

Configuration block(s) with cluster settings. For example, this can be used to enable CloudWatch Container Insights for a cluster. Defined below.

Tags map[string]string

Key-value map of resource tags

capacityProviders string[]

List of short names of one or more capacity providers to associate with the cluster. Valid values also include FARGATE and FARGATE_SPOT.

defaultCapacityProviderStrategies ClusterDefaultCapacityProviderStrategy[]

The capacity provider strategy to use by default for the cluster. Can be one or more. Defined below.

name string

The name of the cluster (up to 255 letters, numbers, hyphens, and underscores)

settings ClusterSetting[]

Configuration block(s) with cluster settings. For example, this can be used to enable CloudWatch Container Insights for a cluster. Defined below.

tags {[key: string]: string}

Key-value map of resource tags

capacity_providers List[str]

List of short names of one or more capacity providers to associate with the cluster. Valid values also include FARGATE and FARGATE_SPOT.

default_capacity_provider_strategies List[ClusterDefaultCapacityProviderStrategy]

The capacity provider strategy to use by default for the cluster. Can be one or more. Defined below.

name str

The name of the cluster (up to 255 letters, numbers, hyphens, and underscores)

settings List[ClusterSetting]

Configuration block(s) with cluster settings. For example, this can be used to enable CloudWatch Container Insights for a cluster. Defined below.

tags Dict[str, str]

Key-value map of resource tags

Outputs

All input properties are implicitly available as output properties. Additionally, the Cluster resource produces the following output properties:

Arn string

The Amazon Resource Name (ARN) that identifies the cluster

Id string
The provider-assigned unique ID for this managed resource.
Arn string

The Amazon Resource Name (ARN) that identifies the cluster

Id string
The provider-assigned unique ID for this managed resource.
arn string

The Amazon Resource Name (ARN) that identifies the cluster

id string
The provider-assigned unique ID for this managed resource.
arn str

The Amazon Resource Name (ARN) that identifies the cluster

id str
The provider-assigned unique ID for this managed resource.

Look up an Existing Cluster Resource

Get an existing Cluster resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: ClusterState, opts?: CustomResourceOptions): Cluster
static get(resource_name, id, opts=None, arn=None, capacity_providers=None, default_capacity_provider_strategies=None, name=None, settings=None, tags=None, __props__=None)
func GetCluster(ctx *Context, name string, id IDInput, state *ClusterState, opts ...ResourceOption) (*Cluster, error)
public static Cluster Get(string name, Input<string> id, ClusterState? state, CustomResourceOptions? opts = null)
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.

The following state arguments are supported:

Arn string

The Amazon Resource Name (ARN) that identifies the cluster

CapacityProviders List<string>

List of short names of one or more capacity providers to associate with the cluster. Valid values also include FARGATE and FARGATE_SPOT.

DefaultCapacityProviderStrategies List<ClusterDefaultCapacityProviderStrategyArgs>

The capacity provider strategy to use by default for the cluster. Can be one or more. Defined below.

Name string

The name of the cluster (up to 255 letters, numbers, hyphens, and underscores)

Settings List<ClusterSettingArgs>

Configuration block(s) with cluster settings. For example, this can be used to enable CloudWatch Container Insights for a cluster. Defined below.

Tags Dictionary<string, string>

Key-value map of resource tags

Arn string

The Amazon Resource Name (ARN) that identifies the cluster

CapacityProviders []string

List of short names of one or more capacity providers to associate with the cluster. Valid values also include FARGATE and FARGATE_SPOT.

DefaultCapacityProviderStrategies []ClusterDefaultCapacityProviderStrategy

The capacity provider strategy to use by default for the cluster. Can be one or more. Defined below.

Name string

The name of the cluster (up to 255 letters, numbers, hyphens, and underscores)

Settings []ClusterSetting

Configuration block(s) with cluster settings. For example, this can be used to enable CloudWatch Container Insights for a cluster. Defined below.

Tags map[string]string

Key-value map of resource tags

arn string

The Amazon Resource Name (ARN) that identifies the cluster

capacityProviders string[]

List of short names of one or more capacity providers to associate with the cluster. Valid values also include FARGATE and FARGATE_SPOT.

defaultCapacityProviderStrategies ClusterDefaultCapacityProviderStrategy[]

The capacity provider strategy to use by default for the cluster. Can be one or more. Defined below.

name string

The name of the cluster (up to 255 letters, numbers, hyphens, and underscores)

settings ClusterSetting[]

Configuration block(s) with cluster settings. For example, this can be used to enable CloudWatch Container Insights for a cluster. Defined below.

tags {[key: string]: string}

Key-value map of resource tags

arn str

The Amazon Resource Name (ARN) that identifies the cluster

capacity_providers List[str]

List of short names of one or more capacity providers to associate with the cluster. Valid values also include FARGATE and FARGATE_SPOT.

default_capacity_provider_strategies List[ClusterDefaultCapacityProviderStrategy]

The capacity provider strategy to use by default for the cluster. Can be one or more. Defined below.

name str

The name of the cluster (up to 255 letters, numbers, hyphens, and underscores)

settings List[ClusterSetting]

Configuration block(s) with cluster settings. For example, this can be used to enable CloudWatch Container Insights for a cluster. Defined below.

tags Dict[str, str]

Key-value map of resource tags

Supporting Types

ClusterDefaultCapacityProviderStrategy

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

CapacityProvider string

The short name of the capacity provider.

Base int

The number of 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.

Weight int

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

CapacityProvider string

The short name of the capacity provider.

Base int

The number of 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.

Weight int

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

capacityProvider string

The short name of the capacity provider.

base number

The number of 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.

weight number

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

capacityProvider str

The short name of the capacity provider.

base float

The number of 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.

weight float

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

ClusterSetting

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

Name string

Name of the setting to manage. Valid values: containerInsights.

Value string

The value to assign to the setting. Value values are enabled and disabled.

Name string

Name of the setting to manage. Valid values: containerInsights.

Value string

The value to assign to the setting. Value values are enabled and disabled.

name string

Name of the setting to manage. Valid values: containerInsights.

value string

The value to assign to the setting. Value values are enabled and disabled.

name str

Name of the setting to manage. Valid values: containerInsights.

value str

The value to assign to the setting. Value values are enabled and disabled.

Package Details

Repository
https://github.com/pulumi/pulumi-aws
License
Apache-2.0
Notes
This Pulumi package is based on the aws Terraform Provider.