diff --git a/README.md b/README.md index e9c4667..80abe3c 100644 --- a/README.md +++ b/README.md @@ -81,7 +81,6 @@ Run `terraform destroy` when you don't need these resources. | loadbalancer\_ip | IP address of the loadbalancer | | name | List of names of Droplets | | private\_a | List of Droplet private DNS A record FQDNs. | -| private\_aaaa | List of Droplet private DNS AAAA record FQDNs. | | public\_a | List of Droplet public DNS A record FQDNs. | | public\_aaaa | List of Droplet public DNS AAAA record FQDNs. | | region | List of regions of Droplets | diff --git a/examples/simple/main.tf b/examples/simple/main.tf index 3251b33..98b39f0 100644 --- a/examples/simple/main.tf +++ b/examples/simple/main.tf @@ -25,4 +25,5 @@ module "web" { floating_ip = true block_storage_size = 5 tags = ["${digitalocean_tag.ENV_example.id}", "${digitalocean_tag.ROLE_web.id}"] + user_data = "${file("user-data.web")}" } diff --git a/examples/simple/user-data.web b/examples/simple/user-data.web new file mode 100644 index 0000000..12972f7 --- /dev/null +++ b/examples/simple/user-data.web @@ -0,0 +1,5 @@ +#cloud-config + +runcmd: + - apt-get install -y nginx + - 'echo "

$(hostname)

" > /var/www/html/index.html' diff --git a/main.tf b/main.tf index 95e9c88..a6a11f2 100644 --- a/main.tf +++ b/main.tf @@ -117,12 +117,14 @@ resource "digitalocean_record" "private_a" { value = "${element(digitalocean_droplet.droplet.*.ipv4_address_private, count.index)}" } -// Private DNS AAAA Record -resource "digitalocean_record" "private_aaaa" { - count = "${var.private_networking > 0 && var.ipv6 > 0 && var.private_domain != "" ? var.droplet_count : 0}" +// Private DNS AAAA Record - Not supported somewhere: +// https://github.com/terraform-providers/terraform-provider-digitalocean/issues/181 +// resource "digitalocean_record" "private_aaaa" { +// count = "${var.private_networking > 0 && var.ipv6 > 0 && var.private_domain != "" ? var.droplet_count : 0}" +// +// domain = "${var.private_domain}" +// type = "AAAA" +// name = "${element(digitalocean_droplet.droplet.*.name, count.index)}" +// value = "${element(digitalocean_droplet.droplet.*.ipv6_address_private, count.index)}" +// } - domain = "${var.private_domain}" - type = "AAAA" - name = "${element(digitalocean_droplet.droplet.*.name, count.index)}" - value = "${element(digitalocean_droplet.droplet.*.ipv6_address_private, count.index)}" -} diff --git a/output.tf b/output.tf index 0f2cba1..a9eb610 100644 --- a/output.tf +++ b/output.tf @@ -13,13 +13,14 @@ locals { loadbalancer_id = "${compact(concat(digitalocean_loadbalancer.loadbalancer.*.id, list("")))}" loadbalancer_ip = "${compact(concat(digitalocean_loadbalancer.loadbalancer.*.ip, list("")))}" private_a = "${compact(concat(digitalocean_record.private_a.*.fqdn, list("")))}" - private_aaaa = "${compact(concat(digitalocean_record.private_aaaa.*.fqdn, list("")))}" - public_a = "${compact(concat(digitalocean_record.public_a.*.fqdn, list("")))}" - public_aaaa = "${compact(concat(digitalocean_record.public_aaaa.*.fqdn, list("")))}" - volume_id = "${compact(concat(digitalocean_volume.volume.*.id, list("")))}" - volume_filesystem_type = "${compact(concat(digitalocean_volume.volume.*.initial_filesystem_type, list("")))}" - volume_droplet_ids = "${compact(concat(flatten(digitalocean_volume.volume.*.droplet_ids), list("")))}" - volume_attachment_id = "${compact(concat(digitalocean_volume_attachment.volume_attachment.*.id, list("")))}" + + // private_aaaa = "${compact(concat(digitalocean_record.private_aaaa.*.fqdn, list("")))}" + public_a = "${compact(concat(digitalocean_record.public_a.*.fqdn, list("")))}" + public_aaaa = "${compact(concat(digitalocean_record.public_aaaa.*.fqdn, list("")))}" + volume_id = "${compact(concat(digitalocean_volume.volume.*.id, list("")))}" + volume_filesystem_type = "${compact(concat(digitalocean_volume.volume.*.initial_filesystem_type, list("")))}" + volume_droplet_ids = "${compact(concat(flatten(digitalocean_volume.volume.*.droplet_ids), list("")))}" + volume_attachment_id = "${compact(concat(digitalocean_volume_attachment.volume_attachment.*.id, list("")))}" } output "droplet_id" { @@ -87,10 +88,10 @@ output "private_a" { value = ["${local.private_a}"] } -output "private_aaaa" { - description = "List of Droplet private DNS AAAA record FQDNs." - value = ["${local.private_aaaa}"] -} +// output "private_aaaa" { +// description = "List of Droplet private DNS AAAA record FQDNs." +// value = ["${local.private_aaaa}"] +// } output "public_a" { description = "List of Droplet public DNS A record FQDNs."