Skip to content

Commit

Permalink
add missing permissions + prod_code (#124)
Browse files Browse the repository at this point in the history
  • Loading branch information
andrenarciso4 authored Jul 18, 2024
1 parent 6cad1a8 commit 340d8a1
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 0 deletions.
8 changes: 8 additions & 0 deletions terraform/ecs-deploy.tf
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ locals {
APPMESH_NAME = var.ecs_deploy_appmesh_name
APPMESH_ENVOY_RELEASE = var.ecs_deploy_appmesh_release
ECS_WHITELIST = var.ecs_whitelist
PROD_CODE = var.prod_code

ECS_DEPLOY_CPU = var.ecs_deploy_cpu
ECS_DEPLOY_MEMORY_RESERVATION = var.ecs_deploy_memory_reservation
Expand Down Expand Up @@ -245,6 +246,13 @@ resource "aws_iam_role_policy" "ecs-deploy-policy" {
"arn:aws:dynamodb:${var.aws_region}:${data.aws_caller_identity.current.account_id}:table/ecs-deploy",
"arn:aws:dynamodb:${var.aws_region}:${data.aws_caller_identity.current.account_id}:table/ecs-deploy/*"
]
},
{
"Effect": "Allow",
"Action": [
"aws-marketplace:RegisterUsage"
],
"Resource": "*"
}
]
}
Expand Down
4 changes: 4 additions & 0 deletions terraform/templates/ecs-deploy.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@
{
"name": "ECS_WHITELIST",
"value": "${ECS_WHITELIST}"
},
{
"name": "PROD_CODE",
"value": "${PROD_CODE}"
}
]
}
Expand Down
4 changes: 4 additions & 0 deletions terraform/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,10 @@ variable "ecs_whitelist" {
default = "0.0.0.0/0"
}

variable "prod_code" {
default = "3x0v7m3npdgzaiw2f8lwsgju5"
}

variable "ecs_ecr_scan_on_push" {
default = "false"
}
Expand Down

0 comments on commit 340d8a1

Please sign in to comment.