|
45 | 45 | "default": "AWS Quick Start Configuration" |
46 | 46 | }, |
47 | 47 | "Parameters": [ |
48 | | - "BuildBucket" |
| 48 | + "QSS3BucketName", |
| 49 | + "QSS3KeyPrefix" |
49 | 50 | ] |
50 | 51 | } |
51 | 52 | ], |
52 | 53 | "ParameterLabels": { |
53 | 54 | "BastionSecurityGroupID": { |
54 | 55 | "default": "Bastion Security Group ID" |
55 | 56 | }, |
56 | | - "BuildBucket": { |
57 | | - "default": "Build Bucket" |
58 | | - }, |
59 | 57 | "ClusterReplicaSetCount": { |
60 | 58 | "default": "Cluster Replica Set Count" |
61 | 59 | }, |
|
80 | 78 | "PrimaryNodeSubnet": { |
81 | 79 | "default": "Primary Node Subnet" |
82 | 80 | }, |
| 81 | + "QSS3BucketName": { |
| 82 | + "default": "Quick Start S3 Bucket Name" |
| 83 | + }, |
| 84 | + "QSS3KeyPrefix": { |
| 85 | + "default": "Quick Start S3 Key Prefix" |
| 86 | + }, |
83 | 87 | "ReplicaShardIndex": { |
84 | 88 | "default": "Replica Shard Index" |
85 | 89 | }, |
|
146 | 150 | "Type": "String", |
147 | 151 | "Default": "0" |
148 | 152 | }, |
149 | | - "BuildBucket": { |
150 | | - "Description": "Main Bucket where the templates/scripts are installed. Do not change.", |
| 153 | + "QSS3BucketName": { |
| 154 | + "AllowedPattern": "^[0-9a-zA-Z]+([0-9a-zA-Z-]*[0-9a-zA-Z])*$", |
| 155 | + "Default": "quickstart-reference", |
| 156 | + "Type": "String", |
| 157 | + "ConstraintDescription": "Quick Start bucket name can include numbers, lowercase letters, uppercase letters, and hyphens (-). It cannot start or end with a hyphen (-).", |
| 158 | + "Description": "S3 bucket name for the Quick Start assets. Quick Start bucket name can include numbers, lowercase letters, uppercase letters, and hyphens (-). It cannot start or end with a hyphen (-)." |
| 159 | + }, |
| 160 | + "QSS3KeyPrefix": { |
| 161 | + "AllowedPattern": "^[0-9a-zA-Z-/]*$", |
| 162 | + "Default": "mongodb/latest/", |
151 | 163 | "Type": "String", |
152 | | - "Default": "quickstart-reference/mongodb/latest" |
| 164 | + "ConstraintDescription": "Quick Start key prefix can include numbers, lowercase letters, uppercase letters, hyphens (-), and forward slash (/).", |
| 165 | + "Description": "S3 key prefix for the Quick Start assets. Quick Start key prefix can include numbers, lowercase letters, uppercase letters, hyphens (-), and forward slash (/). It cannot start or end with a hyphen (-)." |
153 | 166 | }, |
154 | 167 | "KeyPairName": { |
155 | 168 | "Type": "AWS::EC2::KeyPair::KeyName", |
|
233 | 246 | }, |
234 | 247 | "3" |
235 | 248 | ] |
| 249 | + }, |
| 250 | + "GovCloudCondition": { |
| 251 | + "Fn::Equals": [ |
| 252 | + { |
| 253 | + "Ref": "AWS::Region" |
| 254 | + }, |
| 255 | + "us-gov-west-1" |
| 256 | + ] |
236 | 257 | } |
237 | 258 | }, |
238 | 259 | "Mappings": { |
|
282 | 303 | "us-west-2": { |
283 | 304 | "AMZNLINUX": "ami-4836a428" |
284 | 305 | } |
285 | | - }, |
286 | | - "AWSInfoRegionMap": { |
287 | | - "ap-northeast-1": { |
288 | | - "Partition": "aws", |
289 | | - "QuickStartS3URL": "https://s3.amazonaws.com" |
290 | | - }, |
291 | | - "ap-northeast-2": { |
292 | | - "Partition": "aws", |
293 | | - "QuickStartS3URL": "https://s3.amazonaws.com" |
294 | | - }, |
295 | | - "ap-south-1": { |
296 | | - "Partition": "aws", |
297 | | - "QuickStartS3URL": "https://s3.amazonaws.com" |
298 | | - }, |
299 | | - "ap-southeast-1": { |
300 | | - "Partition": "aws", |
301 | | - "QuickStartS3URL": "https://s3.amazonaws.com" |
302 | | - }, |
303 | | - "ap-southeast-2": { |
304 | | - "Partition": "aws", |
305 | | - "QuickStartS3URL": "https://s3.amazonaws.com" |
306 | | - }, |
307 | | - "ca-central-1": { |
308 | | - "Partition": "aws", |
309 | | - "QuickStartS3URL": "https://s3.amazonaws.com" |
310 | | - }, |
311 | | - "eu-central-1": { |
312 | | - "Partition": "aws", |
313 | | - "QuickStartS3URL": "https://s3.amazonaws.com" |
314 | | - }, |
315 | | - "eu-west-1": { |
316 | | - "Partition": "aws", |
317 | | - "QuickStartS3URL": "https://s3.amazonaws.com" |
318 | | - }, |
319 | | - "eu-west-2": { |
320 | | - "Partition": "aws", |
321 | | - "QuickStartS3URL": "https://s3.amazonaws.com" |
322 | | - }, |
323 | | - "sa-east-1": { |
324 | | - "Partition": "aws", |
325 | | - "QuickStartS3URL": "https://s3.amazonaws.com" |
326 | | - }, |
327 | | - "us-east-1": { |
328 | | - "Partition": "aws", |
329 | | - "QuickStartS3URL": "https://s3.amazonaws.com" |
330 | | - }, |
331 | | - "us-east-2": { |
332 | | - "Partition": "aws", |
333 | | - "QuickStartS3URL": "https://s3.amazonaws.com" |
334 | | - }, |
335 | | - "us-gov-west-1": { |
336 | | - "Partition": "aws-us-gov", |
337 | | - "QuickStartS3URL": "https://s3-us-gov-west-1.amazonaws.com" |
338 | | - }, |
339 | | - "us-west-1": { |
340 | | - "Partition": "aws", |
341 | | - "QuickStartS3URL": "https://s3.amazonaws.com" |
342 | | - }, |
343 | | - "us-west-2": { |
344 | | - "Partition": "aws", |
345 | | - "QuickStartS3URL": "https://s3.amazonaws.com" |
346 | | - } |
347 | 306 | } |
348 | 307 | }, |
349 | 308 | "Resources": { |
|
507 | 466 | "Type": "AWS::CloudFormation::Stack", |
508 | 467 | "Properties": { |
509 | 468 | "TemplateURL": { |
510 | | - "Fn::Join": [ |
511 | | - "/", |
512 | | - [ |
513 | | - { |
514 | | - "Fn::FindInMap": [ |
515 | | - "AWSInfoRegionMap", |
516 | | - { |
517 | | - "Ref": "AWS::Region" |
518 | | - }, |
519 | | - "QuickStartS3URL" |
| 469 | + "Fn::Sub": [ |
| 470 | + "https://${QSS3BucketName}.${QSS3Region}.amazonaws.com/${QSS3KeyPrefix}templates/mongodb-node.template", |
| 471 | + { |
| 472 | + "QSS3Region": { |
| 473 | + "Fn::If": [ |
| 474 | + "GovCloudCondition", |
| 475 | + "s3-us-gov-west-1", |
| 476 | + "s3" |
520 | 477 | ] |
521 | | - }, |
522 | | - { |
523 | | - "Ref": "BuildBucket" |
524 | | - }, |
525 | | - "templates/mongodb-node.template" |
526 | | - ] |
| 478 | + } |
| 479 | + } |
527 | 480 | ] |
528 | 481 | }, |
529 | 482 | "Parameters": { |
530 | | - "BuildBucket": { |
531 | | - "Ref": "BuildBucket" |
| 483 | + "QSS3BucketName": { |
| 484 | + "Ref": "QSS3BucketName" |
| 485 | + }, |
| 486 | + "QSS3KeyPrefix": { |
| 487 | + "Ref": "QSS3KeyPrefix" |
532 | 488 | }, |
533 | 489 | "ClusterReplicaSetCount": { |
534 | 490 | "Ref": "ClusterReplicaSetCount" |
|
616 | 572 | "Type": "AWS::CloudFormation::Stack", |
617 | 573 | "Properties": { |
618 | 574 | "TemplateURL": { |
619 | | - "Fn::Join": [ |
620 | | - "/", |
621 | | - [ |
622 | | - { |
623 | | - "Fn::FindInMap": [ |
624 | | - "AWSInfoRegionMap", |
625 | | - { |
626 | | - "Ref": "AWS::Region" |
627 | | - }, |
628 | | - "QuickStartS3URL" |
| 575 | + "Fn::Sub": [ |
| 576 | + "https://${QSS3BucketName}.${QSS3Region}.amazonaws.com/${QSS3KeyPrefix}templates/mongodb-node.template", |
| 577 | + { |
| 578 | + "QSS3Region": { |
| 579 | + "Fn::If": [ |
| 580 | + "GovCloudCondition", |
| 581 | + "s3-us-gov-west-1", |
| 582 | + "s3" |
629 | 583 | ] |
630 | | - }, |
631 | | - { |
632 | | - "Ref": "BuildBucket" |
633 | | - }, |
634 | | - "templates/mongodb-node.template" |
635 | | - ] |
| 584 | + } |
| 585 | + } |
636 | 586 | ] |
637 | 587 | }, |
638 | 588 | "Parameters": { |
639 | | - "BuildBucket": { |
640 | | - "Ref": "BuildBucket" |
| 589 | + "QSS3BucketName": { |
| 590 | + "Ref": "QSS3BucketName" |
| 591 | + }, |
| 592 | + "QSS3KeyPrefix": { |
| 593 | + "Ref": "QSS3KeyPrefix" |
641 | 594 | }, |
642 | 595 | "ClusterReplicaSetCount": { |
643 | 596 | "Ref": "ClusterReplicaSetCount" |
|
726 | 679 | "Type": "AWS::CloudFormation::Stack", |
727 | 680 | "Properties": { |
728 | 681 | "TemplateURL": { |
729 | | - "Fn::Join": [ |
730 | | - "/", |
731 | | - [ |
732 | | - { |
733 | | - "Fn::FindInMap": [ |
734 | | - "AWSInfoRegionMap", |
735 | | - { |
736 | | - "Ref": "AWS::Region" |
737 | | - }, |
738 | | - "QuickStartS3URL" |
| 682 | + "Fn::Sub": [ |
| 683 | + "https://${QSS3BucketName}.${QSS3Region}.amazonaws.com/${QSS3KeyPrefix}templates/mongodb-node.template", |
| 684 | + { |
| 685 | + "QSS3Region": { |
| 686 | + "Fn::If": [ |
| 687 | + "GovCloudCondition", |
| 688 | + "s3-us-gov-west-1", |
| 689 | + "s3" |
739 | 690 | ] |
740 | | - }, |
741 | | - { |
742 | | - "Ref": "BuildBucket" |
743 | | - }, |
744 | | - "templates/mongodb-node.template" |
745 | | - ] |
| 691 | + } |
| 692 | + } |
746 | 693 | ] |
747 | 694 | }, |
748 | 695 | "Parameters": { |
749 | | - "BuildBucket": { |
750 | | - "Ref": "BuildBucket" |
| 696 | + "QSS3BucketName": { |
| 697 | + "Ref": "QSS3BucketName" |
| 698 | + }, |
| 699 | + "QSS3KeyPrefix": { |
| 700 | + "Ref": "QSS3KeyPrefix" |
751 | 701 | }, |
752 | 702 | "ClusterReplicaSetCount": { |
753 | 703 | "Ref": "ClusterReplicaSetCount" |
|
0 commit comments