Skip to content

Commit

Permalink
DOP-4589: Create bucket-level redirects for several versions (#1046)
Browse files Browse the repository at this point in the history
buckets commit
  • Loading branch information
mayaraman19 authored May 23, 2024
1 parent ab53076 commit 0d087d8
Showing 1 changed file with 63 additions and 7 deletions.
70 changes: 63 additions & 7 deletions infrastructure/ecs-main/buckets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,24 @@ Resources:
IndexDocument: index.html
ErrorDocument: ${self:custom.site.errorDoc.${self:provider.stage}, null}
RoutingRules:
- RoutingRuleCondition:
KeyPrefixEquals: ${self:custom.site.prefix.${self:provider.stage}}/stable
RedirectRule:
Protocol: "https"
HostName: ${self:custom.site.host.${self:provider.stage}}
ReplaceKeyPrefixWith: ${self:custom.site.prefix.${self:provider.stage}}/manual
- RoutingRuleCondition:
KeyPrefixEquals: ${self:custom.site.prefix.${self:provider.stage}}/master
RedirectRule:
Protocol: "https"
HostName: ${self:custom.site.host.${self:provider.stage}}
ReplaceKeyPrefixWith: ${self:custom.site.prefix.${self:provider.stage}}/upcoming
ReplaceKeyPrefixWith: ${self:custom.site.prefix.${self:provider.stage}}/manual
- RoutingRuleCondition:
KeyPrefixEquals: ${self:custom.site.prefix.${self:provider.stage}}/current
RedirectRule:
Protocol: "https"
HostName: ${self:custom.site.host.${self:provider.stage}}
ReplaceKeyPrefixWith: ${self:custom.site.prefix.${self:provider.stage}}/manual
- RoutingRuleCondition:
KeyPrefixEquals: ${self:custom.site.prefix.${self:provider.stage}}/atlas/cli/v1.3.0
RedirectRule:
Expand Down Expand Up @@ -131,25 +143,31 @@ Resources:
RedirectRule:
Protocol: "https"
HostName: ${self.custom.site.host.${self:provider.stage}}
ReplaceKeyPrefixWith: ${self:custom.site.prefix.${self:provider.stage}}/kubernetes-operator/stable
ReplaceKeyPrefixWith: ${self:custom.site.prefix.${self:provider.stage}}/kubernetes-operator/current
- RoutingRuleCondition:
KeyPrefixEquals: ${self:custom.site.prefix.${self:provider.stage}}/kubernetes-operator/v1.0
KeyPrefixEquals: ${self:custom.site.prefix.${self:provider.stage}}/kubernetes-operator/v1
RedirectRule:
Protocol: "https"
HostName: ${self.custom.site.host.${self:provider.stage}}
ReplaceKeyPrefixWith: ${self:custom.site.prefix.${self:provider.stage}}/kubernetes-operator/stable
ReplaceKeyPrefixWith: ${self:custom.site.prefix.${self:provider.stage}}/kubernetes-operator/current
- RoutingRuleCondition:
KeyPrefixEquals: ${self:custom.site.prefix.${self:provider.stage}}/kubernetes-operator/v1
KeyPrefixEquals: ${self:custom.site.prefix.${self:provider.stage}}/kubernetes-operator/stable
RedirectRule:
Protocol: "https"
HostName: ${self.custom.site.host.${self:provider.stage}}
ReplaceKeyPrefixWith: ${self:custom.site.prefix.${self:provider.stage}}/kubernetes-operator/stable
ReplaceKeyPrefixWith: ${self:custom.site.prefix.${self:provider.stage}}/kubernetes-operator/current
- RoutingRuleCondition:
KeyPrefixEquals: ${self:custom.site.prefix.${self:provider.stage}}/mongocli/v0.
RedirectRule:
Protocol: "https"
HostName: ${self.custom.site.host.${self:provider.stage}}
ReplaceKeyPrefixWith: ${self:custom.site.prefix.${self:provider.stage}}/mongocli/stable
ReplaceKeyPrefixWith: ${self:custom.site.prefix.${self:provider.stage}}/mongocli/current
- RoutingRuleCondition:
KeyPrefixEquals: ${self:custom.site.prefix.${self:provider.stage}}/mongocli/stable
RedirectRule:
Protocol: "https"
HostName: ${self.custom.site.host.${self:provider.stage}}
ReplaceKeyPrefixWith: ${self:custom.site.prefix.${self:provider.stage}}/mongocli/current
- RoutingRuleCondition:
KeyPrefixEquals: ${self:custom.site.prefix.${self:provider.stage}}/spark-connector/v1.1
RedirectRule:
Expand All @@ -168,6 +186,24 @@ Resources:
Protocol: "https"
HostName: ${self.custom.site.host.${self:provider.stage}}
ReplaceKeyPrefixWith: ${self:custom.site.prefix.${self:provider.stage}}/spark-connector/current
- RoutingRuleCondition:
KeyPrefixEquals: ${self:custom.site.prefix.${self:provider.stage}}/ruby-driver/master
RedirectRule:
Protocol: "https"
HostName: ${self.custom.site.host.${self:provider.stage}}
ReplaceKeyPrefixWith: ${self:custom.site.prefix.${self:provider.stage}}/ruby-driver/upcoming
- RoutingRuleCondition:
KeyPrefixEquals: ${self:custom.site.prefix.${self:provider.stage}}/compass/beta
RedirectRule:
Protocol: "https"
HostName: ${self.custom.site.host.${self:provider.stage}}
ReplaceKeyPrefixWith: ${self:custom.site.prefix.${self:provider.stage}}/compass/current
- RoutingRuleCondition:
KeyPrefixEquals: ${self:custom.site.prefix.${self:provider.stage}}/compass/upcoming
RedirectRule:
Protocol: "https"
HostName: ${self.custom.site.host.${self:provider.stage}}
ReplaceKeyPrefixWith: ${self:custom.site.prefix.${self:provider.stage}}/compass/current
DocAtlasBucket:
Type: "AWS::S3::Bucket"
Properties:
Expand All @@ -180,6 +216,18 @@ Resources:
WebsiteConfiguration:
IndexDocument: index.html
ErrorDocument: ${self:custom.site.errorDoc.${self:provider.stage}, null}
- RoutingRuleCondition:
KeyPrefixEquals: ${self:custom.site.prefix.${self:provider.stage}}/atlas/cli/stable
RedirectRule:
Protocol: "https"
HostName: ${self.custom.site.host.${self:provider.stage}}
ReplaceKeyPrefixWith: ${self:custom.site.prefix.${self:provider.stage}}/atlas/cli/current
- RoutingRuleCondition:
KeyPrefixEquals: ${self:custom.site.prefix.${self:provider.stage}}/atlas/atlas-operator/stable
RedirectRule:
Protocol: "https"
HostName: ${self.custom.site.host.${self:provider.stage}}
ReplaceKeyPrefixWith: ${self:custom.site.prefix.${self:provider.stage}}/atlas/atlas-operator/current
CloudManagerBucket:
Type: "AWS::S3::Bucket"
Properties:
Expand Down Expand Up @@ -270,6 +318,14 @@ Resources:
WebsiteConfiguration:
IndexDocument: index.html
ErrorDocument: ${self:custom.site.errorDoc.${self:provider.stage}, null}
RoutingRules:
- RoutingRuleCondition:
KeyPrefixEquals: ${self:custom.site.prefix.${self:provider.stage}}/languages/scala/driver/master
RedirectRule:
Protocol: "https"
HostName: ${self.custom.site.host.${self:provider.stage}}
ReplaceKeyPrefixWith: ${self:custom.site.prefix.${self:provider.stage}}/languages/scala/driver/upcoming


DocsBucketPolicy:
Type: AWS::S3::BucketPolicy
Expand Down

0 comments on commit 0d087d8

Please sign in to comment.