-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathecs-cluster.yml
53 lines (46 loc) · 1.51 KB
/
ecs-cluster.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
AWSTemplateFormatVersion: 2010-09-09
Description: Script to create a ECS cluster
Metadata:
AWS::CloudFormation::Interface:
ParameterGroups:
- Label:
default: ECS Cluster Configuration
Parameters:
- ECSClusterName
- ECSClusterEnvironment
ParameterLabels:
ECSClusterName:
default: Cluster Name
ECSClusterEnvironment:
default: Cluster Environment
Parameters:
ECSClusterName:
Type: String
Default: ch-dev
Description: Enter a cluster name.
AllowedPattern: ^[0-9a-zA-Z]+([0-9a-zA-Z-]*[0-9a-zA-Z])*$
ConstraintDescription: Cluster name can include numbers, lowercase letters, uppercase letters, and hyphens (-). It cannot start or end with a hyphen (-).
ECSClusterEnvironment:
Type: String
Default: testing
Description: Enter a cluster environment.
AllowedPattern: ^[0-9a-zA-Z]+([0-9a-zA-Z-]*[0-9a-zA-Z])*$
ConstraintDescription: Cluster environment can include numbers, lowercase letters, uppercase letters, and hyphens (-). It cannot start or end with a hyphen (-).
Resources:
ECSCluster:
Type: AWS::ECS::Cluster
Properties:
ClusterName:
Ref: ECSClusterName
CapacityProviders:
- FARGATE
- FARGATE_SPOT
DefaultCapacityProviderStrategy:
- CapacityProvider: FARGATE
Weight: 1
- CapacityProvider: FARGATE_SPOT
Weight: 1
Tags:
- Key: environment
Value:
Ref: ECSClusterEnvironment