Recently I was interested in Terraform timeouts, so I wanted to find information about what are the default timeouts and is it possible to change them. According to Terraform documentation, these are the default timeouts - documentation
I tested it via deletion of VPC, I created dependency(Security Group) via AWS Management Console so that Terraform cannot delete the VPC. Eventually, the timeout was 5 minutes, not the 20 minutes specified by Terraform documentation.
Also, VPC type of resource in Terraform doesn’t support timeouts
block so I didn’t find any information that the default timeout was set to 5 minutes.
So why timeout of deletion of VPC doesn’t much with the default?
aws_vpc.my-vpc: Destroying... [id=vpc-0d94990c9d22351a4]
aws_vpc.my-vpc: Still destroying... [id=vpc-0d94990c9d22351a4, 10s elapsed]
aws_vpc.my-vpc: Still destroying... [id=vpc-0d94990c9d22351a4, 20s elapsed]
aws_vpc.my-vpc: Still destroying... [id=vpc-0d94990c9d22351a4, 30s elapsed]
aws_vpc.my-vpc: Still destroying... [id=vpc-0d94990c9d22351a4, 40s elapsed]
aws_vpc.my-vpc: Still destroying... [id=vpc-0d94990c9d22351a4, 50s elapsed]
aws_vpc.my-vpc: Still destroying... [id=vpc-0d94990c9d22351a4, 1m0s elapsed]
aws_vpc.my-vpc: Still destroying... [id=vpc-0d94990c9d22351a4, 1m10s elapsed]
aws_vpc.my-vpc: Still destroying... [id=vpc-0d94990c9d22351a4, 1m20s elapsed]
aws_vpc.my-vpc: Still destroying... [id=vpc-0d94990c9d22351a4, 1m30s elapsed]
aws_vpc.my-vpc: Still destroying... [id=vpc-0d94990c9d22351a4, 1m40s elapsed]
aws_vpc.my-vpc: Still destroying... [id=vpc-0d94990c9d22351a4, 1m50s elapsed]
aws_vpc.my-vpc: Still destroying... [id=vpc-0d94990c9d22351a4, 2m0s elapsed]
aws_vpc.my-vpc: Still destroying... [id=vpc-0d94990c9d22351a4, 2m10s elapsed]
aws_vpc.my-vpc: Still destroying... [id=vpc-0d94990c9d22351a4, 2m20s elapsed]
aws_vpc.my-vpc: Still destroying... [id=vpc-0d94990c9d22351a4, 2m30s elapsed]
aws_vpc.my-vpc: Still destroying... [id=vpc-0d94990c9d22351a4, 2m40s elapsed]
aws_vpc.my-vpc: Still destroying... [id=vpc-0d94990c9d22351a4, 2m50s elapsed]
aws_vpc.my-vpc: Still destroying... [id=vpc-0d94990c9d22351a4, 3m0s elapsed]
aws_vpc.my-vpc: Still destroying... [id=vpc-0d94990c9d22351a4, 3m10s elapsed]
aws_vpc.my-vpc: Still destroying... [id=vpc-0d94990c9d22351a4, 3m20s elapsed]
aws_vpc.my-vpc: Still destroying... [id=vpc-0d94990c9d22351a4, 3m30s elapsed]
aws_vpc.my-vpc: Still destroying... [id=vpc-0d94990c9d22351a4, 3m40s elapsed]
aws_vpc.my-vpc: Still destroying... [id=vpc-0d94990c9d22351a4, 3m50s elapsed]
aws_vpc.my-vpc: Still destroying... [id=vpc-0d94990c9d22351a4, 4m0s elapsed]
aws_vpc.my-vpc: Still destroying... [id=vpc-0d94990c9d22351a4, 4m10s elapsed]
aws_vpc.my-vpc: Still destroying... [id=vpc-0d94990c9d22351a4, 4m20s elapsed]
aws_vpc.my-vpc: Still destroying... [id=vpc-0d94990c9d22351a4, 4m30s elapsed]
aws_vpc.my-vpc: Still destroying... [id=vpc-0d94990c9d22351a4, 4m40s elapsed]
aws_vpc.my-vpc: Still destroying... [id=vpc-0d94990c9d22351a4, 4m50s elapsed]
╷
│ Error: error deleting EC2 VPC (vpc-0d94990c9d22351a4): DependencyViolation: The vpc 'vpc-0d94990c9d22351a4' has dependencies and cannot be deleted.
│ status code: 400, request id: 2f4cc326-0229-43f7-bcb5-aba1f7d7e901