Terraform plan on m3 exercise gives lot of errors
smoms opened this issue · comments
When running terraform plan on m3 exercise I get lot of errors:
Error: Cannot import to non-existent resource address
│
│ Importing to resource address module.main.aws_subnet.public[0] is not possible, because that address does not exist in configuration. Please ensure that the resource key is correct, or remove this import block.
╵
╷
│ Error: Cannot import to non-existent resource address
│
│ Importing to resource address module.main.aws_subnet.public[1] is not possible, because that address does not exist in configuration. Please ensure that the resource key is correct, or remove this import block.
╵
╷
│ Error: Cannot import to non-existent resource address
│
│ Importing to resource address module.main.aws_internet_gateway.this[0] is not possible, because that address does not exist in configuration. Please ensure that the resource key is correct, or remove this import block.
╵
╷
│ Error: Cannot import to non-existent resource address
│
│ Importing to resource address module.main.aws_route.public_internet_gateway[0] is not possible, because that address does not exist in configuration. Please ensure that the resource key is correct, or remove this import block.
╵
╷
│ Error: Cannot import to non-existent resource address
│
│ Importing to resource address module.main.aws_route_table.public[0] is not possible, because that address does not exist in configuration. Please ensure that the resource key is correct, or remove this import block.
╵
╷
│ Error: Cannot import to non-existent resource address
│
│ Importing to resource address module.main.aws_route_table_association.public[0] is not possible, because that address does not exist in configuration. Please ensure that the resource key is correct, or remove this import block.
╵
╷
│ Error: Cannot import to non-existent resource address
│
│ Importing to resource address module.main.aws_route_table_association.public[1] is not possible, because that address does not exist in configuration. Please ensure that the resource key is correct, or remove this import block.
╵
hashicorp/terraform-provider-aws#33104 (comment)
there was the same issue for me. Error code: InvalidUserError :) = I didn't notice that I modified the import file in the template folder instead of in the copied one where the terraform cmd is run from - hence the errors..