Skip to content
This repository was archived by the owner on Aug 6, 2025. It is now read-only.

Commit 9356f4f

Browse files
authored
DOP-3188: add bucket definitons for csharp to severless defs (#696)
1 parent 95a6f18 commit 9356f4f

File tree

2 files changed

+43
-3
lines changed

2 files changed

+43
-3
lines changed

infrastructure/ecs-main/buckets.yml

Lines changed: 39 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,14 @@ Resources:
6060
IndexDocument: index.html
6161
ErrorDocument: ${self:custom.site.errorDoc.${self:provider.stage}, null}
6262

63+
CSharpBucket:
64+
Type: "AWS::S3::Bucket"
65+
Properties:
66+
BucketName: ${self:custom.cSharpBucketName}
67+
WebsiteConfiguration:
68+
IndexDocument: index.html
69+
ErrorDocument: ${self:custom.site.errorDoc.${self:provider.stage}, null}
70+
6371
DocsBucketPolicy:
6472
Type: AWS::S3::BucketPolicy
6573
Properties:
@@ -270,4 +278,34 @@ Resources:
270278
AWS: arn:aws:iam::${aws:accountId}:role/docs-deploy-job-${self:provider.stage}-batch
271279
Action: 's3:PutObject'
272280
Resource:
273-
- Fn::Join: ['', [{ "Fn::GetAtt": ["NodeBucket", "Arn" ] }, '/*']]
281+
- Fn::Join: ['', [{ "Fn::GetAtt": ["NodeBucket", "Arn" ] }, '/*']]
282+
283+
CSharpBucketPolicy:
284+
Type: AWS::S3::BucketPolicy
285+
Properties:
286+
Bucket:
287+
Ref: CSharpBucket
288+
PolicyDocument:
289+
Statement:
290+
- Sid: PublicReadGetObject
291+
Effect: Allow
292+
Principal: "*"
293+
Action:
294+
- s3:GetObject
295+
Resource:
296+
- Fn::Join: ['', [{ "Fn::GetAtt": ["CSharpBucket", "Arn" ] }, '/*']]
297+
- Effect: Allow
298+
Principal:
299+
AWS: arn:aws:iam::${aws:accountId}:role/docs-archive-job-${self:provider.stage}-batch
300+
Action:
301+
- 's3:GetObject'
302+
- 's3:ListBucket'
303+
Resource:
304+
- Fn::Join: ['', [{ "Fn::GetAtt": ["CSharpBucket", "Arn" ] }, '/*']]
305+
- Fn::Join: ['', [{ "Fn::GetAtt": ["CSharpBucket", "Arn" ] }]]
306+
- Effect: Allow
307+
Principal:
308+
AWS: arn:aws:iam::${aws:accountId}:role/docs-deploy-job-${self:provider.stage}-batch
309+
Action: 's3:PutObject'
310+
Resource:
311+
- Fn::Join: ['', [{ "Fn::GetAtt": ["CSharpBucket", "Arn" ] }, '/*']]

infrastructure/ecs-main/serverless.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,10 +115,12 @@ custom:
115115
fastlyDevhubServiceId: ${ssm:/env/${self:provider.stage}/docs/worker_pool/fastly/docs/devhub/service_id}
116116
fastlyDochubToken: ${ssm:/env/${self:provider.stage}/docs/worker_pool/fastly/docs/dochub/token}
117117
fastlyDochubServiceId: ${ssm:/env/${self:provider.stage}/docs/worker_pool/fastly/docs/dochub/service_id}
118-
javaBucketName: docs-java-${self:provider.stage}
118+
cSharpBucketName: docs-csharp-${self:provider.stage}
119+
cSharpIntgrBucketName: docs-csharp-dev
119120
goBucketName: docs-go-${self:provider.stage}
120-
javaIntgrBucketName: docs-java-intgr
121121
goIntgrBucketName: docs-go-intgr
122+
javaBucketName: docs-java-${self:provider.stage}
123+
javaIntgrBucketName: docs-java-intgr
122124
nodeBucketName: docs-node-${self:provider.stage}
123125
nodeIntgrBucketName: docs-node-intgr
124126
jobCollection: ${ssm:/env/${self:provider.stage}/docs/worker_pool/atlas/collections/job/queue}

0 commit comments

Comments
 (0)