Skip to content

Commit 0f9fe60

Browse files
committed
Add example
Signed-off-by: Georg Pfuetzenreuter <[email protected]>
1 parent efa0b10 commit 0f9fe60

File tree

3 files changed

+49
-0
lines changed

3 files changed

+49
-0
lines changed

examples/zones/example_com.tf

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
module "example_com" {
2+
source = "../../terraform-provider-powerdns"
3+
zones = [
4+
"example.com.",
5+
]
6+
7+
nameservers = [
8+
"ns1.example.com.",
9+
"ns2.example.com.",
10+
]
11+
12+
records = [
13+
{
14+
type = "SOA",
15+
ttl = 300,
16+
records = [
17+
"ns1.example.com. hostmaster.example.com. 0 10800 3600 604800 3600"
18+
]
19+
},
20+
{
21+
name = "www",
22+
type = "AAAA",
23+
ttl = 300,
24+
records = [
25+
"::1",
26+
]
27+
}
28+
]
29+
}
30+

examples/zones/main.tf

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
terraform {
2+
required_providers {
3+
powerdns = {
4+
source = "pan-net/powerdns"
5+
#version = "1.5.0"
6+
}
7+
}
8+
}
9+
10+
provider "powerdns" {
11+
api_key = var.pdns_api_key
12+
server_url = var.pdns_server_url
13+
}

examples/zones/variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
variable "pdns_api_key" {
2+
type = string
3+
}
4+
variable "pdns_server_url" {
5+
type = string
6+
}

0 commit comments

Comments
 (0)