aws-samples / otl-service-launcher

MIT No Attribution
3 stars 3 forks source link

EMR sometimes fails to launch due to subnet-no-route error #18

Open adam-imeson opened 3 years ago

adam-imeson commented 3 years ago

EMR launch fails with the following:

Error: Error waiting for EMR Cluster state to be "WAITING" or "RUNNING": TERMINATED_WITH_ERRORS: VALIDATION_ERROR: The VPC/subnet configuration was invalid: No route to any external sources detected in Route Table for Subnet: subnet-0320ce06e1dac7fb7 for VPC: vpc-092fe9932e58882e4
│
│   with module.emr_cluster[0].aws_emr_cluster.outpost_cluster,
│   on modules/emr/main.tf line 1, in resource "aws_emr_cluster" "outpost_cluster":
│    1: resource "aws_emr_cluster" "outpost_cluster" {
│
╵

I'm guessing that it's a dependency issue, where the subnet's route table isn't getting updated by the time the EMR cluster creation call comes through. Probably just need to add a depends_on clause to the EMR cluster.