Skip to content

Conversation

@lvalentine6
Copy link
Member

@lvalentine6 lvalentine6 commented Aug 26, 2025

✨ 개요

  • deprecated 된 명령어인 data.aws_region.current.name을 data.aws_region.current.id로 변경하였습니다.
  • 서비스와 인프라의 변동은 없습니다.

🧾 관련 이슈

Closed #185

🔍 참고 사항 (선택)

Summary by CodeRabbit

  • 버그 수정
    • 리전 식별 방식 정정으로 구성 파라미터 및 KMS 복호화 권한 경로 오류를 해소하여 간헐적 접근 실패를 방지했습니다. 다중 리전 환경에서 일관된 동작을 보장합니다.
  • 유지보수
    • 인프라 접근 정책의 리전 참조를 정리해 권한 범위를 명확화했습니다. 운영 안정성과 가시성을 향상합니다.

@coderabbitai
Copy link

coderabbitai bot commented Aug 26, 2025

Walkthrough

Terraform ARNs in ecs task role inline policies and SSM MySQL parameter policy were updated to use data.aws_region.current.id instead of data.aws_region.current.name for SSM parameters and KMS decrypt resources within terraform/common/locals.tf.

Changes

Cohort / File(s) Summary
Terraform region reference updates
terraform/common/locals.tf
Replaced data.aws_region.current.name with data.aws_region.current.id in SSM Parameter Store ARNs (MYSQL_URL, MYSQL_USER_NAME, MYSQL_PASSWORD) and in ecsAppTaskRole inline policies for parameter/dev/, parameter/prod/ and KMS Decrypt resource ARNs.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Assessment against linked issues

Objective Addressed Explanation
data.aws_region.current.name deprecation: replace all references with .id (#185) 변경은 확인되나, 전체 코드베이스의 모든 참조가 교체되었는지 본 PR로는 확인 불가.

Poem

작은 발로 팡팡, 지역 이름은 안녕!
이제는 id로 쏙, 파라미터도 반짝롱 ✨
KMS도 끄덕끄덕, 해독 길이 반듯해—
터레폼 밭에 바람 분다, 깃발이 살짝 쉿—
오늘도 토끼는 머지 버튼을 살짝 눌러 홉! 🐇

Tip

🔌 Remote MCP (Model Context Protocol) integration is now available!

Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats.

✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch ci/PRODUCT-272

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@github-actions
Copy link

📄 Terraform Plan Summary

🛡️ Common Infrastructure


No plan summary

Status: ✅ No Changes


🛠️ Development Environment


No plan summary

Status: ✅ No Changes


📋 Full Results: View in Actions

Copy link
Member

@leegwichan leegwichan left a comment

Choose a reason for hiding this comment

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

고생하셨습니다! 사소한 부분까지 놓치지 않는 승로님 👍

@sonarqubecloud
Copy link

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (2)
terraform/common/locals.tf (2)

90-92: 동일 맥락: dev/prod 파라미터 ARNs도 region 속성으로 전환 고려

id로의 치환은 실행에 문제없으나, Terraform AWS Provider v6의 가이드에 맞춰 region 속성 사용으로 통일하는 것이 추후 업그레이드(v7) 대비에 유리합니다. 현재 PR 범위를 벗어난다면 후속 작업으로 분리합시다. (newreleases.io)

-                  "arn:aws:ssm:${data.aws_region.current.id}:${data.aws_caller_identity.current.account_id}:parameter/dev/*",
-                  "arn:aws:ssm:${data.aws_region.current.id}:${data.aws_caller_identity.current.account_id}:parameter/prod/*"
+                  "arn:aws:ssm:${data.aws_region.current.region}:${data.aws_caller_identity.current.account_id}:parameter/dev/*",
+                  "arn:aws:ssm:${data.aws_region.current.region}:${data.aws_caller_identity.current.account_id}:parameter/prod/*"

45-47: ✔️ .name 속성 미사용 확인 – 현 PR 승인 및 Optional region 전환 제안

레포 내 모든 .tf 파일에서 data.aws_region.*.name 호출이 전혀 없음을 확인했습니다.
따라서 이번 PR에서 이미 적용하신 ${data.aws_region.current.id} 사용은 문제없이 동작하며, 현 단계에서는 그대로 머지하셔도 좋습니다.

다만 AWS Provider v6 권고(.name 대신 .region 사용)를 장기 호환성(v7 이상) 차원에서 Optional로 권장드립니다. 후속 PR에서 아래처럼 일괄 전환을 고려해 보세요:

-                  "arn:aws:ssm:${data.aws_region.current.id}:${data.aws_caller_identity.current.account_id}:parameter/dev/MYSQL_URL",
-                  "arn:aws:ssm:${data.aws_region.current.id}:${data.aws_caller_identity.current.account_id}:parameter/dev/MYSQL_USER_NAME",
-                  "arn:aws:ssm:${data.aws_region.current.id}:${data.aws_caller_identity.current.account_id}:parameter/dev/MYSQL_PASSWORD"
+                  "arn:aws:ssm:${data.aws_region.current.region}:${data.aws_caller_identity.current.account_id}:parameter/dev/MYSQL_URL",
+                  "arn:aws:ssm:${data.aws_region.current.region}:${data.aws_caller_identity.current.account_id}:parameter/dev/MYSQL_USER_NAME",
+                  "arn:aws:ssm:${data.aws_region.current.region}:${data.aws_caller_identity.current.account_id}:parameter/dev/MYSQL_PASSWORD"
  • 검증 커맨드:
    rg -nP -C2 -g '**/*.tf' 'data\.aws_region\.[A-Za-z0-9_-]+\.(name)\b'
  • 대상 파일: terraform/common/locals.tf (45–47라인)
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 29a9fa7 and 80ee7cd.

📒 Files selected for processing (1)
  • terraform/common/locals.tf (2 hunks)
🧰 Additional context used
🧠 Learnings (1)
📓 Common learnings
Learnt from: lvalentine6
PR: YAPP-Github/26th-Web-Team-1-BE#181
File: src/main/java/eatda/controller/story/StoryResponse.java:29-32
Timestamp: 2025-08-17T18:38:26.970Z
Learning: lvalentine6 prefers to manage PR scope carefully and defer non-critical improvements to future refactoring when the current PR is already large in scope, showing good judgment in prioritizing deliverable completion over scope expansion.
Learnt from: lvalentine6
PR: YAPP-Github/26th-Web-Team-1-BE#181
File: src/main/java/eatda/controller/story/StoryRegisterRequest.java:11-17
Timestamp: 2025-08-17T18:37:21.953Z
Learning: lvalentine6 prefers to apply validation annotations consistently across all record classes in the project rather than implementing them piecemeal, prioritizing architectural consistency and maintainability.
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: test

@lvalentine6 lvalentine6 merged commit f7efd27 into develop Aug 26, 2025
12 checks passed
@lvalentine6 lvalentine6 deleted the ci/PRODUCT-272 branch August 26, 2025 12:01
@github-actions
Copy link

🎉 This PR is included in version 1.8.0-develop.12 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@github-actions
Copy link

🎉 This PR is included in version 1.8.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[PRODUCT-272] [Ci] 테라폼 명령어 마이그레이션

3 participants