Skip to content

Commit b18b8b7

Browse files
authored
Merge pull request #5 from sterliakov/feature/st-update-readme
feat(docs): Clarify deletion in README, refer to TF registry module in the examples
2 parents db0e6dc + a939145 commit b18b8b7

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

README.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ should build and push an image, and only then a lambda can be created.
1919

2020
This module streamlines this process by pushing some tiny image as a placeholder.
2121

22-
Idea was borrowed from [this StackOverflow answer](https://stackoverflow.com/a/78501527/14401160),
22+
Idea and the initial code was borrowed from
23+
[this StackOverflow answer](https://stackoverflow.com/a/78501527/14401160),
2324
but the implementation was significantly rewritten.
2425

2526

@@ -33,7 +34,8 @@ resource "aws_ecr_repository" "example" {
3334
}
3435
3536
module "ecr_repo_image" {
36-
source = "./ecr_curl"
37+
source = "sterliakov/ecr-image/aws"
38+
version = "0.1.0"
3739
3840
push_ecr_is_public = false
3941
push_repo_fqdn = replace(aws_ecr_repository.example.repository_url, "//.*$/", "") # remove everything after first slash
@@ -45,6 +47,9 @@ module "ecr_repo_image" {
4547
## NOTES
4648

4749
* This module only works under Linux.
50+
* Destroying this module does not remove the pushed image from the repository. Consider
51+
setting `force_delete = True` on the `aws_ecr_repository` resource if you
52+
want to remove the repository with terraform later.
4853
* This module needs `curl` and `jq` on `PATH`. If `jq` are missing, it will fetch
4954
and install `jq 1.7.1` locally for the appropriate architecture.
5055

examples/lambda/ecr.tf

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ resource "aws_ecr_repository" "example" {
44
}
55

66
module "ecr_repo_image" {
7-
source = "../.."
7+
source = "sterliakov/ecr-image/aws"
8+
version = "0.1.0"
89

910
push_ecr_is_public = false
1011
push_repo_fqdn = replace(aws_ecr_repository.example.repository_url, "//.*$/", "") # remove everything after first slash

0 commit comments

Comments
 (0)