@@ -15,8 +15,9 @@ const Parameters = {
15
15
Type : 'String'
16
16
} ,
17
17
NetworkEnvironment : {
18
+ Description : "Legacy parameter aka Deployment Environment" ,
18
19
Type :'String' ,
19
- AllowedValues : [ 'staging' , 'production' ]
20
+ AllowedValues : [ 'demo' , ' staging', 'production' ]
20
21
} ,
21
22
AutoscalingPolicy : {
22
23
Type : 'String' ,
@@ -51,7 +52,7 @@ const Parameters = {
51
52
DatabaseEngineVersion : {
52
53
Description : 'AWS PostgreSQL Engine version' ,
53
54
Type : 'String' ,
54
- Default : '11.19 '
55
+ Default : '13.10 '
55
56
} ,
56
57
DatabaseInstanceType : {
57
58
Description : 'Database instance type' ,
@@ -174,6 +175,11 @@ const Parameters = {
174
175
Description : 'Org Code' ,
175
176
Type : 'String'
176
177
} ,
178
+ TaskingManagerOrgDomain : {
179
+ Description : 'FQDN for Organisation used as suffix for DNS entries' ,
180
+ Type : 'String' ,
181
+ Default : 'hotosm.org'
182
+ } ,
177
183
SentryBackendDSN : {
178
184
Description : "DSN for sentry" ,
179
185
Type : 'String'
@@ -560,13 +566,42 @@ const Resources = {
560
566
Type : 'AWS::ElasticLoadBalancingV2::LoadBalancer' ,
561
567
Properties : {
562
568
Name : cf . stackName ,
569
+ IpAddressType : 'dualstack' ,
570
+ LoadBalancerAttributes : [
571
+ { "Key" : "routing.http2.enabled" , "Value" : "true" } ,
572
+ { "Key" : "idle_timeout.timeout_seconds" , "Value" : "180" } ,
573
+ ] ,
563
574
SecurityGroups : [ cf . importValue ( cf . join ( '-' , [ 'hotosm-network-production' , cf . ref ( 'NetworkEnvironment' ) , 'elbs-security-group' , cf . region ] ) ) ] ,
564
575
Subnets : cf . ref ( 'ELBSubnets' ) ,
565
576
Type : 'application' ,
566
- IpAddressType : 'dualstack' ,
567
577
Tags : [ { "Key" : "stack_name" , "Value" : cf . stackName } ]
568
578
}
569
579
} ,
580
+ BackendAPIDNSEntries : {
581
+ Type : "AWS::Route53::RecordSetGroup" ,
582
+ Properties : {
583
+ Comment : "DNS records pointing to API backend" ,
584
+ HostedZoneId : 'Z05223682CWA7KUW593DH' , // NOTE: tasks.hotosm.org HostedZone ID on Route53
585
+ RecordSets : [
586
+ {
587
+ Name : cf . join ( '.' , [ cf . join ( '-' , [ 'api' , cf . ref ( 'NetworkEnvironment' ) ] ) , 'tasks.hotosm.org' ] ) ,
588
+ Type : 'A' ,
589
+ AliasTarget : {
590
+ DNSName : cf . getAtt ( 'TaskingManagerLoadBalancer' , 'DNSName' ) ,
591
+ HostedZoneId : cf . getAtt ( 'TaskingManagerLoadBalancer' , 'CanonicalHostedZoneID' ) // NOTE: AWS Route53 Canonical HostedZone ID
592
+ }
593
+ } ,
594
+ {
595
+ Name : cf . join ( '.' , [ cf . join ( '-' , [ 'api' , cf . ref ( 'NetworkEnvironment' ) ] ) , 'tasks.hotosm.org' ] ) ,
596
+ Type : 'AAAA' ,
597
+ AliasTarget : {
598
+ DNSName : cf . getAtt ( 'TaskingManagerLoadBalancer' , 'DNSName' ) ,
599
+ HostedZoneId : cf . getAtt ( 'TaskingManagerLoadBalancer' , 'CanonicalHostedZoneID' ) // NOTE: AWS Route53 Canonical HostedZone ID
600
+ } ,
601
+ }
602
+ ]
603
+ }
604
+ } ,
570
605
TaskingManagerLoadBalancerRoute53 : {
571
606
Type : 'AWS::Route53::RecordSet' ,
572
607
Properties : {
@@ -755,19 +790,6 @@ const Resources = {
755
790
}
756
791
}
757
792
} ,
758
- TaskingManagerRoute53 : {
759
- Type : 'AWS::Route53::RecordSet' ,
760
- Condition : 'IsHOTOSMUrl' ,
761
- Properties : {
762
- Name : 't0.hotosm.org' ,
763
- Type : 'A' ,
764
- AliasTarget : {
765
- DNSName : cf . getAtt ( 'TaskingManagerReactCloudfront' , 'DomainName' ) ,
766
- HostedZoneId : 'Z2FDTNDATAQYW2'
767
- } ,
768
- HostedZoneId : 'Z2O929GW6VWG99' ,
769
- }
770
- } ,
771
793
TaskingManagerDNSEntries : {
772
794
Type : "AWS::Route53::RecordSetGroup" ,
773
795
Condition : "IsHOTOSMUrl" ,
0 commit comments