terraform-aws-ecr

Terraform Module to manage Docker Container Registries on AWS ECR

APACHE-2.0 License

Stars
187
Committers
40

Bot releases are visible (Hide)

terraform-aws-ecr - 0.11.0 Add repository ARN to output

Published by aknysh almost 5 years ago

what

  • Add repository ARN to output

why

  • Useful if you are adding policies for the registry
terraform-aws-ecr - 0.10.0 Expose variable "regex_replace_chars"

Published by aknysh almost 5 years ago

what

  • Expose variable "regex_replace_chars"

why

  • Allow changing label module behavior
terraform-aws-ecr - 0.9.0 Update terraform-null-label to v0.16.0

Published by aknysh almost 5 years ago

what

  • Update terraform-null-label to v0.16.0

why

  • Since null_resource was dropped in the terraform-null-label module starting version 0.15.0 and the code was completely removed in the recent version 0.16.0, update the terraform-null-label to the latest version
terraform-aws-ecr - 0.8.0 Toggle image scanning on ECR

Published by aknysh almost 5 years ago

what

  • Toggle image scanning on ECR

why

  • As of terraform AWS provider 2.34.0 the ECR image repository now has an additional setting to enable image scanning for CVE vulnerabilities.

references

https://www.terraform.io/docs/providers/aws/r/ecr_repository.html

terraform-aws-ecr -

Published by Nuru over 5 years ago

terraform-aws-ecr - 0.7.0 Convert to TF 0.12. Add tests. Add Codefresh test pipeline

Published by aknysh over 5 years ago

what

  • Port module to Terraform 0.12
  • Pin all providers
  • Add example for testing
  • Add bats and terratest for the example
  • Add Codefresh badge to point to the test pipeline in terraform-modules project
  • Update README

why

  • Module currently does not work with 0.12. Much easier syntax
  • Better regression control
  • Automatically test the example on every commit and pull request
  • Provision resources on AWS in the test account and check the outputs for the correct values
  • terraform-modules project contains pipelines for all terraform modules
terraform-aws-ecr -

Published by goruha over 5 years ago

terraform-aws-ecr - 0.5.0 Pass tags to the ECR resource so that the repository is tagged

Published by aknysh over 5 years ago

what

  • Pass tags to the ECR resource so that the repository is tagged

why

  • Add support for tagging of ECR repositories with user provided metadata
terraform-aws-ecr -

Published by goruha over 5 years ago

terraform-aws-ecr -

Published by goruha over 5 years ago

What

  • Grant permission to access ECR using ECR policy with principal that have access to it. Basically, let ECR describe who can access it, rather than each user/role listing the modules they can access

Why

  • To solve IAM limit problem (more scalable strategy and probably the way we should have done it from the get go)

Breaking changes

  • Variable roles replaced with principals_full_access or principals_readonly_access and expects list or role\user arns as value
  • User should have permissions
data "aws_iam_policy_document" "login" {
  statement {
    sid       = "ECRGetAuthorizationToken"
    effect    = "Allow"
    actions   = ["ecr:GetAuthorizationToken"]
    resources = ["*"]
  }
}
  • We removed policies that provide access to the registry. (policy_login_name, policy_login_arn, policy_read_name, policy_read_arn, policy_write_name, policy_write_arn).
    So you do not need to attach the policies to IAM role\user. Please provide IAM role\user arn as variable principals_full_access or principals_readonly_access depend on what type of access to you need.

Example:

module "kops_ecr" {
  source       = "git::https://github.com/cloudposse/terraform-aws-ecr.git?ref=tags/0.2.11"
  name         = "${var.name}"
  namespace    = "${var.namespace}"
  stage        = "${var.stage}"
  use_fullname = "${var.use_fullname}"

  roles = [
    "${module.kops_metadata.masters_role_name}",
    "${module.kops_metadata.nodes_role_name}",
  ]
}

resource "aws_iam_policy_attachment" "login" {
  count      = "${signum(length(var.users))}"
  name       = "${module.label.id}"
  users      = ["${var.users}"]
  policy_arn = "${module.kops_ecr.policy_login_arn}"
}

now should be

module "kops_ecr" {
  source       = "git::https://github.com/cloudposse/terraform-aws-ecr.git?ref=tags/0.3.0"
  name         = "${var.name}"
  namespace    = "${var.namespace}"
  stage        = "${var.stage}"
  use_fullname = "${var.use_fullname}"

  principals_readonly_access = [
    "${module.kops_metadata.masters_role_arn}",
    "${module.kops_metadata.nodes_role_arn}",
  ]

  principals_full_access =  [
    "${var.users_arns}"
  ]
}

terraform-aws-ecr - 0.2.13 Update readme yaml file and rebuild md

Published by solairerove almost 6 years ago

what

  • updated README.yaml file
  • add tags and categories
  • rebuild README.md file

why

  • need to add categories and tags so we can pull them into the documentation
terraform-aws-ecr -

Published by osterman about 6 years ago

terraform-aws-ecr -

Published by goruha about 6 years ago

terraform-aws-ecr -

Published by goruha about 6 years ago

terraform-aws-ecr - Regenerate README.md

Published by vadim-hleif about 6 years ago

what

  • Regenerate README.md

why

  • Previous version of build-harness has some typos
terraform-aws-ecr - Fix readme

Published by vadim-hleif over 6 years ago

What

  • Change releases badge link
  • Re-render readme

Why

  • Badge has wrong url
  • Old template has a bug so avatars links were broken
terraform-aws-ecr - 0.2.7: (Migrate to README.yaml format)

Published by vadim-hleif over 6 years ago

what

  • Add README.yaml

why

  • Standardize README
terraform-aws-ecr - Expose Policies to bind access by the module caller

Published by goruha over 6 years ago

terraform-aws-ecr - 0.2.5

Published by aknysh over 6 years ago

what

  • Changed resources of aws_iam_policy_document to wildcard

why

terraform-aws-ecr - 0.2.4

Published by aknysh over 6 years ago

Add lifecycle policy

what

  • Define aws_ecr_lifecycle_policy

why

  • To expunge old images