generated from terraform-modules/template_aws_module
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- add feature for doing ecr lifecycle policy for image_config
- variable enable_lifecycle_policy_image_config
- variable lifecycle_policy_keep_count- Loading branch information
Showing
8 changed files
with
132 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| ## import for bringing in image_config | ||
| import { | ||
| for_each = module.images.image_map | ||
| to = module.images.aws_ecr_repository.image_repos[each.key] | ||
| id = each.value | ||
| } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| locals { | ||
| image_config = [for k, v in var.image_details : v if v.enabled] | ||
| image_output = { for k, v in module.images.images : v.name => v } | ||
|
|
||
| charts = { for k, v in var.chart_details : k => v if try(v.enabled, true) } | ||
| images = { for k, v in var.image_details : k => v if v.enabled } | ||
| } | ||
|
|
||
| module "images" { | ||
| source = "git@github.e.it.census.gov:terraform-modules/aws-ecr-copy-images.git?ref=tf-upgrade" | ||
|
|
||
| profile = var.profile | ||
| application_list = [] | ||
| application_name = format("eks/%v", var.cluster_name) | ||
| enable_lifecycle_policy = true | ||
| lifecycle_policy_all = true | ||
| enable_lifecycle_policy_image_config = true | ||
| lifecycle_policy_keep_count = 5 | ||
| image_config = local.image_config | ||
| tags = merge( | ||
| local.base_tags, | ||
| local.common_tags, | ||
| var.application_tags, | ||
| ) | ||
|
|
||
| ### optional | ||
| ## account_alias = "" | ||
| ## account_id = "" | ||
| ## destination_password = "" | ||
| ## destination_username = "" | ||
| ## override_prefixes = {} | ||
| ## region = "" | ||
| ## source_password = "" | ||
| ## source_username = "" | ||
| } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| locals { | ||
| _module_name = "aws-ecr-copy-images" | ||
| _module_version = "2.1.0" | ||
| _module_version = "2.2.0" | ||
| } |