add record for host only

Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
Jakub Sokołowski 2019-05-28 17:30:23 -04:00
parent 0952abdc59
commit e08ad869e9
No known key found for this signature in database
GPG Key ID: 4EF064D0E6D63020
2 changed files with 22 additions and 14 deletions

32
main.tf
View File

@ -112,18 +112,18 @@ resource "gandi_domainattachment" "dap_ps" {
/* MAIL SITE ------------------------------------*/
/* This is the main site hosted on GitHub */
resource "gandi_zonerecord" "dap_ps_site" {
zone = "${gandi_zone.dap_ps_zone.id}"
name = "mail"
type = "TXT"
ttl = 3600
values = [
"185.199.108.153",
"185.199.109.153",
"185.199.110.153",
"185.199.111.153",
]
}
//resource "gandi_zonerecord" "dap_ps_site" {
// zone = "${gandi_zone.dap_ps_zone.id}"
// name = "mail"
// type = "TXT"
// ttl = 3600
// values = [
// "185.199.108.153",
// "185.199.109.153",
// "185.199.110.153",
// "185.199.111.153",
// ]
//}
/* RESOURCES ------------------------------------*/
@ -152,6 +152,14 @@ resource "aws_instance" "dap_ps_dev" {
}
}
resource "gandi_zonerecord" "dap_ps_dev" {
zone = "${gandi_zone.dap_ps_zone.id}"
name = "${aws_instance.dap_ps_dev.tags.Name}.${var.hosts_subdomain}"
type = "A"
ttl = 3600
values = ["${aws_instance.dap_ps_dev.public_ip}"]
}
resource "gandi_zonerecord" "main" {
zone = "${gandi_zone.dap_ps_zone.id}"
name = "dev"

View File

@ -14,9 +14,9 @@ variable gandi_api_token {
/* GENERAL --------------------------------------*/
variable hosts_domain {
variable hosts_subdomain {
description = "Domain for hosts entries."
default = "hosts.dap.ps"
default = "hosts"
}
variable public_domain {