Skip to content

Commit

Permalink
remove explicit dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
jdongo-aneo committed Oct 31, 2024
1 parent 05e8196 commit 14365ec
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
1 change: 0 additions & 1 deletion container-registry/aws/ecr/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ No modules.
| [aws_iam_policy_document.only_pull](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy_document) | data source |
| [aws_iam_policy_document.permissions](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy_document) | data source |
| [aws_iam_policy_document.push_and_pull](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy_document) | data source |
| [aws_region.current](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/region) | data source |

## Inputs

Expand Down
6 changes: 1 addition & 5 deletions container-registry/aws/ecr/main.tf
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
# Current account
data "aws_caller_identity" "current" {}

# Current AWS region
data "aws_region" "current" {}

data "aws_ecr_authorization_token" "current" {}

locals {
region = data.aws_region.current.name
current_account = data.aws_caller_identity.current.account_id
only_pull_accounts_root = formatlist("arn:aws:iam::%s:root", var.only_pull_accounts)
push_and_pull_accounts_root = formatlist("arn:aws:iam::%s:root", var.push_and_pull_accounts)
Expand Down Expand Up @@ -131,7 +127,7 @@ resource "skopeo2_copy" "copy_images" {
retries = 10
retry_delay = 10

depends_on = [aws_ecr_repository.ecr, null_resource.logout_public_ecr]
depends_on = [null_resource.logout_public_ecr]
}

# This is to fix the auth token expired issue describe here: https://docs.aws.amazon.com/AmazonECR/latest/public/public-registries.html
Expand Down

0 comments on commit 14365ec

Please sign in to comment.