Closed nlewo closed 2 years ago
@vincentbernat would be nice if you could review/test this PR ;) (at least, I tested it on my domain and it worked fine)
I cannot import an existing resource. It seems that the domain name is both the ID and a required attribute. If that's like for domains, it should just be the ID. Does it make sense? Otherwise, the domain should be set with d.Set()
when reading.
@vincentbernat i'm sorry, i don't understand your issue. Could you provide more details?
I successfully imported a existing nameservers resource with the following resource:
resource "gandi_nameservers" "domain" {
domain = "domain.com"
nameservers = ["ns1.example.foo", "ns2.example.foo"]
}
with the following command:
terraform import gandi_nameservers.domain domain.com
OK. I should have tried with Terraform first. With Pulumi, I get:
Diagnostics:
gandi:domain:Nameservers (enxio.fr):
error: gandi:domain/nameservers:Nameservers resource 'enxio.fr' has a problem: Missing required argument: The argument "domain" is required, but no definition was found.. Examine values at 'Nameservers.Domain'.
error: Preview failed: one or more inputs failed to validate
The error is from Terraform SDK, hence I assumed it would be the same with Terraform directly. It works a bit differently than with Terraform as we import by ID. I am unsure if the error is on my side, on Pulumi side or if the provider is doing something that is unexpected.
Nevertheless, I have imported the resource by hand and it works fine. So, ack for me!
@vincentbernat ok, thanks a lot for your tests.
And let me know if we could improve something in this resource to make it working more easily with Pulumi.
OK, will do. Unfortunately, it seems that Pulumi people are not very interested by stuff outside AWS/GCP/Azure, so it's a bit hard to understand how things should work.
This resource has to be used to set nameservers on a domain. It takes a list of nameserver. On resource deletion, it enable the LiveDNS nameserver on the domain, which is the domain default state.
To test use it:
Once merged, i will push followup PRs to