Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stuck on "Refreshing state" #410

Closed
seanherron opened this issue Oct 15, 2014 · 12 comments
Closed

Stuck on "Refreshing state" #410

seanherron opened this issue Oct 15, 2014 · 12 comments

Comments

@seanherron
Copy link
Contributor

Just upgraded to 0.3 and whenever I run either terraform plan or terraform apply I seem to be stuck on the refreshing state phase for my AWS VPC:

~/P/p/i/terraform  ❯❯❯ terraform plan                                                                                                           ✱ git:master
Refreshing Terraform state prior to plan...

aws_vpc.name Refreshing state... (ID: vpc-########)

This ran for almost 10 minutes three times before I gave up.

Here's my (cleansed) terraform.tfstate:

{
    "version": 1,
    "serial": 197,
    "modules": [
        {
            "path": [
                "root"
            ],
            "outputs": {},
            "resources": {
                "aws_eip.us-east-1a-nat": {
                    "type": "aws_eip",
                    "depends_on": [
                        "aws_instance.us-east-1a-nat"
                    ],
                    "primary": {
                        "id": "##",
                        "attributes": {
                            "domain": "vpc",
                            "id": "##",
                            "instance": "i-0bbf85e0",
                            "private_ip": "10.19.61.16",
                            "public_ip": "##.##.##.##",
                            "vpc": "true"
                        }
                    }
                },
                "aws_eip.us-east-1b-nat": {
                    "type": "aws_eip",
                    "depends_on": [
                        "aws_instance.us-east-1b-nat"
                    ],
                    "primary": {
                        "id": "##",
                        "attributes": {
                            "domain": "vpc",
                            "id": "##",
                            "instance": "i-4a7c3da7",
                            "private_ip": "10.19.61.49",
                            "public_ip": "##.##.##.##",
                            "vpc": "true"
                        }
                    }
                },
                "aws_instance.salt1a": {
                    "type": "aws_instance",
                    "depends_on": [
                        "aws_security_group.private",
                        "aws_subnet.us-east-1a-private"
                    ],
                    "primary": {
                        "id": "##",
                        "attributes": {
                            "ami": "ami-9eaa1cf6",
                            "associate_public_ip_address": "false",
                            "availability_zone": "us-east-1a",
                            "id": "##",
                            "instance_type": "t2.micro",
                            "key_name": "##",
                            "private_dns": "ip-10-19-61-76.ec2.internal",
                            "private_ip": "10.19.61.76",
                            "public_dns": "",
                            "public_ip": "",
                            "security_groups.#": "1",
                            "security_groups.0": "sg-e1310884",
                            "subnet_id": "##",
                            "tags.Agency": "##",
                            "tags.Name": "Salt 1A"
                        }
                    }
                },
                "aws_instance.salt1b": {
                    "type": "aws_instance",
                    "depends_on": [
                        "aws_security_group.private",
                        "aws_subnet.us-east-1b-private"
                    ],
                    "primary": {
                        "id": "##",
                        "attributes": {
                            "ami": "ami-9eaa1cf6",
                            "associate_public_ip_address": "false",
                            "availability_zone": "us-east-1b",
                            "id": "##",
                            "instance_type": "t2.micro",
                            "key_name": "##",
                            "private_dns": "ip-10-19-61-110.ec2.internal",
                            "private_ip": "10.19.61.110",
                            "public_dns": "",
                            "public_ip": "",
                            "security_groups.#": "1",
                            "security_groups.0": "sg-e1310884",
                            "subnet_id": "##",
                            "tags.Agency": "##",
                            "tags.Name": "Salt 1B"
                        }
                    }
                },
                "aws_instance.us-east-1a-nat": {
                    "type": "aws_instance",
                    "depends_on": [
                        "aws_security_group.nat",
                        "aws_security_group.herron-access",
                        "aws_subnet.us-east-1a-public"
                    ],
                    "primary": {
                        "id": "##",
                        "attributes": {
                            "ami": "ami-4c9e4b24",
                            "associate_public_ip_address": "false",
                            "availability_zone": "us-east-1a",
                            "id": "##",
                            "instance_type": "t2.micro",
                            "key_name": "##",
                            "private_dns": "ip-10-19-61-16.ec2.internal",
                            "private_ip": "10.19.61.16",
                            "public_dns": "",
                            "public_ip": "##.##.##.##",
                            "security_groups.#": "2",
                            "security_groups.0": "sg-e6310883",
                            "security_groups.1": "sg-863807e3",
                            "source_dest_check": "false",
                            "subnet_id": "##",
                            "tags.Agency": "##",
                            "tags.Name": "NAT 1A"
                        }
                    }
                },
                "aws_instance.us-east-1b-nat": {
                    "type": "aws_instance",
                    "depends_on": [
                        "aws_subnet.us-east-1b-public",
                        "aws_security_group.nat",
                        "aws_security_group.herron-access"
                    ],
                    "primary": {
                        "id": "##",
                        "attributes": {
                            "ami": "ami-4c9e4b24",
                            "associate_public_ip_address": "false",
                            "availability_zone": "us-east-1b",
                            "id": "##",
                            "instance_type": "t2.micro",
                            "key_name": "##",
                            "private_dns": "ip-10-19-61-49.ec2.internal",
                            "private_ip": "10.19.61.49",
                            "public_dns": "",
                            "public_ip": "##.##.##.##",
                            "security_groups.#": "2",
                            "security_groups.0": "sg-e6310883",
                            "security_groups.1": "sg-863807e3",
                            "source_dest_check": "false",
                            "subnet_id": "##",
                            "tags.Agency": "##",
                            "tags.Name": "NAT 1B"
                        }
                    }
                },
                "aws_internet_gateway.default": {
                    "type": "aws_internet_gateway",
                    "depends_on": [
                        "aws_vpc.##"
                    ],
                    "primary": {
                        "id": "##",
                        "attributes": {
                            "id": "##",
                            "vpc_id": "vpc-##"
                        }
                    }
                },
                "aws_route53_record.nata": {
                    "type": "aws_route53_record",
                    "depends_on": [
                        "aws_eip.us-east-1a-nat"
                    ],
                    "primary": {
                        "id": "##",
                        "attributes": {
                            "id": "##",
                            "name": "nata.##.18f.us",
                            "records.#": "1",
                            "records.0": "54.85.68.166",
                            "ttl": "300",
                            "type": "A",
                            "zone_id": "Z3PIZ2HPFAFQXL"
                        }
                    }
                },
                "aws_route53_record.natb": {
                    "type": "aws_route53_record",
                    "depends_on": [
                        "aws_eip.us-east-1b-nat"
                    ],
                    "primary": {
                        "id": "##",
                        "attributes": {
                            "id": "##",
                            "name": "natb.##.18f.us",
                            "records.#": "1",
                            "records.0": "54.172.85.83",
                            "ttl": "300",
                            "type": "A",
                            "zone_id": "Z3PIZ2HPFAFQXL"
                        }
                    }
                },
                "aws_route53_record.salta": {
                    "type": "aws_route53_record",
                    "depends_on": [
                        "aws_instance.salt1a"
                    ],
                    "primary": {
                        "id": "##",
                        "attributes": {
                            "id": "##",
                            "name": "salta.##.18f.us",
                            "records.#": "1",
                            "records.0": "10.19.61.76",
                            "ttl": "300",
                            "type": "A",
                            "zone_id": "Z3PIZ2HPFAFQXL"
                        }
                    }
                },
                "aws_route53_record.saltb": {
                    "type": "aws_route53_record",
                    "depends_on": [
                        "aws_instance.salt1a"
                    ],
                    "primary": {
                        "id": "##",
                        "attributes": {
                            "id": "##",
                            "name": "salta.##.18f.us",
                            "records.#": "1",
                            "records.0": "10.19.61.76",
                            "ttl": "300",
                            "type": "A",
                            "zone_id": "Z3PIZ2HPFAFQXL"
                        }
                    }
                },
                "aws_route_table.us-east-1-public": {
                    "type": "aws_route_table",
                    "depends_on": [
                        "aws_vpc.##",
                        "aws_internet_gateway.default"
                    ],
                    "primary": {
                        "id": "##",
                        "attributes": {
                            "id": "##",
                            "route.#": "1",
                            "route.0.cidr_block": "0.0.0.0/0",
                            "route.0.gateway_id": "##",
                            "vpc_id": "vpc-##"
                        }
                    }
                },
                "aws_route_table.us-east-1a-private": {
                    "type": "aws_route_table",
                    "depends_on": [
                        "aws_vpc.##",
                        "aws_instance.us-east-1a-nat"
                    ],
                    "primary": {
                        "id": "##",
                        "attributes": {
                            "id": "##",
                            "route.#": "1",
                            "route.0.cidr_block": "0.0.0.0/0",
                            "route.0.instance_id": "##",
                            "vpc_id": "vpc-##"
                        }
                    }
                },
                "aws_route_table.us-east-1b-private": {
                    "type": "aws_route_table",
                    "depends_on": [
                        "aws_vpc.##",
                        "aws_instance.us-east-1b-nat"
                    ],
                    "primary": {
                        "id": "##",
                        "attributes": {
                            "id": "##",
                            "route.#": "1",
                            "route.0.cidr_block": "0.0.0.0/0",
                            "route.0.instance_id": "##",
                            "vpc_id": "vpc-##"
                        }
                    }
                },
                "aws_route_table_association.us-east-1a-private": {
                    "type": "aws_route_table_association",
                    "depends_on": [
                        "aws_subnet.us-east-1a-private",
                        "aws_route_table.us-east-1a-private"
                    ],
                    "primary": {
                        "id": "##",
                        "attributes": {
                            "id": "##",
                            "route_table_id": "##",
                            "subnet_id": "subnet-672df610"
                        }
                    }
                },
                "aws_route_table_association.us-east-1a-public": {
                    "type": "aws_route_table_association",
                    "depends_on": [
                        "aws_subnet.us-east-1a-public",
                        "aws_route_table.us-east-1-public"
                    ],
                    "primary": {
                        "id": "##",
                        "attributes": {
                            "id": "##",
                            "route_table_id": "##",
                            "subnet_id": "subnet-782df60f"
                        }
                    }
                },
                "aws_route_table_association.us-east-1b-private": {
                    "type": "aws_route_table_association",
                    "depends_on": [
                        "aws_subnet.us-east-1b-private",
                        "aws_route_table.us-east-1b-private"
                    ],
                    "primary": {
                        "id": "##",
                        "attributes": {
                            "id": "##",
                            "route_table_id": "##",
                            "subnet_id": "subnet-3cb57065"
                        }
                    }
                },
                "aws_route_table_association.us-east-1b-public": {
                    "type": "aws_route_table_association",
                    "depends_on": [
                        "aws_subnet.us-east-1b-public",
                        "aws_route_table.us-east-1-public"
                    ],
                    "primary": {
                        "id": "##",
                        "attributes": {
                            "id": "##",
                            "route_table_id": "##",
                            "subnet_id": "subnet-3db57064"
                        }
                    }
                },
                "aws_security_group.app": {
                    "type": "aws_security_group",
                    "depends_on": [
                        "aws_vpc.##"
                    ],
                    "primary": {
                        "id": "##",
                        "attributes": {
                            "description": "Allow services for ## Application Servers",
                            "id": "##",
                            "ingress.#": "4",
                            "ingress.0.cidr_blocks.#": "1",
                            "ingress.0.cidr_blocks.0": "0.0.0.0/0",
                            "ingress.0.from_port": "22",
                            "ingress.0.protocol": "tcp",
                            "ingress.0.self": "false",
                            "ingress.0.to_port": "22",
                            "ingress.1.cidr_blocks.#": "1",
                            "ingress.1.cidr_blocks.0": "0.0.0.0/0",
                            "ingress.1.from_port": "49521",
                            "ingress.1.protocol": "tcp",
                            "ingress.1.self": "false",
                            "ingress.1.to_port": "49521",
                            "ingress.2.cidr_blocks.#": "1",
                            "ingress.2.cidr_blocks.0": "0.0.0.0/0",
                            "ingress.2.from_port": "80",
                            "ingress.2.protocol": "tcp",
                            "ingress.2.self": "false",
                            "ingress.2.to_port": "80",
                            "ingress.3.cidr_blocks.#": "1",
                            "ingress.3.cidr_blocks.0": "0.0.0.0/0",
                            "ingress.3.from_port": "443",
                            "ingress.3.protocol": "tcp",
                            "ingress.3.self": "false",
                            "ingress.3.to_port": "443",
                            "name": "##-app",
                            "owner_id": "##",
                            "vpc_id": "vpc-##"
                        }
                    }
                },
                "aws_security_group.##-access": {
                    "type": "aws_security_group",
                    "depends_on": [
                        "aws_vpc.##"
                    ],
                    "primary": {
                        "id": "##",
                        "attributes": {
                            "description": "Allows SSH/HTTPS access from ##",
                            "id": "##",
                            "ingress.#": "2",
                            "ingress.0.cidr_blocks.#": "1",
                            "ingress.0.cidr_blocks.0": "##",
                            "ingress.0.from_port": "22",
                            "ingress.0.protocol": "tcp",
                            "ingress.0.self": "false",
                            "ingress.0.to_port": "22",
                            "ingress.1.cidr_blocks.#": "1",
                            "ingress.1.cidr_blocks.0": "##",
                            "ingress.1.from_port": "443",
                            "ingress.1.protocol": "tcp",
                            "ingress.1.self": "false",
                            "ingress.1.to_port": "443",
                            "name": "##-access",
                            "owner_id": "##",
                            "vpc_id": "vpc-##"
                        }
                    }
                },
                "aws_security_group.herron-access": {
                    "type": "aws_security_group",
                    "depends_on": [
                        "aws_vpc.##"
                    ],
                    "primary": {
                        "id": "##",
                        "attributes": {
                            "description": "Allows SSH/HTTPS access from Sean Herron",
                            "id": "##",
                            "ingress.#": "2",
                            "ingress.0.cidr_blocks.#": "1",
                            "ingress.0.cidr_blocks.0": "##",
                            "ingress.0.from_port": "443",
                            "ingress.0.protocol": "tcp",
                            "ingress.0.self": "false",
                            "ingress.0.to_port": "443",
                            "ingress.1.cidr_blocks.#": "1",
                            "ingress.1.cidr_blocks.0": "##",
                            "ingress.1.from_port": "22",
                            "ingress.1.protocol": "tcp",
                            "ingress.1.self": "false",
                            "ingress.1.to_port": "22",
                            "name": "herron-access",
                            "owner_id": "##",
                            "vpc_id": "vpc-##"
                        }
                    }
                },
                "aws_security_group.nat": {
                    "type": "aws_security_group",
                    "depends_on": [
                        "aws_vpc.##",
                        "aws_subnet.us-east-1a-private",
                        "aws_subnet.us-east-1b-private"
                    ],
                    "primary": {
                        "id": "##",
                        "attributes": {
                            "description": "Allow services from the private subnet through NAT",
                            "id": "##",
                            "ingress.#": "3",
                            "ingress.0.cidr_blocks.#": "1",
                            "ingress.0.cidr_blocks.0": "10.19.61.96/27",
                            "ingress.0.from_port": "0",
                            "ingress.0.protocol": "tcp",
                            "ingress.0.self": "false",
                            "ingress.0.to_port": "65535",
                            "ingress.1.cidr_blocks.#": "1",
                            "ingress.1.cidr_blocks.0": "10.19.61.64/27",
                            "ingress.1.from_port": "0",
                            "ingress.1.protocol": "tcp",
                            "ingress.1.to_port": "65535",
                            "ingress.2.cidr_blocks.#": "1",
                            "ingress.2.cidr_blocks.0": "0.0.0.0/0",
                            "ingress.2.from_port": "0",
                            "ingress.2.protocol": "tcp",
                            "ingress.2.to_port": "65535",
                            "name": "##-nat",
                            "owner_id": "##",
                            "vpc_id": "vpc-##"
                        }
                    }
                },
                "aws_security_group.private": {
                    "type": "aws_security_group",
                    "depends_on": [
                        "aws_vpc.##"
                    ],
                    "primary": {
                        "id": "##",
                        "attributes": {
                            "description": "Allows All Access",
                            "id": "##",
                            "ingress.#": "2",
                            "ingress.0.cidr_blocks.#": "1",
                            "ingress.0.cidr_blocks.0": "0.0.0.0/0",
                            "ingress.0.from_port": "0",
                            "ingress.0.protocol": "icmp",
                            "ingress.0.self": "false",
                            "ingress.0.to_port": "65535",
                            "ingress.1.cidr_blocks.#": "1",
                            "ingress.1.cidr_blocks.0": "0.0.0.0/0",
                            "ingress.1.from_port": "0",
                            "ingress.1.protocol": "tcp",
                            "ingress.1.to_port": "65535",
                            "name": "private",
                            "owner_id": "##",
                            "vpc_id": "vpc-##"
                        }
                    }
                },
                "aws_subnet.us-east-1a-private": {
                    "type": "aws_subnet",
                    "depends_on": [
                        "aws_vpc.##"
                    ],
                    "primary": {
                        "id": "##",
                        "attributes": {
                            "availability_zone": "us-east-1a",
                            "cidr_block": "10.19.61.64/27",
                            "id": "##",
                            "vpc_id": "vpc-##"
                        }
                    }
                },
                "aws_subnet.us-east-1a-public": {
                    "type": "aws_subnet",
                    "depends_on": [
                        "aws_vpc.##"
                    ],
                    "primary": {
                        "id": "##",
                        "attributes": {
                            "availability_zone": "us-east-1a",
                            "cidr_block": "10.19.61.0/27",
                            "id": "##",
                            "vpc_id": "vpc-##"
                        }
                    }
                },
                "aws_subnet.us-east-1b-private": {
                    "type": "aws_subnet",
                    "depends_on": [
                        "aws_vpc.##"
                    ],
                    "primary": {
                        "id": "##",
                        "attributes": {
                            "availability_zone": "us-east-1b",
                            "cidr_block": "10.19.61.96/27",
                            "id": "##",
                            "vpc_id": "vpc-##"
                        }
                    }
                },
                "aws_subnet.us-east-1b-public": {
                    "type": "aws_subnet",
                    "depends_on": [
                        "aws_vpc.##"
                    ],
                    "primary": {
                        "id": "##",
                        "attributes": {
                            "availability_zone": "us-east-1b",
                            "cidr_block": "10.19.61.32/27",
                            "id": "##",
                            "vpc_id": "vpc-##"
                        }
                    }
                },
                "aws_vpc.##": {
                    "type": "aws_vpc",
                    "primary": {
                        "id": "##",
                        "attributes": {
                            "cidr_block": "10.19.61.0/24",
                            "enable_dns_hostnames": "false",
                            "enable_dns_support": "true",
                            "id": "##",
                            "main_route_table_id": "##",
                            "tags.Name": "##"
                        }
                    }
                }
            }
        }
    ]
}
@mitchellh
Copy link
Contributor

Are you able to get output from TF_LOG=1 where this is hanging?

Were you already using the new state structure prior to running this or did it upgrade?

@mitchellh mitchellh added the waiting-response An issue/pull request is waiting for a response from the community label Oct 15, 2014
@seanherron
Copy link
Contributor Author

I was using the new state structure prior to this, working off master.

Here's my TF_LOG on a fresh run:

2014/10/15 00:00:32 Detected home directory from env var: /Users/sean
2014/10/15 00:00:32 [DEBUG] Discoverd plugin: aws = /Users/sean/go/bin/terraform-provider-aws
2014/10/15 00:00:32 [DEBUG] Discoverd plugin: cloudflare = /Users/sean/go/bin/terraform-provider-cloudflare
2014/10/15 00:00:32 [DEBUG] Discoverd plugin: consul = /Users/sean/go/bin/terraform-provider-consul
2014/10/15 00:00:32 [DEBUG] Discoverd plugin: digitalocean = /Users/sean/go/bin/terraform-provider-digitalocean
2014/10/15 00:00:32 [DEBUG] Discoverd plugin: dnsimple = /Users/sean/go/bin/terraform-provider-dnsimple
2014/10/15 00:00:32 [DEBUG] Discoverd plugin: google = /Users/sean/go/bin/terraform-provider-google
2014/10/15 00:00:32 [DEBUG] Discoverd plugin: heroku = /Users/sean/go/bin/terraform-provider-heroku
2014/10/15 00:00:32 [DEBUG] Discoverd plugin: mailgun = /Users/sean/go/bin/terraform-provider-mailgun
2014/10/15 00:00:32 [DEBUG] Discoverd plugin: null = /Users/sean/go/bin/terraform-provider-null
2014/10/15 00:00:32 [DEBUG] Discoverd plugin: file = /Users/sean/go/bin/terraform-provisioner-file
2014/10/15 00:00:32 [DEBUG] Discoverd plugin: local-exec = /Users/sean/go/bin/terraform-provisioner-local-exec
2014/10/15 00:00:32 [DEBUG] Discoverd plugin: remote-exec = /Users/sean/go/bin/terraform-provisioner-remote-exec
2014/10/15 00:00:32 Detected home directory from env var: /Users/sean
2014/10/15 00:00:32 [DEBUG] Attempting to open CLI config file: /Users/sean/.terraformrc
2014/10/15 00:00:32 [DEBUG] File doesn't exist, but doesn't need to. Ignoring.
2014/10/15 00:00:32 [DEBUG] Creating graph for path: [root]
2014/10/15 00:00:32 [DEBUG] Starting plugin: /Users/sean/go/bin/terraform-provider-aws []string{"/Users/sean/go/bin/terraform-provider-aws"}
2014/10/15 00:00:32 Detected home directory from env var: /Users/sean
2014/10/15 00:00:32 [DEBUG] Waiting for RPC address for: /Users/sean/go/bin/terraform-provider-aws
2014/10/15 00:00:32 terraform-provider-aws: 2014/10/15 00:00:32 Plugin address: unix /var/folders/_b/7gtqn0392z39l6bw1ttcv_fm0000gn/T/tf-plugin539622053
2014/10/15 00:00:32 [DEBUG] Graph [root] created and valid. 30 nouns.
2014/10/15 00:00:32 [DEBUG] Creating graph for path: [root]
2014/10/15 00:00:32 [DEBUG] Graph [root] created and valid. 30 nouns.
2014/10/15 00:00:32 [INFO] Validating provider: aws
2014/10/15 00:00:32 [DEBUG] aws_vpc.##: expanding to count = 1
2014/10/15 00:00:32 [INFO] Validating resource: aws_vpc.##
2014/10/15 00:00:32 [DEBUG] aws_subnet.us-east-1b-private: expanding to count = 1
2014/10/15 00:00:32 [DEBUG] aws_subnet.us-east-1a-private: expanding to count = 1
2014/10/15 00:00:32 [DEBUG] aws_subnet.us-east-1b-public: expanding to count = 1
2014/10/15 00:00:32 [DEBUG] aws_subnet.us-east-1a-public: expanding to count = 1
2014/10/15 00:00:32 [DEBUG] aws_security_group.app: expanding to count = 1
2014/10/15 00:00:32 [DEBUG] aws_security_group.nat: expanding to count = 1
2014/10/15 00:00:32 [DEBUG] aws_security_group.private: expanding to count = 1
2014/10/15 00:00:32 [DEBUG] aws_security_group.herron-access: expanding to count = 1
2014/10/15 00:00:32 [DEBUG] aws_security_group.##-access: expanding to count = 1
2014/10/15 00:00:32 [DEBUG] aws_internet_gateway.default: expanding to count = 1
2014/10/15 00:00:32 [INFO] Validating resource: aws_subnet.us-east-1b-private
2014/10/15 00:00:32 [INFO] Validating resource: aws_subnet.us-east-1a-private
2014/10/15 00:00:32 [INFO] Validating resource: aws_subnet.us-east-1b-public
2014/10/15 00:00:32 [INFO] Validating resource: aws_subnet.us-east-1a-public
2014/10/15 00:00:32 [INFO] Validating resource: aws_security_group.app
2014/10/15 00:00:32 [INFO] Validating resource: aws_security_group.nat
2014/10/15 00:00:32 [INFO] Validating resource: aws_security_group.private
2014/10/15 00:00:32 [INFO] Validating resource: aws_security_group.herron-access
2014/10/15 00:00:32 [INFO] Validating resource: aws_security_group.##-access
2014/10/15 00:00:32 [INFO] Validating resource: aws_internet_gateway.default
2014/10/15 00:00:32 [DEBUG] aws_instance.salt1b: expanding to count = 1
2014/10/15 00:00:32 [DEBUG] aws_instance.salt1a: expanding to count = 1
2014/10/15 00:00:32 [INFO] Validating resource: aws_instance.salt1b
2014/10/15 00:00:32 [INFO] Validating resource: aws_instance.salt1a
2014/10/15 00:00:32 [DEBUG] aws_route_table.us-east-1-public: expanding to count = 1
2014/10/15 00:00:32 [DEBUG] aws_instance.us-east-1b-nat: expanding to count = 1
2014/10/15 00:00:32 [DEBUG] aws_instance.us-east-1a-nat: expanding to count = 1
2014/10/15 00:00:32 [INFO] Validating resource: aws_route_table.us-east-1-public
2014/10/15 00:00:32 [INFO] Validating resource: aws_instance.us-east-1b-nat
2014/10/15 00:00:32 [INFO] Validating resource: aws_instance.us-east-1a-nat
2014/10/15 00:00:32 [DEBUG] aws_route53_record.saltb: expanding to count = 1
2014/10/15 00:00:32 [DEBUG] aws_route53_record.salta: expanding to count = 1
2014/10/15 00:00:32 [DEBUG] aws_route_table_association.us-east-1b-public: expanding to count = 1
2014/10/15 00:00:32 [DEBUG] aws_route_table_association.us-east-1a-public: expanding to count = 1
2014/10/15 00:00:32 [INFO] Validating resource: aws_route53_record.saltb
2014/10/15 00:00:32 [INFO] Validating resource: aws_route53_record.salta
2014/10/15 00:00:32 [INFO] Validating resource: aws_route_table_association.us-east-1b-public
2014/10/15 00:00:32 [INFO] Validating resource: aws_route_table_association.us-east-1a-public
2014/10/15 00:00:32 [DEBUG] aws_eip.us-east-1b-nat: expanding to count = 1
2014/10/15 00:00:32 [DEBUG] aws_route_table.us-east-1b-private: expanding to count = 1
2014/10/15 00:00:32 [DEBUG] aws_route_table.us-east-1a-private: expanding to count = 1
2014/10/15 00:00:32 [DEBUG] aws_eip.us-east-1a-nat: expanding to count = 1
2014/10/15 00:00:32 [INFO] Validating resource: aws_eip.us-east-1b-nat
2014/10/15 00:00:32 [INFO] Validating resource: aws_route_table.us-east-1b-private
2014/10/15 00:00:32 [INFO] Validating resource: aws_route_table.us-east-1a-private
2014/10/15 00:00:32 [INFO] Validating resource: aws_eip.us-east-1a-nat
2014/10/15 00:00:32 [DEBUG] aws_route53_record.natb: expanding to count = 1
2014/10/15 00:00:32 [INFO] Validating resource: aws_route53_record.natb
2014/10/15 00:00:32 [DEBUG] aws_route_table_association.us-east-1b-private: expanding to count = 1
2014/10/15 00:00:32 [INFO] Validating resource: aws_route_table_association.us-east-1b-private
2014/10/15 00:00:32 [DEBUG] aws_route53_record.nata: expanding to count = 1
2014/10/15 00:00:32 [INFO] Validating resource: aws_route53_record.nata
2014/10/15 00:00:32 [DEBUG] aws_route_table_association.us-east-1a-private: expanding to count = 1
2014/10/15 00:00:32 [INFO] Validating resource: aws_route_table_association.us-east-1a-private
2014/10/15 00:00:32 [INFO] Writing backup state to: terraform.tfstate.backup
2014/10/15 00:00:32 [DEBUG] Creating graph for path: [root]
2014/10/15 00:00:32 [DEBUG] Graph [root] created and valid. 30 nouns.
2014/10/15 00:00:32 [INFO] Configuring provider: aws
2014/10/15 00:00:32 terraform-provider-aws: 2014/10/15 00:00:32 [INFO] Building AWS auth structure
2014/10/15 00:00:32 terraform-provider-aws: 2014/10/15 00:00:32 [INFO] Building AWS region structure
2014/10/15 00:00:32 terraform-provider-aws: 2014/10/15 00:00:32 [INFO] Initializing EC2 connection
2014/10/15 00:00:32 terraform-provider-aws: 2014/10/15 00:00:32 [INFO] Initializing ELB connection
2014/10/15 00:00:32 terraform-provider-aws: 2014/10/15 00:00:32 [INFO] Initializing AutoScaling connection
2014/10/15 00:00:32 terraform-provider-aws: 2014/10/15 00:00:32 [INFO] Initializing S3 connection
2014/10/15 00:00:32 terraform-provider-aws: 2014/10/15 00:00:32 [INFO] Initializing RDS connection
2014/10/15 00:00:32 terraform-provider-aws: 2014/10/15 00:00:32 [INFO] Initializing Route53 connection
2014/10/15 00:00:32 [DEBUG] aws_vpc.##: expanding to count = 1
2014/10/15 00:00:32 [INFO] Module root walking: aws_vpc.## (Graph node: aws_vpc.##)
2014/10/15 00:00:33 [DEBUG] aws_subnet.us-east-1b-private: expanding to count = 1
2014/10/15 00:00:33 [DEBUG] aws_subnet.us-east-1a-private: expanding to count = 1
2014/10/15 00:00:33 [DEBUG] aws_subnet.us-east-1b-public: expanding to count = 1
2014/10/15 00:00:33 [DEBUG] aws_subnet.us-east-1a-public: expanding to count = 1
2014/10/15 00:00:33 [DEBUG] aws_security_group.app: expanding to count = 1
2014/10/15 00:00:33 [DEBUG] aws_security_group.nat: expanding to count = 1
2014/10/15 00:00:33 [DEBUG] aws_security_group.private: expanding to count = 1
2014/10/15 00:00:33 [DEBUG] aws_security_group.herron-access: expanding to count = 1
2014/10/15 00:00:33 [DEBUG] aws_security_group.##-access: expanding to count = 1
2014/10/15 00:00:33 [DEBUG] aws_internet_gateway.default: expanding to count = 1

@mahnve
Copy link

mahnve commented Oct 15, 2014

Same problem here. After upgrading to 0.3.0, all commands hangs. Removing state files gives same output.

Output:

$ TF_LOG=1 terraform refresh
2014/10/15 14:52:08 Detected home directory from env var: /home/mahnve
2014/10/15 14:52:08 [DEBUG] Discoverd plugin: aws = /home/mahnve/local/bin/terraform-provider-aws
2014/10/15 14:52:08 [DEBUG] Discoverd plugin: cloudflare = /home/mahnve/local/bin/terraform-provider-cloudflare
2014/10/15 14:52:08 [DEBUG] Discoverd plugin: consul = /home/mahnve/local/bin/terraform-provider-consul
2014/10/15 14:52:08 [DEBUG] Discoverd plugin: digitalocean = /home/mahnve/local/bin/terraform-provider-digitalocean
2014/10/15 14:52:08 [DEBUG] Discoverd plugin: dnsimple = /home/mahnve/local/bin/terraform-provider-dnsimple
2014/10/15 14:52:08 [DEBUG] Discoverd plugin: google = /home/mahnve/local/bin/terraform-provider-google
2014/10/15 14:52:08 [DEBUG] Discoverd plugin: heroku = /home/mahnve/local/bin/terraform-provider-heroku
2014/10/15 14:52:08 [DEBUG] Discoverd plugin: mailgun = /home/mahnve/local/bin/terraform-provider-mailgun
2014/10/15 14:52:08 [DEBUG] Discoverd plugin: null = /home/mahnve/local/bin/terraform-provider-null
2014/10/15 14:52:08 [DEBUG] Discoverd plugin: file = /home/mahnve/local/bin/terraform-provisioner-file
2014/10/15 14:52:08 [DEBUG] Discoverd plugin: local-exec = /home/mahnve/local/bin/terraform-provisioner-local-exec
2014/10/15 14:52:08 [DEBUG] Discoverd plugin: remote-exec = /home/mahnve/local/bin/terraform-provisioner-remote-exec
2014/10/15 14:52:08 Detected home directory from env var: /home/mahnve
2014/10/15 14:52:08 [DEBUG] Attempting to open CLI config file: /home/mahnve/.terraformrc
2014/10/15 14:52:08 [DEBUG] File doesn't exist, but doesn't need to. Ignoring.
2014/10/15 14:52:08 [DEBUG] Creating graph for path: [root]
2014/10/15 14:52:08 [DEBUG] Starting plugin: /home/mahnve/local/bin/terraform-provider-aws []string{"/home/mahnve/local/bin/terraform-provider-aws"}
2014/10/15 14:52:08 [DEBUG] Waiting for RPC address for: /home/mahnve/local/bin/terraform-provider-aws
2014/10/15 14:52:08 Detected home directory from env var: /home/mahnve
2014/10/15 14:52:08 terraform-provider-aws: 2014/10/15 14:52:08 Plugin address: unix /tmp/tf-plugin552626907
2014/10/15 14:52:08 [DEBUG] Graph [root] created and valid. 34 nouns.
2014/10/15 14:52:08 [DEBUG] Creating graph for path: [root]
2014/10/15 14:52:08 [DEBUG] Graph [root] created and valid. 34 nouns.
2014/10/15 14:52:08 [INFO] Validating provider: aws
2014/10/15 14:52:08 [DEBUG] aws_vpc.dryleaf: expanding to count = 1
2014/10/15 14:52:08 [INFO] Validating resource: aws_vpc.dryleaf
2014/10/15 14:52:08 [DEBUG] aws_security_group.nat: expanding to count = 1
2014/10/15 14:52:08 [DEBUG] aws_security_group.elasticsearch: expanding to count = 1
2014/10/15 14:52:08 [DEBUG] aws_security_group.ssh: expanding to count = 1
2014/10/15 14:52:08 [DEBUG] aws_security_group.external_web: expanding to count = 1
2014/10/15 14:52:08 [DEBUG] aws_security_group.internal_web: expanding to count = 1
2014/10/15 14:52:08 [DEBUG] aws_security_group.jump: expanding to count = 1
2014/10/15 14:52:08 [DEBUG] aws_internet_gateway.gw: expanding to count = 1
2014/10/15 14:52:08 [DEBUG] aws_subnet.db-1d: expanding to count = 1
2014/10/15 14:52:08 [DEBUG] aws_subnet.db-1a: expanding to count = 1
2014/10/15 14:52:08 [DEBUG] aws_subnet.private-1d: expanding to count = 1
2014/10/15 14:52:08 [DEBUG] aws_subnet.private-1a: expanding to count = 1
2014/10/15 14:52:08 [DEBUG] aws_subnet.app-1d: expanding to count = 1
2014/10/15 14:52:08 [DEBUG] aws_subnet.app-1a: expanding to count = 1
2014/10/15 14:52:08 [DEBUG] aws_subnet.front-1d: expanding to count = 1
2014/10/15 14:52:08 [DEBUG] aws_subnet.front-1a: expanding to count = 1
2014/10/15 14:52:08 [INFO] Validating resource: aws_security_group.nat
2014/10/15 14:52:08 [INFO] Validating resource: aws_security_group.elasticsearch
2014/10/15 14:52:08 [INFO] Validating resource: aws_security_group.ssh
2014/10/15 14:52:08 [INFO] Validating resource: aws_security_group.external_web
2014/10/15 14:52:08 [INFO] Validating resource: aws_security_group.internal_web
2014/10/15 14:52:08 [INFO] Validating resource: aws_security_group.jump
2014/10/15 14:52:08 [INFO] Validating resource: aws_internet_gateway.gw
2014/10/15 14:52:08 [INFO] Validating resource: aws_subnet.db-1d
2014/10/15 14:52:08 [INFO] Validating resource: aws_subnet.db-1a
2014/10/15 14:52:08 [INFO] Validating resource: aws_subnet.private-1d
2014/10/15 14:52:08 [INFO] Validating resource: aws_subnet.private-1a
2014/10/15 14:52:08 [INFO] Validating resource: aws_subnet.app-1d
2014/10/15 14:52:08 [INFO] Validating resource: aws_subnet.app-1a
2014/10/15 14:52:08 [INFO] Validating resource: aws_subnet.front-1d
2014/10/15 14:52:08 [INFO] Validating resource: aws_subnet.front-1a
2014/10/15 14:52:08 [DEBUG] aws_security_group.db: expanding to count = 1
2014/10/15 14:52:08 [DEBUG] aws_route_table.public: expanding to count = 1
2014/10/15 14:52:08 [INFO] Validating resource: aws_security_group.db
2014/10/15 14:52:08 [INFO] Validating resource: aws_route_table.public
2014/10/15 14:52:08 [DEBUG] aws_instance.wolverine: expanding to count = 1
2014/10/15 14:52:08 [DEBUG] aws_instance.nat_box: expanding to count = 1
2014/10/15 14:52:08 [DEBUG] aws_instance.jump_box: expanding to count = 1
2014/10/15 14:52:08 [DEBUG] aws_elb.web_elb: expanding to count = 1
2014/10/15 14:52:08 [INFO] Validating resource: aws_instance.wolverine
2014/10/15 14:52:08 [INFO] Validating resource: aws_instance.nat_box
2014/10/15 14:52:08 [INFO] Validating resource: aws_instance.jump_box
2014/10/15 14:52:08 [INFO] Validating resource: aws_elb.web_elb
2014/10/15 14:52:08 [DEBUG] aws_route_table_association.front-1d: expanding to count = 1
2014/10/15 14:52:08 [DEBUG] aws_route_table_association.app-1d: expanding to count = 1
2014/10/15 14:52:08 [DEBUG] aws_route_table_association.app-1a: expanding to count = 1
2014/10/15 14:52:08 [DEBUG] aws_route_table_association.front-1a: expanding to count = 1
2014/10/15 14:52:08 [INFO] Validating resource: aws_route_table_association.front-1d
2014/10/15 14:52:08 [INFO] Validating resource: aws_route_table_association.app-1d
2014/10/15 14:52:08 [INFO] Validating resource: aws_route_table_association.app-1a
2014/10/15 14:52:08 [INFO] Validating resource: aws_route_table_association.front-1a
2014/10/15 14:52:08 [DEBUG] aws_route_table.nat: expanding to count = 1
2014/10/15 14:52:08 [DEBUG] aws_eip.jump_box: expanding to count = 1
2014/10/15 14:52:08 [INFO] Validating resource: aws_route_table.nat
2014/10/15 14:52:08 [INFO] Validating resource: aws_eip.jump_box
2014/10/15 14:52:08 [DEBUG] aws_route_table_association.private-1d: expanding to count = 1
2014/10/15 14:52:08 [DEBUG] aws_route_table_association.private-1a: expanding to count = 1
2014/10/15 14:52:08 [INFO] Validating resource: aws_route_table_association.private-1d
2014/10/15 14:52:08 [INFO] Validating resource: aws_route_table_association.private-1a
2014/10/15 14:52:08 [INFO] Writing backup state to: terraform.tfstate.backup
2014/10/15 14:52:08 [DEBUG] Creating graph for path: [root]
2014/10/15 14:52:08 [DEBUG] Graph [root] created and valid. 34 nouns.
2014/10/15 14:52:08 [INFO] Configuring provider: aws
2014/10/15 14:52:08 terraform-provider-aws: 2014/10/15 14:52:08 [INFO] Building AWS auth structure
2014/10/15 14:52:08 terraform-provider-aws: 2014/10/15 14:52:08 [INFO] Building AWS region structure
2014/10/15 14:52:08 terraform-provider-aws: 2014/10/15 14:52:08 [INFO] Initializing EC2 connection
2014/10/15 14:52:08 terraform-provider-aws: 2014/10/15 14:52:08 [INFO] Initializing ELB connection
2014/10/15 14:52:08 terraform-provider-aws: 2014/10/15 14:52:08 [INFO] Initializing AutoScaling connection
2014/10/15 14:52:08 terraform-provider-aws: 2014/10/15 14:52:08 [INFO] Initializing S3 connection
2014/10/15 14:52:08 terraform-provider-aws: 2014/10/15 14:52:08 [INFO] Initializing RDS connection
2014/10/15 14:52:08 terraform-provider-aws: 2014/10/15 14:52:08 [INFO] Initializing Route53 connection
2014/10/15 14:52:08 [INFO] Module root walking: aws_vpc.funnel (Graph node: aws_vpc.funnel)
2014/10/15 14:52:08 [INFO] Module root walking: aws_security_group.coreos (Graph node: aws_security_group.coreos)
aws_vpc.funnel: Refreshing state... (ID: vpc-129a2c77)
2014/10/15 14:52:08 [DEBUG] aws_vpc.dryleaf: expanding to count = 1
2014/10/15 14:52:08 [INFO] Module root walking: aws_vpc.dryleaf (Graph node: aws_vpc.dryleaf)
2014/10/15 14:52:08 [DEBUG] aws_vpc.dryleaf: Not refreshing, ID is empty
2014/10/15 14:52:08 [DEBUG] aws_security_group.nat: expanding to count = 1
2014/10/15 14:52:08 [DEBUG] aws_security_group.elasticsearch: expanding to count = 1
2014/10/15 14:52:08 [DEBUG] aws_security_group.ssh: expanding to count = 1
2014/10/15 14:52:08 [DEBUG] aws_security_group.external_web: expanding to count = 1
2014/10/15 14:52:08 [DEBUG] aws_security_group.internal_web: expanding to count = 1
2014/10/15 14:52:08 [DEBUG] aws_security_group.jump: expanding to count = 1
2014/10/15 14:52:08 [DEBUG] aws_internet_gateway.gw: expanding to count = 1
2014/10/15 14:52:08 [DEBUG] aws_subnet.db-1d: expanding to count = 1
aws_security_group.coreos: Refreshing state... (ID: sg-4bf6ae2e)
2014/10/15 14:52:09 [DEBUG] aws_subnet.db-1a: expanding to count = 1
2014/10/15 14:52:11 [DEBUG] aws_subnet.private-1d: expanding to count = 1

@mahnve
Copy link

mahnve commented Oct 15, 2014

If I comment out all security groups and things that depend on them everything works.

As soon as I add a security group it hangs, even if that security group is listed in the state file.

@mahnve
Copy link

mahnve commented Oct 15, 2014

And if I remove the vpc_id from the security group it works fine. So it seems to concern security groups in a VPC.

@mahnve
Copy link

mahnve commented Oct 15, 2014

Sorry for the spamming, but hardcoding the vpc id works as well, meaning

resource "aws_security_group" "jump" {
  ..
  vpc_id="vpc-129a2c77"
  ..
} 

works whereas

resource "aws_security_group" "jump" {
  ..
  vpc_id="${aws_vpc.dryleaf.id}"
  ..
}

does not.

@seanherron
Copy link
Contributor Author

I removed my security groups and was able to run things fine, as @mahnve was able to do. Working on cleaning up some of the info in my repo and will publish the entire directory here soon.

@seanherron
Copy link
Contributor Author

Here's the repository giving me trouble. As @mahnve discovered, replacing vpc_id with the actual VPC ID fixes the issue. https://github.com/18F/peace-corps-infrastructure

@mitchellh mitchellh added bug core and removed bug waiting-response An issue/pull request is waiting for a response from the community labels Oct 16, 2014
@wilb
Copy link

wilb commented Oct 16, 2014

Just replaced my VPC references with the pre existing VPC ID but I'm still getting a hang...

2014/10/16 15:24:53 terraform-provider-aws: 2014/10/16 15:24:53 [INFO] Building AWS auth structure
2014/10/16 15:24:53 terraform-provider-aws: 2014/10/16 15:24:53 [INFO] Building AWS region structure
2014/10/16 15:24:53 terraform-provider-aws: 2014/10/16 15:24:53 [INFO] Initializing EC2 connection
2014/10/16 15:24:53 terraform-provider-aws: 2014/10/16 15:24:53 [INFO] Initializing ELB connection
2014/10/16 15:24:53 terraform-provider-aws: 2014/10/16 15:24:53 [INFO] Initializing AutoScaling connection
2014/10/16 15:24:53 terraform-provider-aws: 2014/10/16 15:24:53 [INFO] Initializing S3 connection
2014/10/16 15:24:53 terraform-provider-aws: 2014/10/16 15:24:53 [INFO] Initializing RDS connection
2014/10/16 15:24:53 terraform-provider-aws: 2014/10/16 15:24:53 [INFO] Initializing Route53 connection
2014/10/16 15:24:53 [DEBUG] aws_internet_gateway.test-gw: expanding to count = 1
2014/10/16 15:24:53 [DEBUG] aws_subnet.test-app-1b: expanding to count = 1
2014/10/16 15:24:53 [DEBUG] aws_subnet.test-app-1a: expanding to count = 1
2014/10/16 15:24:53 [DEBUG] aws_subnet.test-web-1b: expanding to count = 1
2014/10/16 15:24:53 [DEBUG] aws_subnet.test-web-1a: expanding to count = 1
2014/10/16 15:24:53 [DEBUG] aws_vpc.test: expanding to count = 1
2014/10/16 15:24:53 [DEBUG] aws_security_group.nrpe: expanding to count = 1
2014/10/16 15:24:53 [DEBUG] aws_security_group.restricted-web: expanding to count = 1
2014/10/16 15:24:53 [DEBUG] aws_security_group.restricted-ssh: expanding to count = 1
2014/10/16 15:24:53 [DEBUG] aws_security_group.test-web-servers: expanding to count = 1

@mitchellh
Copy link
Contributor

A fix is coming in for this shortly. We fixed it last night.

@wilb
Copy link

wilb commented Oct 16, 2014

Great stuff :-)

@mitchellh
Copy link
Contributor

Fixed

@ghost ghost locked and limited conversation to collaborators May 5, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants