Skip to content

Commit

Permalink
feat: prefix restriction enhancement
Browse files Browse the repository at this point in the history
Signed-off-by: Kevin Lefevre <[email protected]>
  • Loading branch information
ArchiFleKs committed Jan 13, 2020
1 parent 6bdb62a commit 37736e6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion ecr.tf
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ resource "aws_iam_policy" "ecr_user" {
"ecr:PutImage"
],
"Resource": [
"arn:aws:ecr:${var.aws["region"]}:${data.aws_caller_identity.current.account_id}:repository/${var.project}/*"
"arn:aws:ecr:${var.aws["region"]}:${data.aws_caller_identity.current.account_id}:repository/${var.prefix_restriction}${var.prefix_restriction != "" ? "/" : ""}*"
]
},
{
Expand Down
4 changes: 4 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,7 @@ variable "project" {
variable "prefix" {
default = ""
}

variable "prefix_restriction" {
default = ""
}

0 comments on commit 37736e6

Please sign in to comment.