forked from vmware-archive/terraforming-gcp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
dns.tf
96 lines (69 loc) · 2.79 KB
/
dns.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
resource "google_dns_managed_zone" "env_dns_zone" {
name = "${var.env_name}-zone"
dns_name = "${var.env_name}.${var.dns_suffix}."
description = "DNS zone for the ${var.env_name} environment"
}
resource "google_dns_record_set" "ops-manager-dns" {
name = "pcf.${google_dns_managed_zone.env_dns_zone.dns_name}"
type = "A"
ttl = 300
managed_zone = "${google_dns_managed_zone.env_dns_zone.name}"
rrdatas = ["${google_compute_instance.ops-manager.network_interface.0.access_config.0.assigned_nat_ip}"]
}
resource "google_dns_record_set" "optional-ops-manager-dns" {
name = "pcf-optional.${google_dns_managed_zone.env_dns_zone.dns_name}"
type = "A"
ttl = 300
count = "${min(length(split("", var.optional_opsman_image_url)),1)}"
managed_zone = "${google_dns_managed_zone.env_dns_zone.name}"
rrdatas = ["${google_compute_instance.optional-ops-manager.network_interface.0.access_config.0.assigned_nat_ip}"]
}
resource "google_dns_record_set" "wildcard-sys-dns" {
name = "*.sys.${google_dns_managed_zone.env_dns_zone.dns_name}"
type = "A"
ttl = 300
managed_zone = "${google_dns_managed_zone.env_dns_zone.name}"
rrdatas = ["${google_compute_global_address.cf.address}"]
}
resource "google_dns_record_set" "doppler-sys-dns" {
name = "doppler.sys.${google_dns_managed_zone.env_dns_zone.dns_name}"
type = "A"
ttl = 300
managed_zone = "${google_dns_managed_zone.env_dns_zone.name}"
rrdatas = ["${google_compute_address.cf-ws.address}"]
}
resource "google_dns_record_set" "loggregator-sys-dns" {
name = "loggregator.sys.${google_dns_managed_zone.env_dns_zone.dns_name}"
type = "A"
ttl = 300
managed_zone = "${google_dns_managed_zone.env_dns_zone.name}"
rrdatas = ["${google_compute_address.cf-ws.address}"]
}
resource "google_dns_record_set" "wildcard-apps-dns" {
name = "*.apps.${google_dns_managed_zone.env_dns_zone.dns_name}"
type = "A"
ttl = 300
managed_zone = "${google_dns_managed_zone.env_dns_zone.name}"
rrdatas = ["${google_compute_global_address.cf.address}"]
}
resource "google_dns_record_set" "wildcard-ws-dns" {
name = "*.ws.${google_dns_managed_zone.env_dns_zone.dns_name}"
type = "A"
ttl = 300
managed_zone = "${google_dns_managed_zone.env_dns_zone.name}"
rrdatas = ["${google_compute_address.cf-ws.address}"]
}
resource "google_dns_record_set" "app-ssh-dns" {
name = "ssh.sys.${google_dns_managed_zone.env_dns_zone.dns_name}"
type = "A"
ttl = 300
managed_zone = "${google_dns_managed_zone.env_dns_zone.name}"
rrdatas = ["${google_compute_address.cf-ssh.address}"]
}
resource "google_dns_record_set" "tcp-dns" {
name = "tcp.${google_dns_managed_zone.env_dns_zone.dns_name}"
type = "A"
ttl = 300
managed_zone = "${google_dns_managed_zone.env_dns_zone.name}"
rrdatas = ["${google_compute_address.cf-tcp.address}"]
}