Skip to content

Commit

Permalink
pull across accounts from central ecr
Browse files Browse the repository at this point in the history
  • Loading branch information
morga471 committed Apr 17, 2025
1 parent 5f55c71 commit e3f685b
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 10 deletions.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,16 @@
| Name | Version |
|------|---------|
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 0.13 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.14.0 |
| <a name="requirement_helm"></a> [helm](#requirement\_helm) | >= 2.11.0 |
| <a name="requirement_kubernetes"></a> [kubernetes](#requirement\_kubernetes) | >= 2.23.0 |

## Providers

| Name | Version |
|------|---------|
| <a name="provider_aws"></a> [aws](#provider\_aws) | 5.94.1 |
| <a name="provider_aws.eecr"></a> [aws.eecr](#provider\_aws.eecr) | 5.94.1 |
| <a name="provider_helm"></a> [helm](#provider\_helm) | 2.17.0 |

## Modules
Expand All @@ -27,6 +30,8 @@
|------|------|
| [helm_release.kiali](https://registry.terraform.io/providers/hashicorp/helm/latest/docs/resources/release) | resource |
| [helm_release.kiali_operator](https://registry.terraform.io/providers/hashicorp/helm/latest/docs/resources/release) | resource |
| [aws_ecr_authorization_token.ecr_token](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/ecr_authorization_token) | data source |
| [aws_ecr_authorization_token.token](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/ecr_authorization_token) | data source |

## Inputs

Expand Down
21 changes: 11 additions & 10 deletions copy_images.tf
Original file line number Diff line number Diff line change
Expand Up @@ -39,17 +39,18 @@ module "images" {
force_delete = true
lifecycle_policy_keep_count = 5

# source_username = data.aws_ecr_authorization_token.ecr_token.user_name
# source_password = data.aws_ecr_authorization_token.ecr_token.password
source_username = data.aws_ecr_authorization_token.ecr_token.user_name
source_password = data.aws_ecr_authorization_token.ecr_token.password

# destination_username = data.aws_ecr_authorization_token.token.user_name
# destination_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
}

# data "aws_ecr_authorization_token" "ecr_token" {
# registry_id = var.account_id
# }
data "aws_ecr_authorization_token" "ecr_token" {
provider = aws.eecr
registry_id = var.eecr_account_id
}

# data "aws_ecr_authorization_token" "token" {
# registry_id = var.account_id
# }
data "aws_ecr_authorization_token" "token" {
registry_id = var.account_id
}
4 changes: 4 additions & 0 deletions requirements.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ terraform {
required_version = ">= 0.13"

required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 5.14.0"
}
helm = {
source = "hashicorp/helm"
version = ">= 2.11.0"
Expand Down

0 comments on commit e3f685b

Please sign in to comment.