Skip to content
This repository was archived by the owner on Mar 27, 2023. It is now read-only.

Commit 23d3d93

Browse files
committed
removed aws secret and key env vars from cloudformation services
1 parent 6a6e660 commit 23d3d93

File tree

6 files changed

+16
-70
lines changed

6 files changed

+16
-70
lines changed

cloudformation/infrastructure/ecs-cluster.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,19 @@ Resources:
172172
ManagedPolicyArns:
173173
- arn:aws:iam::aws:policy/service-role/AmazonEC2RoleforSSM
174174
- arn:aws:iam::aws:policy/CloudWatchAgentServerPolicy
175+
- arn:aws:iam::aws:policy/S
175176
Policies:
177+
- PolicyName: s3-access
178+
PolicyDocument: |
179+
{
180+
"Statement": [
181+
{
182+
"Effect": "Allow",
183+
"Action": "s3:*",
184+
"Resource": "*"
185+
}
186+
]
187+
}
176188
- PolicyName: ecs-service
177189
PolicyDocument: |
178190
{

cloudformation/master.yaml

Lines changed: 4 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -68,27 +68,17 @@ Parameters:
6868
Type: String
6969
NoEcho: true
7070

71-
AWSAccessKeyId:
72-
Description: "AWS ACCESS KEY ID"
73-
Type: String
74-
NoEcho: true
75-
76-
AWSSecretAccessKey:
77-
Description: "AWS SECRET ACCESS KEY"
78-
Type: String
79-
NoEcho: true
80-
8171
DjangoSecretKey:
8272
Description: The Secret Key for backend, celery and beat containers
8373
Type: String
8474
NoEcho: true
8575

8676
Conditions:
8777
RunServices: !Equals [ 1, 0 ]
88-
UseRDS: !Equals [ 1, 0 ]
89-
UseALB: !Equals [ 1, 0 ]
90-
UseECS: !Equals [ 1, 0 ]
91-
UseElastiCache: !Equals [ 1, 0 ]
78+
UseRDS: !Equals [ 1, 1 ]
79+
UseALB: !Equals [ 1, 1 ]
80+
UseECS: !Equals [ 1, 1 ]
81+
UseElastiCache: !Equals [ 1, 1 ]
9282

9383
Resources:
9484

@@ -177,8 +167,6 @@ Resources:
177167
Parameters:
178168
GitSHA: !Ref GitSHA
179169
DjangoSecretKey: !Ref DjangoSecretKey
180-
AWSAccessKeyId: !Ref AWSAccessKeyId
181-
AWSSecretAccessKey: !Ref AWSSecretAccessKey
182170
AppUrl: !Ref AppUrl
183171
VPC: !GetAtt VPC.Outputs.VPC
184172
ECSCluster: !GetAtt ECS.Outputs.ECSCluster
@@ -198,8 +186,6 @@ Resources:
198186
Parameters:
199187
GitSHA: !Ref GitSHA
200188
DjangoSecretKey: !Ref DjangoSecretKey
201-
AWSAccessKeyId: !Ref AWSAccessKeyId
202-
AWSSecretAccessKey: !Ref AWSSecretAccessKey
203189
AppUrl: !Ref AppUrl
204190
VPC: !GetAtt VPC.Outputs.VPC
205191
ECSCluster: !GetAtt ECS.Outputs.ECSCluster
@@ -219,8 +205,6 @@ Resources:
219205
Parameters:
220206
GitSHA: !Ref GitSHA
221207
DjangoSecretKey: !Ref DjangoSecretKey
222-
AWSAccessKeyId: !Ref AWSAccessKeyId
223-
AWSSecretAccessKey: !Ref AWSSecretAccessKey
224208
AppUrl: !Ref AppUrl
225209
VPC: !GetAtt VPC.Outputs.VPC
226210
ECSCluster: !GetAtt ECS.Outputs.ECSCluster
@@ -238,8 +222,6 @@ Resources:
238222
Parameters:
239223
GitSHA: !Ref GitSHA
240224
DjangoSecretKey: !Ref DjangoSecretKey
241-
AWSAccessKeyId: !Ref AWSAccessKeyId
242-
AWSSecretAccessKey: !Ref AWSSecretAccessKey
243225
AppUrl: !Ref AppUrl
244226
VPC: !GetAtt VPC.Outputs.VPC
245227
ECSCluster: !GetAtt ECS.Outputs.ECSCluster

cloudformation/services/backend.yaml

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -49,14 +49,6 @@ Parameters:
4949
Description: The ECR repository for the backend container
5050
Type: String
5151

52-
AWSAccessKeyId:
53-
Description: "AWS ACCESS KEY ID"
54-
Type: String
55-
56-
AWSSecretAccessKey:
57-
Description: "AWS SECRET ACCESS KEY"
58-
Type: String
59-
6052
DjangoSecretKey:
6153
Description: The Secret Key for backend, celery and beat containers
6254
Type: String
@@ -90,10 +82,6 @@ Resources:
9082
Environment:
9183
- Name: GIT_SHA
9284
Value: !Ref GitSHA
93-
- Name: AWS_ACCESS_KEY_ID
94-
Value: !Ref AWSAccessKeyId
95-
- Name: AWS_SECRET_ACCESS_KEY
96-
Value: !Ref AWSSecretAccessKey
9785
- Name: SECRET_KEY
9886
Value: !Ref DjangoSecretKey
9987
- Name: APP_URL

cloudformation/services/beat.yaml

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -41,14 +41,6 @@ Parameters:
4141
Description: The ECR repository for the backend container
4242
Type: String
4343

44-
AWSAccessKeyId:
45-
Description: "AWS ACCESS KEY ID"
46-
Type: String
47-
48-
AWSSecretAccessKey:
49-
Description: "AWS SECRET ACCESS KEY"
50-
Type: String
51-
5244
DjangoSecretKey:
5345
Description: The Secret Key for backend, celery and beat containers
5446
Type: String
@@ -83,10 +75,6 @@ Resources:
8375
Environment:
8476
- Name: GIT_SHA
8577
Value: !Ref GitSHA
86-
- Name: AWS_ACCESS_KEY_ID
87-
Value: !Ref AWSAccessKeyId
88-
- Name: AWS_SECRET_ACCESS_KEY
89-
Value: !Ref AWSSecretAccessKey
9078
- Name: SECRET_KEY
9179
Value: !Ref DjangoSecretKey
9280
- Name: APP_URL

cloudformation/services/celery.yaml

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -41,14 +41,6 @@ Parameters:
4141
Description: The ECR repository for the backend container
4242
Type: String
4343

44-
AWSAccessKeyId:
45-
Description: "AWS ACCESS KEY ID"
46-
Type: String
47-
48-
AWSSecretAccessKey:
49-
Description: "AWS SECRET ACCESS KEY"
50-
Type: String
51-
5244
DjangoSecretKey:
5345
Description: The Secret Key for backend, celery and beat containers
5446
Type: String
@@ -82,10 +74,6 @@ Resources:
8274
Environment:
8375
- Name: GIT_SHA
8476
Value: !Ref GitSHA
85-
- Name: AWS_ACCESS_KEY_ID
86-
Value: !Ref AWSAccessKeyId
87-
- Name: AWS_SECRET_ACCESS_KEY
88-
Value: !Ref AWSSecretAccessKey
8977
- Name: SECRET_KEY
9078
Value: !Ref DjangoSecretKey
9179
- Name: APP_URL

cloudformation/services/daphne.yaml

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -49,14 +49,6 @@ Parameters:
4949
Description: The ECR repository for the backend container
5050
Type: String
5151

52-
AWSAccessKeyId:
53-
Description: "AWS ACCESS KEY ID"
54-
Type: String
55-
56-
AWSSecretAccessKey:
57-
Description: "AWS SECRET ACCESS KEY"
58-
Type: String
59-
6052
DjangoSecretKey:
6153
Description: The Secret Key for backend, celery and beat containers
6254
Type: String
@@ -95,10 +87,6 @@ Resources:
9587
Environment:
9688
- Name: GIT_SHA
9789
Value: !Ref GitSHA
98-
- Name: AWS_ACCESS_KEY_ID
99-
Value: !Ref AWSAccessKeyId
100-
- Name: AWS_SECRET_ACCESS_KEY
101-
Value: !Ref AWSSecretAccessKey
10290
- Name: SECRET_KEY
10391
Value: !Ref DjangoSecretKey
10492
- Name: APP_URL

0 commit comments

Comments
 (0)