Terraform and DNS
-
Providing DNS info for sdi.hdm-stuttgart.cloud and sub-zones:
-
g01.sdi.hdm-stuttgart.cloud
-
g02.sdi.hdm-stuttgart.cloud
-
...
-
-
Remote API for per-zone editing
provider "dns" {
update {
server = "ns1.sdi.hdm-stuttgart.cloud"
key_name = "gxy.key." # Corresponding to your group
key_algorithm = "hmac-sha512"
key_secret = "gas4rFgjT..." # Please choose a more secure option
# e.g. an environment variable!
}
}
resource "dns_a_record_set" "helloRecord" { zone = "${var.dnsSubnetName}." # The dot matters! name = hcloud_server.helloServer.name addresses = [hcloud_server.helloServer.ipv4_address] ttl = 10 }
No. 19
Creating a host with corresponding DNS entry
Q: |
Extend Solving |