Advertisement
Guest User

Untitled

a guest
Jun 19th, 2019
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. locals {
  2. sorted_pdns_hostnames = "${sort(module.server.hostnames)}"
  3. records = "${formatlist("10 10 80 %s.${var.vpc}.${var.region}.private.", local.sorted_pdns_hostnames)}"
  4. }
  5.  
  6. resource "powerdns_record" "pool" {
  7. zone = "${var.pdns_zone}"
  8. name = "${var.pdns_name}"
  9. type = "SRV"
  10. ttl = 300
  11. records = ["${local.records}"]
  12. }
  13.  
  14. locals {
  15. sorted_hostnames = "${sort(module.server.hostnames)}"
  16. rdata = "${formatlist("10 10 80 %s.${var.vpc}.${var.region}.private.", local.sorted_hostnames)}"
  17. }
  18.  
  19. resource "ultradns_record" "pool" {
  20. zone = "${var.zone_domain}"
  21. name = "${var.ultradns_record_name}"
  22. rdata = ["${local.rdata}"]
  23. type = "SRV"
  24. ttl = 300
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement