Skip to content

Commit 01d1e84

Browse files
committed
Fixed README and added tags to ecr_repository
1 parent 68c1a1b commit 01d1e84

File tree

3 files changed

+12
-2
lines changed

3 files changed

+12
-2
lines changed

modules/docker-build/README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ module "docker_image" {
4747

4848
| Name | Version |
4949
|------|---------|
50-
| <a name="provider_aws"></a> [aws](#provider\_aws) | 3.54.0 |
51-
| <a name="provider_docker"></a> [docker](#provider\_docker) | 2.15.0 |
50+
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 3.35 |
51+
| <a name="provider_docker"></a> [docker](#provider\_docker) | >= 2.8.0 |
5252

5353
## Modules
5454

@@ -71,6 +71,7 @@ No modules.
7171
| <a name="input_create_ecr_repo"></a> [create\_ecr\_repo](#input\_create\_ecr\_repo) | Controls whether ECR repository for Lambda image should be created | `bool` | `false` | no |
7272
| <a name="input_docker_file_path"></a> [docker\_file\_path](#input\_docker\_file\_path) | Path to Dockerfile in source package | `string` | `"Dockerfile"` | no |
7373
| <a name="input_ecr_repo"></a> [ecr\_repo](#input\_ecr\_repo) | Name of ECR repository to use or to create | `string` | `null` | no |
74+
| <a name="input_ecr_repo_tags"></a> [ecr\_repo\_tags](#input\_ecr\_repo\_tags) | A map of tags to assign to ECR repository | `map(string)` | `{}` | no |
7475
| <a name="input_image_tag"></a> [image\_tag](#input\_image\_tag) | Image tag to use. If not specified current timestamp in format 'YYYYMMDDhhmmss' will be used. This can lead to unnecessary rebuilds. | `string` | `null` | no |
7576
| <a name="input_image_tag_mutability"></a> [image\_tag\_mutability](#input\_image\_tag\_mutability) | The tag mutability setting for the repository. Must be one of: `MUTABLE` or `IMMUTABLE` | `string` | `"MUTABLE"` | no |
7677
| <a name="input_scan_on_push"></a> [scan\_on\_push](#input\_scan\_on\_push) | Indicates whether images are scanned after being pushed to the repository | `bool` | `false` | no |

modules/docker-build/main.tf

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,10 @@ resource "aws_ecr_repository" "this" {
3333

3434
name = var.ecr_repo
3535
image_tag_mutability = var.image_tag_mutability
36+
3637
image_scanning_configuration {
3738
scan_on_push = var.scan_on_push
3839
}
40+
41+
tags = var.ecr_repo_tags
3942
}

modules/docker-build/variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,3 +40,9 @@ variable "scan_on_push" {
4040
type = bool
4141
default = false
4242
}
43+
44+
variable "ecr_repo_tags" {
45+
description = "A map of tags to assign to ECR repository"
46+
type = map(string)
47+
default = {}
48+
}

0 commit comments

Comments
 (0)