cloudfoundry-community / terraform-aws-vpc

Terraform module for creating an AWS VPC with NAT box
Apache License 2.0
8 stars 14 forks source link

'aws_route_table.public' does not have an attribute 'id' for variable 'aws_route_table.public.id' #1

Open buzzedword opened 9 years ago

buzzedword commented 9 years ago
Error applying plan:

1 error(s) occurred:

* 1 error(s) occurred:

* Resource 'aws_route_table.public' does not have attribute 'id' for variable 'aws_route_table.public.id'

Terraform does not automatically rollback in the face of errors.
Instead, your Terraform state file has been partially updated with
any resources that successfully completed. Please address the error
above and apply again to incrementally change your infrastructure.

I've figured that the error lies somewhere around here: https://github.com/cloudfoundry-community/terraform-aws-vpc/blob/345589d1801f943c37b962babba89303db4b70ea/aws-vpc.tf#L135-L151

Any ideas on how to proceed from here?

buzzedword commented 9 years ago

Also, all I'm doing is bringing in this repository as such:

module "vpc" {
    source = "github.com/cloudfoundry-community/terraform-aws-vpc"
    aws_key_name = "${var.aws_key_name}"
    aws_key_path = ""
    aws_access_key = "${var.aws_access_key}"
    aws_secret_key = "${var.aws_secret_key}"
    aws_region = "${var.aws_region}"
}

Yes, I know, "I probably don't want to be using just this repo", but hey! :) I do.

anhcuong commented 8 years ago

I have this issue today while trying to creating my vpc and subnet.

Normally it was fine. But for the very first time, terraform threw error:

Resource 'aws_subnet.main' does not have attribute 'id' for variable 'aws_subnet.main.id'

After that, terraform stucks at aws_vpc.main: Destroying... like forever.

Noted that I just shutdown the whole system successfully in aws using terraform destroy and then run terraform apply.

I am using terrafrom v0.6.8