Last active
July 26, 2019 16:11
-
-
Save pathcl/fab5911e7aea0a41ff2e9928377ea266 to your computer and use it in GitHub Desktop.
Dns && terraform
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Configure the DNS Provider | |
// dnssec-keygen -r /dev/urandom -a HMAC-MD5 -b 256 -n HOST domain.tld. | |
provider "dns" { | |
update { | |
server = "192.168.0.1" | |
key_name = "domain.tld." | |
key_algorithm = "hmac-md5" | |
key_secret = "yoursecrethere" | |
} | |
} | |
resource "dns_a_record_set" "elastic" { | |
count = "${length(module.elastic.vm)}" | |
zone = "domain.tld." | |
name = module.elastic.vm[count.index].name | |
addresses = [module.elastic.vm[count.index].default_ip_address] | |
ttl = 30 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment