Skip to content

Commit 9fb37c7

Browse files
authored
chore : 빌드시 aws관련 정보 application-secret.yml에 들어가도록 설정 (#73)
* chore : S3 사용을 위해 빌드시 AWS 정보 application-secrets.yml에 추가되도록 설정 * chore : 역할에 S3 접근 정책 부착 하도록 설정 * chore : ãyml에 추가정보 넣도록 설정
1 parent b9d7681 commit 9fb37c7

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

.github/workflows/test-server-ci.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,11 @@ jobs:
5555
echo "${{ secrets.APPLICATION_SECRET_YML }}" > src/main/resources/application-secrets.yml
5656
echo "OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}" >> src/main/resources/application-secrets.yml
5757
58+
echo "spring.cloud.aws.region.static: ${{ secrets.AWS_REGION }}" >> src/main/resources/application-secrets.yml
59+
echo "spring.cloud.aws.credentials.access-key: ${{ secrets.AWS_ACCESS_KEY_ID }}" >> src/main/resources/application-secrets.yml
60+
echo "spring.cloud.aws.credentials.secret-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}" >> src/main/resources/application-secrets.yml
61+
echo "spring.cloud.aws.s3.bucket: ${{ secrets.AWS_S3_BUCKET_NAME }}" >> src/main/resources/application-secrets.yml
62+
echo "spring.cloud.aws.stack : false" >> src/main/resources/application-secrets.yml
5863
# 6. application-secrets-server.yml 생성
5964
- name: Generate application-secrets-server.yml
6065
run: |

infra/terraform/modules/iam/main.tf

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ resource "aws_iam_role" "ec2_role" {
1313
}
1414

1515
# 역할에 S3 접근 정책 부착 (사용하지 않을 경우 주석 처리)
16-
# resource "aws_iam_role_policy_attachment" "s3_full" {
17-
# role = aws_iam_role.ec2_role.name
18-
# policy_arn = "arn:aws:iam::aws:policy/AmazonS3FullAccess"
19-
# }
16+
resource "aws_iam_role_policy_attachment" "s3_full" {
17+
role = aws_iam_role.ec2_role.name
18+
policy_arn = "arn:aws:iam::aws:policy/AmazonS3FullAccess"
19+
}
2020

2121
# 역할에 SSM 접근 정책 부착 (AWS Systems Manager)
2222
resource "aws_iam_role_policy_attachment" "ssm" {

0 commit comments

Comments
 (0)