Skip to content

Commit

Permalink
chore: Update AWS provider to 'ecr' for ECR authentication (#1992)
Browse files Browse the repository at this point in the history
  • Loading branch information
edgarsilva948 authored Aug 6, 2024
1 parent 1975b53 commit 5d45b07
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 8 deletions.
2 changes: 1 addition & 1 deletion patterns/bottlerocket/addons.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# EKS Blueprints Addons
################################################################################
data "aws_ecrpublic_authorization_token" "token" {
provider = aws.virginia
provider = aws.ecr
}

module "eks_blueprints_addons" {
Expand Down
4 changes: 3 additions & 1 deletion patterns/bottlerocket/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,11 @@ provider "aws" {
region = local.region
}

# This provider is required for ECR to autheticate with public repos. Please note ECR authetication requires us-east-1 as region hence its hardcoded below.
# If your region is same as us-east-1 then you can just use one aws provider
provider "aws" {
alias = "ecr"
region = "us-east-1"
alias = "virginia"
}

provider "kubernetes" {
Expand Down
7 changes: 4 additions & 3 deletions patterns/karpenter-mng/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,11 @@ provider "aws" {
region = local.region
}

# Required for public ECR where Karpenter artifacts are hosted
# This provider is required for ECR to autheticate with public repos. Please note ECR authetication requires us-east-1 as region hence its hardcoded below.
# If your region is same as us-east-1 then you can just use one aws provider
provider "aws" {
alias = "ecr"
region = "us-east-1"
alias = "virginia"
}

provider "helm" {
Expand All @@ -49,7 +50,7 @@ provider "helm" {
################################################################################

data "aws_ecrpublic_authorization_token" "token" {
provider = aws.virginia
provider = aws.ecr
}

data "aws_availability_zones" "available" {
Expand Down
7 changes: 4 additions & 3 deletions patterns/karpenter/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@ provider "aws" {
region = local.region
}

# Required for public ECR where Karpenter artifacts are hosted
# This provider is required for ECR to autheticate with public repos. Please note ECR authetication requires us-east-1 as region hence its hardcoded below.
# If your region is same as us-east-1 then you can just use one aws provider
provider "aws" {
alias = "ecr"
region = "us-east-1"
alias = "virginia"
}

provider "kubernetes" {
Expand Down Expand Up @@ -35,7 +36,7 @@ provider "helm" {
}

data "aws_ecrpublic_authorization_token" "token" {
provider = aws.virginia
provider = aws.ecr
}

data "aws_availability_zones" "available" {}
Expand Down

0 comments on commit 5d45b07

Please sign in to comment.