11AWSTemplateFormatVersion : ' 2010-09-09'
2- Description : Chef Server Elasticsearch 5.0.3
2+ Description : Chef Server Elasticsearch 5.0.4
33
44Parameters :
55 # Required Parameters
@@ -21,20 +21,35 @@ Parameters:
2121 Description : The Instance type to use for ElasticSearch instances (Note, must have ephemeral storage, the instance type affects the total amount of elasticsearch storage. i3 strongly recommended)
2222 Type : String
2323 Default : ' i3.large.elasticsearch'
24- AllowedValues : [
25- ' i3.large.elasticsearch' , 'i3.xlarge.elasticsearch', 'i3.2xlarge.elasticsearch', 'i3.4xlarge.elasticsearch', 'i3.8xlarge.elasticsearch', 'i3.16xlarge.elasticsearch',
26- ' i2.xlarge.elasticsearch' , 'i2.2xlarge.elasticsearch',
27- ' m3.medium.elasticsearch' , 'm3.large.elasticsearch', 'm3.xlarge.elasticsearch', 'm3.medium.elasticsearch',
28- ' r3.large.elasticsearch' , 'r3.xlarge.elasticsearch', 'r3.2xlarge.elasticsearch', 'r3.4xlarge.elasticsearch', 'r3.8xlarge.elasticsearch' ]
24+ AllowedValues :
25+ [
26+ ' i3.large.elasticsearch' ,
27+ ' i3.xlarge.elasticsearch' ,
28+ ' i3.2xlarge.elasticsearch' ,
29+ ' i3.4xlarge.elasticsearch' ,
30+ ' i3.8xlarge.elasticsearch' ,
31+ ' i3.16xlarge.elasticsearch' ,
32+ ' i2.xlarge.elasticsearch' ,
33+ ' i2.2xlarge.elasticsearch' ,
34+ ' m3.medium.elasticsearch' ,
35+ ' m3.large.elasticsearch' ,
36+ ' m3.xlarge.elasticsearch' ,
37+ ' m3.medium.elasticsearch' ,
38+ ' r3.large.elasticsearch' ,
39+ ' r3.xlarge.elasticsearch' ,
40+ ' r3.2xlarge.elasticsearch' ,
41+ ' r3.4xlarge.elasticsearch' ,
42+ ' r3.8xlarge.elasticsearch' ,
43+ ]
2944 ElasticSearchVersion :
3045 Description : Version of ElasticSearch to use
3146 Type : String
3247 Default : ' 5.6'
3348 AllowedValues :
34- - ' 2.3'
35- - ' 5.3'
36- - ' 5.5'
37- - ' 5.6'
49+ - ' 2.3'
50+ - ' 5.3'
51+ - ' 5.5'
52+ - ' 5.6'
3853 ElasticSearchShardCount :
3954 Description : Number of ElasticSearch hosts to provision at launch (3 recommended, 2 provides HA)
4055 Default : 3
@@ -54,16 +69,15 @@ Parameters:
5469 Type : String
5570
5671Conditions :
57- 2ZoneES :
58- !Equals [!Ref ElasticSearchShardCount, 2]
72+ 2ZoneES : !Equals [!Ref ElasticSearchShardCount, 2]
5973
6074Resources :
61- # ElasticSearch
62- # ########################################################################################
75+ # ElasticSearch
76+ # ########################################################################################
6377 ESSecurityGroup :
6478 Type : AWS::EC2::SecurityGroup
6579 Properties :
66- GroupDescription : " Elasticsearch Frontend Access"
80+ GroupDescription : ' Elasticsearch Frontend Access'
6781 VpcId : !Ref VPC
6882 SecurityGroupIngress :
6983 - IpProtocol : tcp
@@ -77,40 +91,49 @@ Resources:
7791 ElasticsearchVersion : !Ref ElasticSearchVersion
7892 ElasticsearchClusterConfig :
7993 InstanceCount : !Sub ${ElasticSearchShardCount}
80- ZoneAwarenessEnabled : !If [2ZoneES, true, false]
94+ ZoneAwarenessEnabled : true
95+ ZoneAwarenessConfig :
96+ AvailabilityZoneCount : !If [2ZoneES, 2, 3]
8197 InstanceType : !Ref ElasticSearchInstanceType
8298 DedicatedMasterEnabled : false
8399 SnapshotOptions :
84100 AutomatedSnapshotStartHour : 0
85101 AccessPolicies :
86- Version : " 2012-10-17"
102+ Version : ' 2012-10-17'
87103 Statement :
88- - Effect : " Allow"
104+ - Effect : ' Allow'
89105 Principal :
90106 AWS : !Ref ChefRole
91- Action : " es:*"
92- Resource : !Sub " arn:aws:es:${AWS::Region}:${AWS::AccountId}:*"
107+ Action : ' es:*'
108+ Resource : !Sub ' arn:aws:es:${AWS::Region}:${AWS::AccountId}:*'
93109 VPCOptions :
94- SubnetIds : !If [
95- 2ZoneES,
96- [ !Select [ 0, !Ref ChefServerSubnets ], !Select [ 1, !Ref ChefServerSubnets ]],
97- [ !Select [ 0, !Ref ChefServerSubnets ] ]
98- ]
110+ SubnetIds :
111+ !If [
112+ 2ZoneES,
113+ [
114+ !Select [0, !Ref ChefServerSubnets],
115+ !Select [1, !Ref ChefServerSubnets],
116+ ],
117+ [
118+ !Select [0, !Ref ChefServerSubnets],
119+ !Select [1, !Ref ChefServerSubnets],
120+ !Select [2, !Ref ChefServerSubnets],
121+ ],
122+ ]
99123 SecurityGroupIds :
100124 - !Ref ESSecurityGroup
101125 AdvancedOptions :
102- rest.action.multi.allow_explicit_index : " true"
126+ rest.action.multi.allow_explicit_index : ' true'
103127 Tags :
104- - Key : Name
105- Value : !Sub ${AWS::StackName}-ES
106- - Key : X-Dept
107- Value : !Ref ContactDept
108- - Key : X-Contact
109- Value : !Ref ContactEmail
110-
128+ - Key : Name
129+ Value : !Sub ${AWS::StackName}-ES
130+ - Key : X-Dept
131+ Value : !Ref ContactDept
132+ - Key : X-Contact
133+ Value : !Ref ContactEmail
111134
112- # Monitoring
113- # ########################################################################################
135+ # Monitoring
136+ # ########################################################################################
114137 ESClusterRed :
115138 Type : AWS::CloudWatch::Alarm
116139 Properties :
@@ -130,7 +153,6 @@ Resources:
130153 - Name : ClientId
131154 Value : !Ref AWS::AccountId
132155
133-
134156 ESClusterYellow :
135157 Type : AWS::CloudWatch::Alarm
136158 Properties :
0 commit comments