Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
badra001 committed Aug 19, 2022
1 parent 080b398 commit 277db63
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 0 additions & 2 deletions locals.tf
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,4 @@ locals {
_account_alias = var.account_alias == null || var.account_alias == "" ? data.aws_iam_account_alias.current.account_alias : var.account_alias
account_alias = replace(local._account_alias, "do2", "do1")
account_environment = data.aws_arn.current.partition == "aws-us-gov" ? "gov" : "ew"

region = data.aws_region.current.name
}
4 changes: 2 additions & 2 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ data "aws_ecr_authorization_token" "token" {}

locals {
repo_parent_name = format("%v", var.application_name)
region = var.region == null ? local.region : var.region
region = var.region == null ? data.aws_region.current.name : var.region

account_ecr_registry = format("%v.dkr.ecr.%v.amazonaws.com", local.account_id, local.ecr_region)
account_ecr = format("%v/%v", local.account_ecr_registry, local.repo_parent_name)
Expand All @@ -71,7 +71,7 @@ locals {

resource "null_resource" "copy_images" {
triggers = {
ecr_region = local.ecr_region
region = local.region
}
for_each = { for image in local.images : image.key => image if image.enabled }

Expand Down

0 comments on commit 277db63

Please sign in to comment.