Skip to content

Instantly share code, notes, and snippets.

@KyMidd
Created October 18, 2021 15:15
Show Gist options
  • Select an option

  • Save KyMidd/2d7b797a05cf84725380c2a9e42f526f to your computer and use it in GitHub Desktop.

Select an option

Save KyMidd/2d7b797a05cf84725380c2a9e42f526f to your computer and use it in GitHub Desktop.
data "aws_iam_policy_document" "aws_ecr_repository_policy" {
statement {
sid = "KeyVaultPolicyForAccounts"
effect = "Allow"
principals {
type = "AWS"
identifiers = [for k in local.account_ids : "arn:aws:iam::${k}:root"]
}
actions = [
"ecr:GetDownloadUrlForLayer",
"ecr:BatchGetImage",
"ecr:BatchCheckLayerAvailability",
]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment