terraform-provider-ovh
terraform-provider-ovh copied to clipboard
Cannot create dns record of type NS
Hello,
I'm tying to create NS records with terraform using the ovh_domain_zone_record resource but it seems the NS fieldtype is not supported.
Here is an example where I want to delegate a subdomain to route53, and therefore need to add 4 NS entries in OVH.
resource "aws_route53_zone" "external" {
name = "delegated.mydomain.ovh"
}
resource "ovh_domain_zone_record" "ns_records" {
count = "${length(aws_route53_zone.external.name_servers)}"
subdomain = ""
zone = "delegated.mydomain.ovh"
fieldtype = "NS"
ttl = "0"
target = "${aws_route53_zone.external.name_servers[count.index]}"
}
I got the following errors:
Error: Error applying plan:
4 error(s) occurred:
* module.delegated_subdomain.ovh_domain_zone_record.ns_records[0]: 1 error(s) occurred:
* ovh_domain_zone_record.ns_records.0: Failed to create OVH Record: Error 404: "This service does not exist"
* module.delegated_subdomain.ovh_domain_zone_record.ns_records[2]: 1 error(s) occurred:
* ovh_domain_zone_record.ns_records.2: Failed to create OVH Record: Error 404: "This service does not exist"
* module.delegated_subdomain.ovh_domain_zone_record.ns_records[3]: 1 error(s) occurred:
* ovh_domain_zone_record.ns_records.3: Failed to create OVH Record: Error 404: "This service does not exist"
* module.delegated_subdomain.ovh_domain_zone_record.ns_records[1]: 1 error(s) occurred:
* ovh_domain_zone_record.ns_records.1: Failed to create OVH Record: Error 404: "This service does not exist"
Thank you for your help
Are we going to get any update on this?
One year later, ping. @radeksimko would it be possible to shed some light on this?
Hello @Quintasan
Sorry for long time since your issue.
Have you tested with :
resource "ovh_domain_zone_record" "ns_records" {
count = "${length(aws_route53_zone.external.name_servers)}"
subdomain = "delegated"
zone = "mydomain.ovh"
fieldtype = "NS"
ttl = "0"
target = "${aws_route53_zone.external.name_servers[count.index]}"
}
It should work. If it's not working, please share the output with a up-to-date Terraform provider version.
I'm closing this issue, feel free to re-open if it's not working.
Thanks Romain