-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.tf
More file actions
52 lines (45 loc) · 1.09 KB
/
main.tf
File metadata and controls
52 lines (45 loc) · 1.09 KB
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
data "external" "myipaddr" {
program = ["bash", "-c", "curl -s 'https://api.ipify.org?format=json'"]
}
resource "cloudflare_record" "proxmox" {
zone_id = var.zone_id
name = "proxmox"
value = "${data.external.myipaddr.result.ip}"
type = "A"
ttl = 3600
}
resource "cloudflare_record" "rancher" {
zone_id = var.zone_id
name = "rancher"
value = "${data.external.myipaddr.result.ip}"
type = "A"
ttl = 3600
}
resource "cloudflare_record" "k8s" {
zone_id = var.zone_id
name = "k8s"
value = "${data.external.myipaddr.result.ip}"
type = "A"
ttl = 3600
}
resource "cloudflare_record" "nginx" {
zone_id = var.zone_id
name = "nginx"
value = "${data.external.myipaddr.result.ip}"
type = "A"
ttl = 3600
}
resource "cloudflare_record" "rdp" {
zone_id = var.zone_id
name = "rdp"
value = "${data.external.myipaddr.result.ip}"
type = "A"
ttl = 3600
}
resource "cloudflare_record" "api" {
zone_id = var.zone_id
name = "api"
value = "${data.external.myipaddr.result.ip}"
type = "A"
ttl = 3600
}