|
1 | 1 | { |
2 | 2 | "AWSTemplateFormatVersion": "2010-09-09", |
3 | | - "Description": "QS(0037) HashiCorp Consul License: Apache 2.0 (Please do not remove) Oct,26,2016", |
| 3 | + "Description": "QS(0037) HashiCorp Consul License: Apache 2.0 (Please do not remove) Oct,27,2016", |
4 | 4 | "Parameters": { |
| 5 | + "AvailabilityZones": { |
| 6 | + "Description": "List of Availability Zones to use for the subnets in the VPC. Note: The logical order is preserved and only 2 AZs are used for this deployment.", |
| 7 | + "Type": "List<AWS::EC2::AvailabilityZone::Name>" |
| 8 | + }, |
5 | 9 | "KeyPair": { |
6 | 10 | "Description": "Name of an existing EC2 KeyPair to enable SSH access to the instances", |
7 | 11 | "Type": "AWS::EC2::KeyPair::KeyName", |
|
157 | 161 | }] |
158 | 162 | } |
159 | 163 | }, |
| 164 | + "VaultSecGroup": { |
| 165 | + "Type": "AWS::EC2::SecurityGroup", |
| 166 | + "Properties": { |
| 167 | + "GroupDescription": "Enables SSH access to the Consul Master.", |
| 168 | + "VpcId": { |
| 169 | + "Ref": "VPCID" |
| 170 | + }, |
| 171 | + "SecurityGroupIngress": [ |
| 172 | + { |
| 173 | + "IpProtocol": "tcp", |
| 174 | + "FromPort": "22", |
| 175 | + "ToPort": "22", |
| 176 | + "CidrIp": { |
| 177 | + "Ref": "AccessCIDR" |
| 178 | + } |
| 179 | + }, |
| 180 | + { |
| 181 | + "IpProtocol": "tcp", |
| 182 | + "FromPort": "0", |
| 183 | + "ToPort": "65535", |
| 184 | + "CidrIp": { |
| 185 | + "Ref": "VPCCIDR" |
| 186 | + } |
| 187 | + } |
| 188 | + ], |
| 189 | + "Tags": [{ |
| 190 | + "Key": "Name", |
| 191 | + "Value": "VaultSecGroup" |
| 192 | + }] |
| 193 | + } |
| 194 | + }, |
160 | 195 | "Vault1MemoryAlarm": { |
161 | 196 | "Type": "AWS::CloudWatch::Alarm", |
162 | 197 | "Properties": { |
|
342 | 377 | } |
343 | 378 | }, |
344 | 379 | "Properties": { |
345 | | - "AvailabilityZone": { |
346 | | - "Fn::Select": [ |
347 | | - "0", { |
348 | | - "Fn::GetAZs": { |
349 | | - "Ref": "AWS::Region" |
350 | | - } |
351 | | - } |
352 | | - ] |
353 | | - }, |
354 | 380 | "InstanceType": { |
355 | 381 | "Ref": "VaultInstanceType" |
356 | 382 | }, |
357 | 383 | "KeyName": { |
358 | 384 | "Ref": "KeyPair" |
359 | 385 | }, |
| 386 | + "NetworkInterfaces": [{ |
| 387 | + "DeleteOnTermination": "true", |
| 388 | + "DeviceIndex": 0, |
| 389 | + "SubnetId": { |
| 390 | + "Ref": "PrivateSubnet1ID" |
| 391 | + }, |
| 392 | + "GroupSet": [{ |
| 393 | + "Ref": "VaultSecGroup" |
| 394 | + }] |
| 395 | + }], |
360 | 396 | "ImageId": { |
361 | 397 | "Fn::FindInMap": [ |
362 | 398 | "AWSAMIRegionMap", { |
|
542 | 578 | } |
543 | 579 | }, |
544 | 580 | "Properties": { |
545 | | - "AvailabilityZone": { |
546 | | - "Fn::Select": [ |
547 | | - "1", { |
548 | | - "Fn::GetAZs": { |
549 | | - "Ref": "AWS::Region" |
550 | | - } |
551 | | - } |
552 | | - ] |
553 | | - }, |
554 | 581 | "InstanceType": { |
555 | 582 | "Ref": "VaultInstanceType" |
556 | 583 | }, |
557 | 584 | "KeyName": { |
558 | 585 | "Ref": "KeyPair" |
559 | 586 | }, |
| 587 | + "NetworkInterfaces": [{ |
| 588 | + "DeleteOnTermination": "true", |
| 589 | + "DeviceIndex": 0, |
| 590 | + "SubnetId": { |
| 591 | + "Ref": "PrivateSubnet2ID" |
| 592 | + }, |
| 593 | + "GroupSet": [{ |
| 594 | + "Ref": "VaultSecGroup" |
| 595 | + }] |
| 596 | + }], |
560 | 597 | "ImageId": { |
561 | 598 | "Fn::FindInMap": [ |
562 | 599 | "AWSAMIRegionMap", { |
|
0 commit comments