Terraform Module to manage Docker Container Registries on AWS ECR
APACHE-2.0 License
Bot releases are visible (Hide)
Published by aknysh almost 5 years ago
Published by aknysh almost 5 years ago
Published by aknysh almost 5 years ago
Published by aknysh almost 5 years ago
https://www.terraform.io/docs/providers/aws/r/ecr_repository.html
Published by aknysh over 5 years ago
bats
and terratest
for the exampleterraform-modules
projectterraform-modules
project contains pipelines for all terraform modulesPublished by aknysh over 5 years ago
roles
replaced with principals_full_access
or principals_readonly_access
and expects list or role\user arns as valuedata "aws_iam_policy_document" "login" {
statement {
sid = "ECRGetAuthorizationToken"
effect = "Allow"
actions = ["ecr:GetAuthorizationToken"]
resources = ["*"]
}
}
policy_login_name
, policy_login_arn
, policy_read_name
, policy_read_arn
, policy_write_name
, policy_write_arn
).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}"
]
}
Published by solairerove almost 6 years ago
README.yaml
fileREADME.md
filePublished by vadim-hleif about 6 years ago
README.md
Published by vadim-hleif over 6 years ago
Published by vadim-hleif over 6 years ago
README.yaml
Published by goruha over 6 years ago
Published by aknysh over 6 years ago
resources
of aws_iam_policy_document
to wildcardPublished by aknysh over 6 years ago
aws_ecr_lifecycle_policy