Skip to content

Commit

Permalink
use try
Browse files Browse the repository at this point in the history
  • Loading branch information
morga471 committed Apr 20, 2025
1 parent 9c49f3d commit 90e5582
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions copy_images.tf
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ module "images" {
force_delete = true
lifecycle_policy_keep_count = 5

source_username = local.image_config.source_username || ""
source_password = local.image_config.source_password || ""
source_username = try(local.image_config.source_username, data.aws_ecr_authorization_token.token.user_name)
source_password = try(local.image_config.source_password, data.aws_ecr_authorization_token.token.password)

destination_username = data.aws_ecr_authorization_token.token.user_name
destination_password = data.aws_ecr_authorization_token.token.password
Expand Down

0 comments on commit 90e5582

Please sign in to comment.