-
Notifications
You must be signed in to change notification settings - Fork 1
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
base: main
Are you sure you want to change the base?
OTA 용 HotUpdater 인프라 #468
Conversation
domain_name = "scc-hot-updater-storage.s3.ap-northeast-2.amazonaws.com" | ||
origin_id = "scc-hot-updater-storage" |
There was a problem hiding this comment.
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" |
There was a problem hiding this comment.
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" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
이건 무슨 태그에요?
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" | ||
} |
There was a problem hiding this comment.
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}/*",
]
}
}
TODO