Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cross account ECR permissions issues #346

Open
scottillogical opened this issue Aug 18, 2023 · 1 comment
Open

Cross account ECR permissions issues #346

scottillogical opened this issue Aug 18, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@scottillogical
Copy link

scottillogical commented Aug 18, 2023

Hey folks I tried to switch is from the docker-image resource to oci-build-task and registry image, but we weren't able to get the ECR support working.

Our current setup is we have ECR running in another account (root) and currently we rely on ec2 node roles to allow concourse access to ECR.
Is the only way to get this working currently is to create a new access key that we would then need to rotate or is there a way to use node roles? I tried configuring the role arns using the latest release and was not able to resolve the authentication errors from ECR. Perhaps I am just doing it wrong?

Describe the solution you'd like

A way to use node roles like docker-image resource for ECR cross account access

@scottillogical scottillogical added the enhancement New feature or request label Aug 18, 2023
@MattSurabian
Copy link

MattSurabian commented Apr 9, 2024

I was able to get this working by setting this parameter

AWSECRRegistryId string `json:"aws_ecr_registry_id,omitempty"`
as implemented here #253.

The documentation is sparse on this, but it can be used in the resource definition (the quotes around it are REQUIRED):

- icon: docker
  name: my-repo
  source:
    aws_ecr_registry_id: "123456789012"
    aws_region: us-east-1
    repository: my-repo
  type: registry-image

This without any role arns set seems to work as expected. With the resource assuming the role of the underlying EC2 instance and operating on an ECR located in another account.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants