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

feat: allow AWS account ID to change for ECR policy #2609

Merged
merged 2 commits into from
Oct 17, 2023

Conversation

jakeyheath
Copy link
Contributor

@jakeyheath jakeyheath commented Oct 17, 2023

CCIE-2010
Summary Allow module to be used across AWS accounts
Type Task Task
Status To Do

https://czi-tech.atlassian.net/browse/CCIE-2010?atlOrigin=eyJpIjoiNDg5ODEyMzVlMWRkNGUxMmI0Zjc2NjJiNzNiZmY0YjkiLCJwIjoiamlyYS1zbGFjay1pbnQifQ

This allows the caller to change the AWS account that the ECR lives in. If nothing is specified, it will use the current account that it i s being executed. This is helpful when we need to grant one CI role access to other happy environments.

@jakeyheath jakeyheath requested a review from a team as a code owner October 17, 2023 16:09
@jakeyheath jakeyheath requested review from dtsai-czi, alexlokshin-czi and hspitzley-czi and removed request for a team October 17, 2023 16:09
@github-actions
Copy link
Contributor

No Jira issue reference found in branch, title, or body of PR.

Please add a reference to a Jira issue in the form of CCIE-#### (eg: CCIE-1400) to the branch name, title, or body of your PR.

@github-actions
Copy link
Contributor

No Jira issue reference found in branch, title, or body of PR.

Please add a reference to a Jira issue in the form of CCIE-#### (eg: CCIE-1400) to the branch name, title, or body of your PR.

@@ -24,7 +28,7 @@ module "autocreated_ecr_writer_policy" {
source = "[email protected]:chanzuckerberg/shared-infra//terraform/modules/aws-iam-policy-ecr-writer?ref=v0.125.0"
role_name = var.gh_actions_role_name
// TODO: not a super fan of this. Would be ideal to have the role only have access to the stacks created by this happy project
ecr_repository_arns = ["arn:aws:ecr:us-west-2:${data.aws_caller_identity.current.account_id}:repository/*/${var.tags.env}/*"]
ecr_repository_arns = ["arn:aws:ecr:us-west-2:${local.account_id}:repository/*/${var.tags.env}/*"]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Definitely calls for shared ecr repositories!

@jakeyheath jakeyheath merged commit e9062ad into main Oct 17, 2023
29 of 31 checks passed
@jakeyheath jakeyheath deleted the heathj/feat-ecr-aws-account-id branch October 17, 2023 17:07
@czi-github-helper czi-github-helper bot mentioned this pull request Oct 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants