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

lgtm-cat-processor 本番用のリソースを追加 #126

Merged
merged 1 commit into from
Sep 23, 2024

Conversation

kobayashi-m42
Copy link
Member

@kobayashi-m42 kobayashi-m42 commented Sep 22, 2024

issueURL

#123

Doneの定義

#123 の完了の定義を満たしていること

変更点概要

lgtm-cat-processor 本番用のリソースを追加。

補足情報

terraform applyを実行した際にエラーとなった。
apply自体は完了しているが、以下にエラーの詳細と回避方法をメモとして残す。

原因

Lambda 関数を作成する際に、ECR に latest タグのイメージが存在しなかったため、以下のエラーが発。

InvalidParameterValueException: Source image {account_id}.dkr.ecr.ap-northeast-1.amazonaws.com/prod-lgtm-image-processor:latest does not exist. Provide a valid source image.

原因は下記のコード。

image_uri = "${aws_ecr_repository.lgtm_image_processor.repository_url}:latest"

回避策

まず、lgtm-cat-processor のデプロイを実行し、ECR にイメージをpush。
次にTerraform のコード内で latest タグを、ECR に push された実際のタグに一時的に変更し、再度 terraform apply を実行。

@kobayashi-m42 kobayashi-m42 self-assigned this Sep 22, 2024
@kobayashi-m42 kobayashi-m42 marked this pull request as ready for review September 22, 2024 13:05
Copy link
Member

@keitakn keitakn left a comment

Choose a reason for hiding this comment

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

ありがとう🐱
問題なさそう👌

LGTMeow

@kobayashi-m42 kobayashi-m42 merged commit 6dea7ab into main Sep 23, 2024
1 check passed
@kobayashi-m42 kobayashi-m42 deleted the feature/issue123 branch September 23, 2024 11:33
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