diff --git a/copy_images.tf b/copy_images.tf index e269303..21a6668 100644 --- a/copy_images.tf +++ b/copy_images.tf @@ -26,8 +26,8 @@ locals { source_registry = "public.ecr.aws" source_tag = var.postgresql_tag tag = var.postgresql_tag - source_username = null - source_password = null + source_username = data.aws_ecr_authorization_token.token.user_name + source_password = data.aws_ecr_authorization_token.token.passwordgst }, { enabled = true @@ -56,8 +56,8 @@ module "images" { force_delete = true lifecycle_policy_keep_count = 5 - source_username = !local.image_config.source_username ? data.aws_ecr_authorization_token.token.user_name : "" - source_password = !local.image_config.source_password ? data.aws_ecr_authorization_token.token.password : "" + source_username = local.image_config.source_username + source_password = local.image_config.source_password destination_username = data.aws_ecr_authorization_token.token.user_name destination_password = data.aws_ecr_authorization_token.token.password