Skip to content

Commit

Permalink
allow null for image_config
Browse files Browse the repository at this point in the history
  • Loading branch information
badra001 committed Sep 12, 2022
1 parent dc35acd commit 05adae0
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,6 @@
* 1.0.0 -- 2022-08-18
- initial creation


* 1.0.1 -- 2022-09-12
- allow null for image_config
4 changes: 2 additions & 2 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -139,14 +139,14 @@ locals {
## })) }


images = { for i in var.image_config : format("%v#%v", i.name, i.tag) =>
images = var.image_config != null ? { for i in var.image_config : format("%v#%v", i.name, i.tag) =>
merge(i, tomap({
key = format("%v#%v", i.name, i.tag),
source_full_path = format("%v/%v:%v", i.source_registry, i.source_image, element(compact(concat([lookup(i, "source_tag", null)], [i.tag])), 0)),
dest_registry = local.account_ecr_registry,
dest_full_path = format("%v/%v/%v:%v", local.account_ecr_registry, local.repo_parent_name, i.name, i.tag),
dest_repository = format("%v/%v", local.repo_parent_name, i.name),
})) }
})) } : {}

image_repos = { for k, v in local.images : k => format("%v/%v", local.account_ecr, v.name) }
}
Expand Down
2 changes: 1 addition & 1 deletion version.tf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
locals {
_module_name = "aws-ecr-copy-images"
_module_version = "1.0.0"
_module_version = "1.0.1"
}

0 comments on commit 05adae0

Please sign in to comment.