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

OTA 용 HotUpdater 인프라 #468

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

sanggggg
Copy link
Contributor

@sanggggg sanggggg commented Mar 7, 2025

TODO

  • lambda resource 추가하기

@sanggggg sanggggg requested a review from a team as a code owner March 7, 2025 16:48
Comment on lines +5 to +6
domain_name = "scc-hot-updater-storage.s3.ap-northeast-2.amazonaws.com"
origin_id = "scc-hot-updater-storage"
Copy link
Member

Choose a reason for hiding this comment

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

이런거 aws_s3_bucket.prod_scc_hot_updater_storage.bucket_regional_domain_name 처럼 레퍼런스 형식으로 바꾸면 좋을듯

lambda_function_association {
event_type = "viewer-request"
include_body = false
lambda_arn = "arn:aws:lambda:us-east-1:291889421067:function:hot-updater-edge:1"
Copy link
Member

Choose a reason for hiding this comment

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

람다는 terraform 으로 못만들겠죠?

resource "aws_iam_user" "hot_update_user" {
name = "hot-update-user"
tags = {
"AKIAUH5PXDMFXDWJFIHW" = "hot_updater_deploy"
Copy link
Member

Choose a reason for hiding this comment

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

이건 무슨 태그에요?

Comment on lines +11 to +14
resource "aws_iam_user_policy_attachment" "hot_update_s3" {
user = aws_iam_user.hot_update_user.name
policy_arn = "arn:aws:iam::aws:policy/AmazonS3FullAccess"
}
Copy link
Member

Choose a reason for hiding this comment

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

이것도 모든 bucket 에 full access 주는것보다
아래처럼 policy document 를 만들어서 특정 resource 만 제한하는게 좋아보여요

data "aws_iam_policy_document" "scc_loki_storage_full_access" {
  statement {
    actions = [
      "s3:*",
    ]
    resources = [
      aws_s3_bucket.scc_loki_storage.arn,
      "${aws_s3_bucket.scc_loki_storage.arn}/*",
    ]
  }
}

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