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

Feature request: add FQDN attribute to gandi_livedns_record #116

Open
KillianKemps opened this issue May 16, 2022 · 1 comment
Open

Feature request: add FQDN attribute to gandi_livedns_record #116

KillianKemps opened this issue May 16, 2022 · 1 comment

Comments

@KillianKemps
Copy link

Currently, when referencing a record into another CNAME, I need to write something like this in the values argument:

resource "gandi_livedns_record" "my-website-fr-CNAME" {
  zone   = gandi_livedns_domain.my-website-fr.id
  name   = "subdomain"
  type   = "CNAME"
  ttl    = 1800
  values = ["${gandi_livedns_record.my-website-fr.name}.${gandi_livedns_record.my-website-fr.zone}."]
}

It would be nice to be able to only write this:

resource "gandi_livedns_record" "my-website-fr-CNAME" {
  zone   = gandi_livedns_domain.my-website-fr.id
  name   = "subdomain"
  type   = "CNAME"
  ttl    = 1800
  values = ["${gandi_livedns_record.my-website-fr.fqdn}."]
}

Would it be possible to add something named like the fqdn attribute on gandi_livedns_record?

Also, when I looked into the [source code](https://github.com/go-gandi/terraform-provider-gandi/blob/master/gandi/resource_livedns_record.go#L28, I was puzzled because the comment for the zone attribute is The FQDN of the domain when in fact, it is not the [FQDN](https://en.wikipedia.org/wiki/Fully_qualified_domain_name, but the root zone.

@nlewo
Copy link
Member

nlewo commented May 24, 2022

It could be possible to add a computed value in the gandi_livedns_record. However, i don't know if it could be computed during the plan phase. If not, i don't think it's a good idea since we would have to deploy the resource to know this fqdn value.

So, if it can be computed during the plan phase, then a PR is welcome ;)

I was puzzled because the comment for the zone attribute is The FQDN of the domain

Yep, maybe should be something such as The FQDN of this domain zone (it's not the root zone however).

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

2 participants