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

New livedns record: context deadline exceeded #145

Open
dan-mcdonald opened this issue Jul 5, 2023 · 2 comments
Open

New livedns record: context deadline exceeded #145

dan-mcdonald opened this issue Jul 5, 2023 · 2 comments

Comments

@dan-mcdonald
Copy link

I'm trying to add a new A record to my Gandi LiveDNS with this provider.

resource "gandi_livedns_record" "agency" {
  name = "agency"
  ttl = 300
  type = "A"
  values = [aws_instance.agency.public_ip]
  zone = "▮▮▮▮▮.net"
}

But during apply I get this error (run with TF_LOG=INFO):

gandi_livedns_record.agency: Creating...
2023-07-05T10:44:10.239-0500 [INFO]  Starting apply for gandi_livedns_record.agency
2023-07-05T10:44:18.053-0500 [ERROR] vertex "gandi_livedns_record.agency" error: Fail to do the request (error 'Get "https://api.gandi.net/v5/livedns/domains/▮▮▮▮▮.net/records/agency/A": context deadline exceeded (Client.Timeout exceeded while awaiting headers)')
╷
│ Error: Fail to do the request (error 'Get "https://api.gandi.net/v5/livedns/domains/▮▮▮▮▮.net/records/agency/A": context deadline exceeded (Client.Timeout exceeded while awaiting headers)')
│
│   with gandi_livedns_record.agency,
│   on main.tf line 36, in resource "gandi_livedns_record" "agency":
│   36: resource "gandi_livedns_record" "agency" {
│

I think the request will work if it is given more time. My internet connection is not the fastest. Is there a configuration knob to increase the timeout? Currently it fails for me after only 10/15 seconds.

Other details:

> terraform version 
2023-07-05T10:48:33.039-0500 [INFO]  Terraform version: 1.5.2
2023-07-05T10:48:33.041-0500 [INFO]  Go runtime version: go1.20
2023-07-05T10:48:33.042-0500 [INFO]  CLI args: []string{"C:\\Users\\danie_10m7rom\\dev\\bin\\terraform.exe", "version"}
2023-07-05T10:48:33.062-0500 [INFO]  CLI command args: []string{"version"}
Terraform v1.5.2
on windows_amd64
+ provider registry.terraform.io/go-gandi/gandi v2.2.3
+ provider registry.terraform.io/hashicorp/aws v5.6.1

Any help you provide is appreciated. I know I'm not entitled to any free help.

@benbouillet
Copy link

I'm getting this issue intermittently, did you find a workaround ? @dan-mcdonald

@marcaurele
Copy link

We do have the same problem and it appears quite often on our plan execution, which is very problematic for us. I'm surprised to read from the API documentation1:

Rate limit

Gandi's API is rate limited; you can perform a maximum of 1000 requests per minute from the same IP address.

which we are definitively not hitting.

Moreover, looking at the code / reference there is a (strange) custom default key to configure the timeout for the nemserver records: https://registry.terraform.io/providers/go-gandi/gandi/latest/docs/resources/nameservers#default

Adding this block in the resource did not even fix the problem:

resource "gandi_nameservers" "example" {
  ...
  timeouts {
    default = 60
  }
}

Note

The provider code has some code for a default timeout, which is not exposed in the provider configuration, with a default value of 5 seconds.

🤷

Footnotes

  1. https://api.gandi.net/docs/reference/#RESTful-interface

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants