Skip to content

Commit

Permalink
update permissions
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewpeng02 committed May 17, 2024
1 parent 139886f commit c6944f7
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions dlp-terraform/ecs/ecs_django_service.tf
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ resource "aws_iam_role" "django_ecs_task_role" {
}

data "aws_iam_policy_document" "django_inline_policy" {
statement {
actions = ["sqs:SendMessage", "sqs:GetQueueAttributes"]
resources = [aws_sqs_queue.training_queue.arn]
}

statement {
actions = ["secretsmanager:GetSecretValue"]
resources = ["arn:aws:secretsmanager:us-east-1:521654603461:secret:DLP/Firebase/Admin_SDK-8g8IDn"]
Expand Down
2 changes: 1 addition & 1 deletion dlp-terraform/ecs/ecs_training_service.tf
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ resource "aws_iam_role" "training_ecs_task_role" {

data "aws_iam_policy_document" "training_inline_policy" {
statement {
actions = ["sqs:ReceiveMessage"]
actions = ["sqs:ReceiveMessage", "sqs:GetQueueAttributes"]
resources = [aws_sqs_queue.training_queue.arn]
}

Expand Down
2 changes: 1 addition & 1 deletion frontend/next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const nextConfig = {
source: "/api/training/:path*",
destination:
process.env.ENVIRONMENT === "production"
? "http://alb-785155211.us-east-1.elb.amazonaws.com/api/:path*" // note, this url changes every time you destroy/apply Terraform
? "http://alb-1805434018.us-east-1.elb.amazonaws.com/api/:path*" // note, this url changes every time you destroy/apply Terraform
: "http://127.0.0.1:8000/api/:path*",
},
],
Expand Down

0 comments on commit c6944f7

Please sign in to comment.