ecr.tf 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. # #ecr.tf is for the basic building blocks for ECR. Not for individual images.
  2. # # individual images are in separate files
  3. # # with the naming scheme project-container.tf
  4. # #TODO: add codebuild image for codebuild to use when building images
  5. # # centos7 - customer portal
  6. # # rhel - syslog-ng
  7. # #Base RHEL repository used for building XDR images like syslog-ng in CodeBuild
  8. # resource "aws_ecr_repository" "codebuild-rhel7" {
  9. # name = "codebuild-rhel7"
  10. # tags = merge(var.standard_tags, var.tags)
  11. # }
  12. # #Allow codebuild to access the ECR Repository
  13. # resource "aws_ecr_repository_policy" "codebuild-rhel7" {
  14. # repository = aws_ecr_repository.codebuild-rhel7.name
  15. # policy = <<EOF
  16. # {
  17. # "Version": "2008-10-17",
  18. # "Statement": [
  19. # {
  20. # "Sid": "new statement",
  21. # "Effect": "Allow",
  22. # "Principal": {
  23. # "Service": "codebuild.amazonaws.com"
  24. # },
  25. # "Action": [
  26. # "ecr:GetDownloadUrlForLayer",
  27. # "ecr:BatchGetImage",
  28. # "ecr:BatchCheckLayerAvailability"
  29. # ]
  30. # }
  31. # ]
  32. # }
  33. # EOF
  34. # }
  35. # #base centos7 image used for building portal
  36. # resource "aws_ecr_repository" "codebuild-centos7" {
  37. # name = "codebuild-centos7"
  38. # tags = merge(var.standard_tags, var.tags)
  39. # }
  40. # #Allow codebuild to access the ECR Repository
  41. # resource "aws_ecr_repository_policy" "codebuild-centos7" {
  42. # repository = aws_ecr_repository.codebuild-centos7.name
  43. # policy = <<EOF
  44. # {
  45. # "Version": "2008-10-17",
  46. # "Statement": [
  47. # {
  48. # "Sid": "new statement",
  49. # "Effect": "Allow",
  50. # "Principal": {
  51. # "Service": "codebuild.amazonaws.com"
  52. # },
  53. # "Action": [
  54. # "ecr:GetDownloadUrlForLayer",
  55. # "ecr:BatchGetImage",
  56. # "ecr:BatchCheckLayerAvailability"
  57. # ]
  58. # }
  59. # ]
  60. # }
  61. # EOF
  62. # }