Closed OGProgrammer closed 5 years ago
Thanks for the report - I suppose we need to parse their response XML a bit better and pull out that error.
For reference, this is what I see on terraform 0.12
$ terraform apply
An execution plan has been generated and is shown below.
Resource actions are indicated with the following symbols:
+ create
Terraform will perform the following actions:
# namecheap_record.example will be created
+ resource "namecheap_record" "example" {
+ address = "127.0.0.1"
+ domain = "example.com"
+ hostname = (known after apply)
+ id = (known after apply)
+ mx_pref = 10
+ name = "test"
+ ttl = 60
+ type = "A"
+ timeouts {}
}
Plan: 1 to add, 0 to change, 0 to destroy.
Do you want to perform these actions?
Terraform will perform the actions described above.
Only 'yes' will be accepted to approve.
Enter a value: yes
namecheap_record.example: Creating...
Error: Failed to create namecheap Record: Number: 1011150 Message: Invalid request IP: 63.155.xxx.xx
on example.tf line 25, in resource "namecheap_record" "example":
25: resource "namecheap_record" "example" {
I'm seeing the same result on terraform 0.11 as I do on 0.12, so I'm not sure how to reproduce this yet.
Edit: I've also tried with 1.2.0 directly and the "Invalid request IP" error comes back.
I went ahead and lowered the timeouts and max retries. The wait time seem way too long (30s). See: https://github.com/adamdecaf/terraform-provider-namecheap/pull/18
That might be a good move to lower timeouts. Also if you change IP addresses, you get back "cannot create hash" which was a-little mis-leading. Just hope others that run into it wont get tripped up.
Terraform Version
0.11.13
Namecheap provider version
latest
Affected Resource(s)
namecheap_record
Terraform Configuration Files
n/a
Debug Output
Panic Output
n/a
Expected Behavior
Terraform errors out and say "Yo, you don't own this domain"
Actual Behavior
Loops forever 0_o
Steps to Reproduce
Please list the steps required to reproduce the issue, for example:
terraform apply
Important Factoids
I am recording this issue because without TRACE output, you pretty much have no clue what is wrong. I also notivced if you do this from an IP that isn't whitelisted also loops forever.
Maybe we can catch these cases and blow up quickly.
References
see above