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:
- Capacity
Providers List<string> List of short names of one or more capacity providers to associate with the cluster. Valid values also include
FARGATEandFARGATE_SPOT.- Default
Capacity List<ClusterProvider Strategies Default Capacity Provider Strategy Args> 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<Cluster
Setting Args> Configuration block(s) with cluster settings. For example, this can be used to enable CloudWatch Container Insights for a cluster. Defined below.
- Dictionary<string, string>
Key-value map of resource tags
- Capacity
Providers []string List of short names of one or more capacity providers to associate with the cluster. Valid values also include
FARGATEandFARGATE_SPOT.- Default
Capacity []ClusterProvider Strategies Default Capacity Provider Strategy 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
[]Cluster
Setting Configuration block(s) with cluster settings. For example, this can be used to enable CloudWatch Container Insights for a cluster. Defined below.
- map[string]string
Key-value map of resource tags
- capacity
Providers string[] List of short names of one or more capacity providers to associate with the cluster. Valid values also include
FARGATEandFARGATE_SPOT.- default
Capacity ClusterProvider Strategies Default Capacity Provider Strategy[] 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
Cluster
Setting[] Configuration block(s) with cluster settings. For example, this can be used to enable CloudWatch Container Insights for a cluster. Defined below.
- {[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
FARGATEandFARGATE_SPOT.- default_
capacity_ List[Clusterprovider_ strategies Default Capacity Provider Strategy] 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[Cluster
Setting] Configuration block(s) with cluster settings. For example, this can be used to enable CloudWatch Container Insights for a cluster. Defined below.
- 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:
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): Clusterstatic 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
- Capacity
Providers List<string> List of short names of one or more capacity providers to associate with the cluster. Valid values also include
FARGATEandFARGATE_SPOT.- Default
Capacity List<ClusterProvider Strategies Default Capacity Provider Strategy Args> 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<Cluster
Setting Args> Configuration block(s) with cluster settings. For example, this can be used to enable CloudWatch Container Insights for a cluster. Defined below.
- Dictionary<string, string>
Key-value map of resource tags
- Arn string
The Amazon Resource Name (ARN) that identifies the cluster
- Capacity
Providers []string List of short names of one or more capacity providers to associate with the cluster. Valid values also include
FARGATEandFARGATE_SPOT.- Default
Capacity []ClusterProvider Strategies Default Capacity Provider Strategy 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
[]Cluster
Setting Configuration block(s) with cluster settings. For example, this can be used to enable CloudWatch Container Insights for a cluster. Defined below.
- map[string]string
Key-value map of resource tags
- arn string
The Amazon Resource Name (ARN) that identifies the cluster
- capacity
Providers string[] List of short names of one or more capacity providers to associate with the cluster. Valid values also include
FARGATEandFARGATE_SPOT.- default
Capacity ClusterProvider Strategies Default Capacity Provider Strategy[] 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
Cluster
Setting[] Configuration block(s) with cluster settings. For example, this can be used to enable CloudWatch Container Insights for a cluster. Defined below.
- {[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
FARGATEandFARGATE_SPOT.- default_
capacity_ List[Clusterprovider_ strategies Default Capacity Provider Strategy] 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[Cluster
Setting] Configuration block(s) with cluster settings. For example, this can be used to enable CloudWatch Container Insights for a cluster. Defined below.
- Dict[str, str]
Key-value map of resource tags
Supporting Types
ClusterDefaultCapacityProviderStrategy
- Capacity
Provider 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.
- Capacity
Provider 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.
- capacity
Provider 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.
- capacity
Provider 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
Package Details
- Repository
- https://github.com/pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
awsTerraform Provider.