-
Notifications
You must be signed in to change notification settings - Fork 0
/
dns-cname-record-list.tf
53 lines (41 loc) · 1.68 KB
/
dns-cname-record-list.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
###############################################
## KopiCloud AD API - List DNS CNAME Records ##
###############################################
# List All DNS CNAME Records
data "kopicloud_dns_cname_records_list" "test_cname_all" {
}
# Returns All DNS CNAME Records
output "OUTPUT_dns_cname_records_list_all" {
description = "List ALL existing DNS CNAME records"
value = data.kopicloud_dns_cname_records_list.test_cname_all
}
#######################################
# Filter DNS CNAME Records with the Zone Name
data "kopicloud_dns_cname_records_list" "test_cname_zone_name" {
zone_name = "kopicloud.local"
}
# Returns all DNS CNAME Records that matches the Zone Name
output "OUTPUT_dns_cname_records_list_zone_name" {
description = "List existing DNS CNAME records in a Zone"
value = data.kopicloud_dns_cname_records_list.test_cname_zone_name
}
#######################################
# Filter DNS CNAME Records with an Alias
data "kopicloud_dns_cname_records_list" "test_cname_alias" {
hostname_alias = "computer70_alias"
}
# Returns all DNS CNAME Records that matches the Alias
output "OUTPUT_dns_cname_records_list_ip_address" {
description = "List existing DNS CNAME Records with the Alias"
value = data.kopicloud_dns_cname_records_list.test_cname_alias
}
#######################################
# Filter DNS CNAME Records with a Hostname
data "kopicloud_dns_cname_records_list" "test_cname_hostname" {
hostname = "computer33"
}
# Returns all DNS CNAME Records that matches the Hostname
output "OUTPUT_dns_cname_records_list_hostname" {
description = "List Existing DNS CNAME Records"
value = data.kopicloud_dns_cname_records_list.test_cname_hostname
}