displague / deprecated-terraform-provider-linode

[OLD] Terraform provider plugin for Linode Cloud resources.. See
https://github.com/terraform-providers/terraform-provider-linode
Mozilla Public License 2.0
15 stars 5 forks source link

implement linode_domain resources #5

Closed displague closed 6 years ago

displague commented 6 years ago

Goal should be TF configs that look like:

resource "linode_domain" "example-com" {
   # the default type = "master" .. call it domain_type?
   soa_email = "admin@example.com"
   ttl_sec = "30"
   expire_sec = "30"
   refresh_sec = "30"
   name = "example.com"
   # interesting that the bare address "@" could be set this way..
   # but terraform would have to do this behind the scenes
   # ip_address = "${linode_instance.haproxy-www.ipv4_address}"
}

resource "linode_record" "A-@" {
  domain = "${linode_domain.example.id}"
  type = "A"
  name = "@"
  values = ["${linode_nodebalancer.example-nb.ipv4}"]
}

resource "linode_record" "AAAA-@" {
  domain = "${linode_domain.example.id}"
  type = "A"
  name = "@"
  values = ["${linode_nodebalancer.example-nb.ipv6}"]
}

resource "linode_record" "CNAME-www" {
  domain = "${linode_domain.example.id}"
  type = "CNAME"
  name = "www"
  values = "@" # should get auto-upgraded to array, can "value" be an alias to values?
}
...
displague commented 6 years ago

14 differs from like the example provided in this issue description:

linode_domain

linode_domain_record

These changes were made to meet Hashicorp advice to make a Terraform provider match the provider API as closely as possible.

paddycarver commented 6 years ago

The only part of this that makes me o.O is "values is target and does not support lists", but if the API doesn't support lists, the provider shouldn't, either. :) Otherwise, that seems like a fair enough design to me, and mirrors how the Google provider does its DNS design, as far as I can tell.