Closed nikolaymazurenko closed 6 years ago
Can you paste the terraform config?
My config with some censoring:
provider "namecheap" {
username = "blabla"
api_user = "blabla"
token = "******************************************"
ip = "my.ip.add.ress"
use_sandbox = "false"
}
resource "namecheap_record" "www-example-com" {
name = "www"
domain = "badbadblabla.space"
type = "CNAME"
ttl = "60"
address = "elb.badbadblabla.space"
}
And what I have after this in terraform.tfstate:
"version": 3,
"terraform_version": "0.11.8",
"serial": 1,
"lineage": "834da203-b1a4-e8df-4d20-db22469a49f4",
"modules": [
{
"path": [
"root"
],
"outputs": {},
"resources": {
"namecheap_record.www-example-com": {
"type": "namecheap_record",
"depends_on": [],
"primary": {
"id": "2057187105",
"attributes": {
"address": "elb.badbadblabla.space",
"domain": "badbadblabla.space",
"id": "2057187105",
"mx_pref": "10",
"name": "www",
"ttl": "60",
"type": "CNAME"
},
"meta": {},
"tainted": false
},
"deposed": [],
"provider": "provider.namecheap"
}
},
"depends_on": []
}
]
}
So, the record had been added to namecheap but I got the error and I couldn't do anything with the record after that by terraform. Only if I delete tfstate file I can add or change the record again.
Was this a one time thing? Can you perform multiple updates (in a row) to the record now?
Looking through the terraform configs which uses this I noticed my address
values have a trailing .
. I forget if the provider/library adds that automatically if left off (or if it matters to namecheap).
address = "foo.example.com."
I updated the error messages a bit on master. If you're building from source https://github.com/adamdecaf/terraform-provider-namecheap/commit/bfa6b0ad7cc1a0e3d7e118c3e6e71e7ff6efebdd updates that.
Just want to give you some props for developing this terraform provider. It's a great plugin! :+1:
@nikolaymazurenko did you need help figuring this out still?
@punkdata Thanks!
@adamdecaf, thank you very much for this module! Trailing dot resolved my problem. Excellent work!
Awesome! Please open more bugs if you find them!
Hi, I get error when trying to add CNAME record:
With A record all working fine.