Skip to content
This repository was archived by the owner on Mar 1, 2023. It is now read-only.

Commit e950b9d

Browse files
author
Vasil Mikhalenya
committed
DNS examples updated
1 parent f6b5815 commit e950b9d

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

examples/resources/gcore_dns_zone_record/resource.tf

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,36 @@ provider gcore {
77
gcore_dns_api = "https://dnsapi.gcorelabs.com"
88
}
99

10+
//
11+
// example0: managing zone and records by TF using variables
12+
//
13+
variable "example_domain0" {
14+
type = string
15+
default = "examplezone.com"
16+
}
17+
18+
resource "gcore_dns_zone" "examplezone0" {
19+
name = var.example_domain0
20+
}
21+
22+
resource "gcore_dns_zone_record" "example_rrset0" {
23+
zone = gcore_dns_zone.examplezone0.name
24+
domain = "${gcore_dns_zone.examplezone0.name}"
25+
type = "A"
26+
ttl = 100
27+
28+
resource_record {
29+
content = "127.0.0.100"
30+
}
31+
resource_record {
32+
content = "127.0.0.200"
33+
// enabled = false
34+
}
35+
}
36+
37+
//
38+
// example1: managing zone outside of TF
39+
//
1040
resource "gcore_dns_zone_record" "subdomain_examplezone" {
1141
zone = "examplezone.com"
1242
domain = "subdomain.examplezone.com"

0 commit comments

Comments
 (0)