first commit
This commit is contained in:
@@ -0,0 +1 @@
|
||||
/home/floki/.terraform.d/plugins/registry.terraform.io/mrkeikun/powerdns/0.1.2/linux_amd64
|
||||
16
README.md
Normal file
16
README.md
Normal file
@@ -0,0 +1,16 @@
|
||||
|
||||
|
||||
|
||||
## Setting ci/cd secrets
|
||||
```bash
|
||||
TF_VAR_POWERDNS_API_URL
|
||||
TF_VAR_POWERDNS_API_TOKEN
|
||||
```
|
||||
###
|
||||
```terraform
|
||||
zone = ""
|
||||
name = ""
|
||||
type = ""
|
||||
ttl = ""
|
||||
record = []
|
||||
```
|
||||
8
main.tf
Normal file
8
main.tf
Normal file
@@ -0,0 +1,8 @@
|
||||
resource "powerdns_record" "foobar" {
|
||||
count = length(var.zone-records)
|
||||
zone = var.zone-records[count.index].zone
|
||||
name = var.zone-records[count.index].name
|
||||
type = var.zone-records[count.index].type
|
||||
ttl = var.zone-records[count.index].ttl
|
||||
records = var.zone-records[count.index].record
|
||||
}
|
||||
5
providers.tf
Normal file
5
providers.tf
Normal file
@@ -0,0 +1,5 @@
|
||||
provider "powerdns" {
|
||||
server_url = var.POWERDNS_API_URL
|
||||
api_key = var.POWERDNS_API_TOKEN
|
||||
recursor_server_url = "http://127.0.0.1"
|
||||
}
|
||||
23
terraform.tfvars
Normal file
23
terraform.tfvars
Normal file
@@ -0,0 +1,23 @@
|
||||
zone-records = [
|
||||
{
|
||||
zone = "cloud.hlc.lab."
|
||||
name = "test-test.cloud.hlc.lab."
|
||||
type = "A"
|
||||
ttl = "300"
|
||||
record = ["192.168.19.1", "192.168.19.2"]
|
||||
},
|
||||
{
|
||||
zone = "cloud.hlc.lab."
|
||||
name = "test2.cloud.hlc.lab."
|
||||
type = "A"
|
||||
ttl = "300"
|
||||
record = ["192.168.19.1"]
|
||||
},
|
||||
{
|
||||
zone = "cloud.hlc.lab."
|
||||
name = "test3.cloud.hlc.lab."
|
||||
type = "A"
|
||||
ttl = "300"
|
||||
record = ["192.168.19.3"]
|
||||
}
|
||||
]
|
||||
23
variables.tf
Normal file
23
variables.tf
Normal file
@@ -0,0 +1,23 @@
|
||||
variable "POWERDNS_API_TOKEN" {
|
||||
description = "POWERDNS_API_TOKEN"
|
||||
type = string
|
||||
sensitive = true
|
||||
}
|
||||
variable "POWERDNS_API_URL" {
|
||||
description = "POWERDNS_API_TOKEN"
|
||||
type = string
|
||||
sensitive = true
|
||||
}
|
||||
|
||||
|
||||
variable "zone-records" {
|
||||
description = "Parametrs lxc"
|
||||
type = list(object({
|
||||
zone = string,
|
||||
name = string,
|
||||
type = string,
|
||||
ttl = number,
|
||||
record = list(string)
|
||||
})
|
||||
)
|
||||
}
|
||||
9
versions.tf
Normal file
9
versions.tf
Normal file
@@ -0,0 +1,9 @@
|
||||
terraform {
|
||||
required_providers {
|
||||
powerdns = {
|
||||
source = "mrkeikun/powerdns"
|
||||
version = "0.1.2"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user