Terraform: Creating a aws_route53_record hangs

Created on 16 May 2015  ·  10Comments  ·  Source: hashicorp/terraform

Unfortunately I don't have much more information to help diagnose. Here's the output with TF_LOG on (and faked domain and IP):

aws_route53_record.www: Creating...
  name:               "" => "www.example.com"
  records.#:          "" => "1"
  records.2060201997: "" => "123.123.123.123"
  ttl:                "" => "300"
  type:               "" => "A"
  zone_id:            "" => "ZZZZZZZZZZZZZ"
2015/05/15 16:51:27 terraform-provider-aws: 2015/05/15 16:51:27 [DEBUG] Creating resource records for zone: Z2VRW23TFMPXMC, name: vpn.greypoint.co
2015/05/15 16:51:27 terraform-provider-aws: 2015/05/15 16:51:27 [DEBUG] Waiting for state to become: accepted
2015/05/15 16:51:27 terraform-provider-aws: 2015/05/15 16:51:27 [TRACE] Waiting 1s before next try
2015/05/15 16:51:29 terraform-provider-aws: 2015/05/15 16:51:29 [DEBUG] Waiting for state to become: INSYNC

At this point the record _has_ been created on the AWS side. However, Terraform keeps spinning, forever:

2015/05/15 16:51:59 terraform-provider-aws: 2015/05/15 16:51:59 [TRACE] Waiting 5s before next try
2015/05/15 16:52:04 terraform-provider-aws: 2015/05/15 16:52:04 [TRACE] Waiting 5s before next try
2015/05/15 16:52:09 terraform-provider-aws: 2015/05/15 16:52:09 [TRACE] Waiting 5s before next try
2015/05/15 16:52:14 terraform-provider-aws: 2015/05/15 16:52:14 [TRACE] Waiting 5s before next try
2015/05/15 16:52:19 terraform-provider-aws: 2015/05/15 16:52:19 [TRACE] Waiting 5s before next try
2015/05/15 16:52:24 terraform-provider-aws: 2015/05/15 16:52:24 [TRACE] Waiting 5s before next try
2015/05/15 16:52:30 terraform-provider-aws: 2015/05/15 16:52:30 [TRACE] Waiting 6.4s before next try
2015/05/15 16:52:36 terraform-provider-aws: 2015/05/15 16:52:36 [TRACE] Waiting 10s before next try
2015/05/15 16:52:46 terraform-provider-aws: 2015/05/15 16:52:46 [TRACE] Waiting 10s before next try
2015/05/15 16:52:57 terraform-provider-aws: 2015/05/15 16:52:57 [TRACE] Waiting 10s before next try
2015/05/15 16:53:07 terraform-provider-aws: 2015/05/15 16:53:07 [TRACE] Waiting 10s before next try
...

The one thing that I'm doing strangely here is that I'm specifying the zone id directly (as a static string), rather than determining it via an interpolated value. (I don't want to manage the entire zone in terraform, just this record).

bug provideaws waiting-response

Most helpful comment

Similar issue, waited more than 10 minutes.

All 10 comments

Nevermind. I didn't wait long enough.

I think this is indicative of a problem and perhaps should be re-opened. When changing a record by destroying and re-creating we shouldn't have to wait the TTL. I assume it is waiting for the dns record to be consistent with with it is trying to creating, in which case would is be possible to flush the dns cache or something similar?

Hello –

Route53 has long propagation times for records, typically 5 minutes or more. We aren't explicitly waiting for the TTL, we only issue API calls and then have to poll the API to know when things have been completed.

I believe that covers the situation described, but if you feel there's something else going on please let me know and we can dig in more.

Thanks!

@catsby I'm having similar issues. Debug repeatedly shows

2015/11/23 14:18:28 [DEBUG] vertex root, waiting for: provider.aws (close)
2015/11/23 14:18:33 [DEBUG] vertex aws_route53_record.www, waiting for: provider.aws
2015/11/23 14:18:33 [DEBUG] vertex provider.aws (close), waiting for: aws_route53_record.client
2015/11/23 14:18:33 [DEBUG] vertex aws_route53_record.api, waiting for: provider.aws
2015/11/23 14:18:33 [DEBUG] vertex aws_route53_record.client, waiting for: provider.aws
2015/11/23 14:18:33 [DEBUG] vertex root, waiting for: provider.aws (close)

for like 20 minutes while executing a _terraform plan_

What could be going on?

@landro do you have a configuration that reproduces this by chance? The logs you shared are more from Terraform and not showing what the cause is.

I can sporadically reproduce (actually, 1 out of 10 times will work as expected) with a simple config like this

resource "aws_route53_record" "api" {
zone_id = "SOMEID"
name = "some.domain.no"
type = "A"
ttl = "300"
records = [
"10.0.0.1",
]
}

on my el capitan mac using terraform 0.6.6 . What can I do to debug this?

I performed a tcpdump - it turns out no requests are sent to the route53 endpoint at all. This looks more like a terraform core issue - providers not kicking in as expected.

Similar issue, waited more than 10 minutes.

strange timing @doubaokun, I had this take over 20 minutes for me just now before i killed it.

I'm going to lock this issue because it has been closed for _30 days_ ⏳. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

rjinski picture rjinski  ·  3Comments

larstobi picture larstobi  ·  3Comments

rnowosielski picture rnowosielski  ·  3Comments

c4milo picture c4milo  ·  3Comments

ronnix picture ronnix  ·  3Comments