Profile

DependencyViolation

CATEGORY
TOPIC
Terraform
STATUS
CREATED TIME
2022/05/31 18:28
ORIGINAL SOURCE
ORDER
0
SERIES
[ERROR]

개요

terraform 삭제 과정에서 발생한 DependencyViolation 오류
Error: error deleting EC2 VPC (vpc-0f3ea90439678f774): DependencyViolation: The vpc 'vpc-0f3ea90439678f774' has dependencies and cannot be deleted. status code: 400, request id: cfd681b5-56d0-468a-9b19-75c8a1d528b7
JSON

가능한 해결방안

create before destroyname_prefix 를 조합하여 사용 이름 충돌이 나지 않도록 할 것
모듈을 더 잘게 분해하고, depends_on 을 사용