Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions infra/cloudrun.tf
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,7 @@ resource "google_cloud_run_v2_service" "img_resizer" {
}

lifecycle {
prevent_destroy = true

Choose a reason for hiding this comment

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

high

CI 실패 문제를 해결하기 위해 prevent_destroy를 제거하는 것은 이해됩니다. 하지만 이는 TERRAFORM_OPERATIONS.md 운영 가이드의 안전 수칙에 위배될 수 있으며, 향후 img-resizer 서비스가 의도치 않게 삭제될 위험을 만듭니다.

이 변경이 상태 드리프트(state drift) 해결을 위한 일회성 조치라면, prevent_destroy를 영구적으로 제거하는 대신 다음의 2단계 접근 방식을 고려하는 것이 더 안전합니다.

  1. 현재 PR에서 prevent_destroy를 제거하여 apply를 통해 상태를 바로잡습니다.
  2. 즉시 후속 PR을 통해 prevent_destroy = true를 다시 추가하여 리소스 보호 설정을 복원합니다.

이렇게 하면 현재 문제를 해결하면서도 장기적인 안정성을 유지할 수 있습니다.

References
  1. docs/infra/TERRAFORM_OPERATIONS.md 가이드라인(72라인)에서는 데이터 손실 및 서비스 중단을 방지하기 위해 주요 리소스의 prevent_destroy 속성 제거를 금지하고 있습니다. 이 규칙은 리소스가 실수로 삭제되는 것을 방지하는 중요한 안전장치입니다. (link)

ignore_changes = [
template[0].containers[0].image,
client,
client_version,
]
Expand Down