Skip to content

Commit

Permalink
Merge branch 'main' into dovetail-app-domains
Browse files Browse the repository at this point in the history
  • Loading branch information
farski committed Oct 16, 2023
2 parents 82a82b7 + 39dbe5f commit 5c902c7
Show file tree
Hide file tree
Showing 6 changed files with 63 additions and 32 deletions.
61 changes: 33 additions & 28 deletions dns/prx.org-hosted_zone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -212,12 +212,12 @@ Resources:
# blog.prx.org
- AliasTarget:
DNSName: d1uuj4xcfminz6.cloudfront.net.
HostedZoneId: Z2FDTNDATAQYW2
HostedZoneId: Z2FDTNDATAQYW2 # Global CloudFront hosted zone ID
Name: !Sub blog.${Domain}
Type: A
- AliasTarget:
DNSName: d1uuj4xcfminz6.cloudfront.net.
HostedZoneId: Z2FDTNDATAQYW2
HostedZoneId: Z2FDTNDATAQYW2 # Global CloudFront hosted zone ID
Name: !Sub blog.${Domain}
Type: AAAA
# catapult.prx.org
Expand All @@ -231,12 +231,17 @@ Resources:
HostedZoneId: Z2FDTNDATAQYW2 # Global CloudFront hosted zone ID
Name: !Sub catapult.${Domain}
Type: AAAA
# dovetail.prx.org
- Name: !Sub dovetail.${Domain}
ResourceRecords:
- prx.github.io.
TTL: "300"
Type: CNAME
# # dovetail.prx.org
- AliasTarget:
DNSName: d8u55dsm5y1tq.cloudfront.net.
HostedZoneId: Z2FDTNDATAQYW2 # Global CloudFront hosted zone ID
Name: !Sub dovetail.${Domain}
Type: A
- AliasTarget:
DNSName: d8u55dsm5y1tq.cloudfront.net.
HostedZoneId: Z2FDTNDATAQYW2 # Global CloudFront hosted zone ID
Name: !Sub dovetail.${Domain}
Type: AAAA
# give.prx.org
- Name: !Sub give.${Domain}
ResourceRecords:
Expand Down Expand Up @@ -325,12 +330,12 @@ Resources:
# transistor.prx.org
- AliasTarget:
DNSName: d3nn7rnvuqkyn9.cloudfront.net.
HostedZoneId: Z2FDTNDATAQYW2
HostedZoneId: Z2FDTNDATAQYW2 # Global CloudFront hosted zone ID
Name: !Sub transistor.${Domain}
Type: A
- AliasTarget:
DNSName: d3nn7rnvuqkyn9.cloudfront.net.
HostedZoneId: Z2FDTNDATAQYW2
HostedZoneId: Z2FDTNDATAQYW2 # Global CloudFront hosted zone ID
Name: !Sub transistor.${Domain}
Type: AAAA
# youthradioleaders.prx.org
Expand All @@ -353,12 +358,12 @@ Resources:
# prx.org
- AliasTarget:
DNSName: d1txozk2299k6z.cloudfront.net
HostedZoneId: Z2FDTNDATAQYW2
HostedZoneId: Z2FDTNDATAQYW2 # Global CloudFront hosted zone ID
Name: !Ref Domain
Type: A
- AliasTarget:
DNSName: d1txozk2299k6z.cloudfront.net
HostedZoneId: Z2FDTNDATAQYW2
HostedZoneId: Z2FDTNDATAQYW2 # Global CloudFront hosted zone ID
Name: !Ref Domain
Type: AAAA
# api.prx.org
Expand All @@ -370,12 +375,12 @@ Resources:
# assets1.prx.org
- AliasTarget:
DNSName: d3qpqdoc1119ok.cloudfront.net
HostedZoneId: Z2FDTNDATAQYW2
HostedZoneId: Z2FDTNDATAQYW2 # Global CloudFront hosted zone ID
Name: !Sub assets1.${Domain}
Type: A
- AliasTarget:
DNSName: d3qpqdoc1119ok.cloudfront.net
HostedZoneId: Z2FDTNDATAQYW2
HostedZoneId: Z2FDTNDATAQYW2 # Global CloudFront hosted zone ID
Name: !Sub assets1.${Domain}
Type: AAAA
# assets2.prx.org
Expand Down Expand Up @@ -415,12 +420,12 @@ Resources:
# beta.prx.org
- AliasTarget:
DNSName: d2p9vihsjy95d2.cloudfront.net
HostedZoneId: Z2FDTNDATAQYW2
HostedZoneId: Z2FDTNDATAQYW2 # Global CloudFront hosted zone ID
Name: !Sub beta.${Domain}
Type: A
- AliasTarget:
DNSName: d2p9vihsjy95d2.cloudfront.net
HostedZoneId: Z2FDTNDATAQYW2
HostedZoneId: Z2FDTNDATAQYW2 # Global CloudFront hosted zone ID
Name: !Sub beta.${Domain}
Type: AAAA
# castle.prx.org
Expand Down Expand Up @@ -1016,62 +1021,62 @@ Resources:
Name: !Sub cdn-exchange.${Domain}
AliasTarget:
DNSName: d3qpqdoc1119ok.cloudfront.net
HostedZoneId: Z2FDTNDATAQYW2
HostedZoneId: Z2FDTNDATAQYW2 # Global CloudFront hosted zone ID
- Type: AAAA
Name: !Sub cdn-exchange.${Domain}
AliasTarget:
DNSName: d3qpqdoc1119ok.cloudfront.net
HostedZoneId: Z2FDTNDATAQYW2
HostedZoneId: Z2FDTNDATAQYW2 # Global CloudFront hosted zone ID
- Type: A
Name: !Sub cdn-reveal.${Domain}
AliasTarget:
DNSName: d3ojv6bn0r3eph.cloudfront.net.
HostedZoneId: Z2FDTNDATAQYW2
HostedZoneId: Z2FDTNDATAQYW2 # Global CloudFront hosted zone ID
- Type: AAAA
Name: !Sub cdn-reveal.${Domain}
AliasTarget:
DNSName: d3ojv6bn0r3eph.cloudfront.net.
HostedZoneId: Z2FDTNDATAQYW2
HostedZoneId: Z2FDTNDATAQYW2 # Global CloudFront hosted zone ID
- Type: A
Name: !Sub cdn.reveal.${Domain}
AliasTarget:
DNSName: d3ojv6bn0r3eph.cloudfront.net.
HostedZoneId: Z2FDTNDATAQYW2
HostedZoneId: Z2FDTNDATAQYW2 # Global CloudFront hosted zone ID
- Type: AAAA
Name: !Sub cdn.reveal.${Domain}
AliasTarget:
DNSName: d3ojv6bn0r3eph.cloudfront.net.
HostedZoneId: Z2FDTNDATAQYW2
HostedZoneId: Z2FDTNDATAQYW2 # Global CloudFront hosted zone ID
- Type: A
Name: !Sub cdn-allusionist.${Domain}
AliasTarget:
DNSName: d2ay8vht0p7hxt.cloudfront.net.
HostedZoneId: Z2FDTNDATAQYW2
HostedZoneId: Z2FDTNDATAQYW2 # Global CloudFront hosted zone ID
- Type: AAAA
Name: !Sub cdn-allusionist.${Domain}
AliasTarget:
DNSName: d2ay8vht0p7hxt.cloudfront.net.
HostedZoneId: Z2FDTNDATAQYW2
HostedZoneId: Z2FDTNDATAQYW2 # Global CloudFront hosted zone ID
- Type: A
Name: !Sub cdn.allusionist.${Domain}
AliasTarget:
DNSName: d2ay8vht0p7hxt.cloudfront.net.
HostedZoneId: Z2FDTNDATAQYW2
HostedZoneId: Z2FDTNDATAQYW2 # Global CloudFront hosted zone ID
- Type: AAAA
Name: !Sub cdn.allusionist.${Domain}
AliasTarget:
DNSName: d2ay8vht0p7hxt.cloudfront.net.
HostedZoneId: Z2FDTNDATAQYW2
HostedZoneId: Z2FDTNDATAQYW2 # Global CloudFront hosted zone ID
- Type: A
Name: !Sub themoth.${Domain}
AliasTarget:
DNSName: dwa2z82v27lla.cloudfront.net.
HostedZoneId: Z2FDTNDATAQYW2
HostedZoneId: Z2FDTNDATAQYW2 # Global CloudFront hosted zone ID
- Type: AAAA
Name: !Sub themoth.${Domain}
AliasTarget:
DNSName: dwa2z82v27lla.cloudfront.net.
HostedZoneId: Z2FDTNDATAQYW2
HostedZoneId: Z2FDTNDATAQYW2 # Global CloudFront hosted zone ID
Legacy:
Type: AWS::Route53::RecordSetGroup
Properties:
Expand Down
2 changes: 2 additions & 0 deletions spire/templates/apps-300A.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ Parameters:
AdFilesHostname: { Type: String }
AuguryHostname: { Type: String }
FeederHostname: { Type: String }
MetricsHostname: { Type: String }
DovetailCdnHostname: { Type: String }
CmsHostname: { Type: String }
TheCountHostname: { Type: String }
Expand Down Expand Up @@ -207,6 +208,7 @@ Resources:
CloudWatchAlarmTaggerServiceToken: !Ref CloudWatchAlarmTaggerServiceToken
CastleHostname: !Ref CastleHostname
IdHostname: !Ref IdHostname
MetricsHostname: !Ref MetricsHostname
Tags:
- { Key: prx:meta:tagging-version, Value: "2021-04-07" }
- { Key: prx:cloudformation:stack-name, Value: !Ref AWS::StackName }
Expand Down
22 changes: 22 additions & 0 deletions spire/templates/apps/metrics.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,11 @@ Parameters:
AlbListenerRulePriorityPrefix: { Type: String }
CastleHostname: { Type: String }
IdHostname: { Type: String }
MetricsHostname: { Type: String }

Conditions:
IsProduction: !Equals [!Ref EnvironmentType, Production]
IsStaging: !Equals [!Ref EnvironmentType, Staging]

Resources:
HostHeaderListenerRule:
Expand All @@ -46,6 +48,7 @@ Resources:
Priority: !Join ["", [!Ref AlbListenerRulePriorityPrefix, "00"]]
AltHostHeaderListenerRule:
Type: AWS::ElasticLoadBalancingV2::ListenerRule
Condition: IsProduction
Properties:
Actions:
- TargetGroupArn: !Ref TargetGroup
Expand All @@ -56,6 +59,25 @@ Resources:
- metrics.*
ListenerArn: !Ref AlbHttpsListenerArn
Priority: !Join ["", [!Ref AlbListenerRulePriorityPrefix, "01"]]
RedirectHostHeaderListenerRule:
Type: AWS::ElasticLoadBalancingV2::ListenerRule
Condition: IsStaging
Properties:
Actions:
- RedirectConfig:
Host: !Ref MetricsHostname
Path: "/#{path}"
Port: "#{port}"
Protocol: "#{protocol}"
Query: "#{query}"
StatusCode: "HTTP_301"
Type: redirect
Conditions:
- Field: host-header
Values:
- metrics.*
ListenerArn: !Ref AlbHttpsListenerArn
Priority: !Join ["", [!Ref AlbListenerRulePriorityPrefix, "02"]]

TargetGroup:
Type: AWS::ElasticLoadBalancingV2::TargetGroup
Expand Down
6 changes: 3 additions & 3 deletions spire/templates/constants.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Mappings:
Staging:
EnvironmentTypeAbbreviation: stag
EnvironmentTypeLowercase: staging
AuguryHostname: augury.staging.prx.tech
AuguryHostname: inventory.dovetail.staging.prx.tech
BetaHostname: beta.staging.prx.tech
CastleHostname: castle.staging.prx.tech
CmsHostname: cms.staging.prx.tech
Expand All @@ -24,12 +24,12 @@ Mappings:
ExchangeHostname: exchange.staging.prx.tech
ExchangeApiHostname: exchange.staging.prx.tech
ExchangeTransferHostname: staging.prxtransfer.org
FeederHostname: feeder.staging.prx.tech
FeederHostname: podcasts.dovetail.staging.prx.tech
FeederAssetsHostname: assets.feeder.staging.prx.tech
FeederAuthProxyHostname: p.staging.prxu.org
FixerHostname: fixer.prx.org
IdHostname: id.staging.prx.tech
MetricsHostname: metrics.staging.prx.tech
MetricsHostname: metrics.dovetail.staging.prx.tech
NetworksHostname: networks.staging.prx.tech
PlayHostname: play.staging.prx.tech
PublishHostname: publish.staging.prx.tech
Expand Down
1 change: 1 addition & 0 deletions spire/templates/root.yml
Original file line number Diff line number Diff line change
Expand Up @@ -768,6 +768,7 @@ Resources:
AdFilesHostname: !GetAtt Constants2.Outputs.AdFilesHostname
AuguryHostname: !GetAtt Constants2.Outputs.AuguryHostname
FeederHostname: !GetAtt Constants2.Outputs.FeederHostname
MetricsHostname: !GetAtt Constants2.Outputs.MetricsHostname
CmsHostname: !GetAtt Constants2.Outputs.CmsHostname
DovetailCdnHostname: !GetAtt Constants2.Outputs.DovetailCdnHostname
DovetailRouterHostname: !GetAtt Constants2.Outputs.DovetailRouterHostname
Expand Down
3 changes: 2 additions & 1 deletion spire/templates/shared-alb.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,8 @@ Resources:
Properties:
DomainName: !If [IsProduction, "*.prx.org", "*.staging.prx.tech"]
SubjectAlternativeNames:
- !If [IsProduction, "*.dovetail.prx.org", "*.dovetail.staging.prx.tech"]
# - !If [IsProduction, "*.dovetail.prx.org", "*.dovetail.staging.prx.tech"]
- !If [IsProduction, !Ref "AWS::NoValue", "*.dovetail.staging.prx.tech"]
- !If [IsProduction, "*.prxu.org", "*.staging.prxu.org"]
- !If [IsProduction, "*.prx.tech", !Ref "AWS::NoValue"]
- !If [IsProduction, "*.prx.mx", !Ref "AWS::NoValue"]
Expand Down

0 comments on commit 5c902c7

Please sign in to comment.